Upload folder using huggingface_hub
#3
by
nold
- opened
- .gitattributes +5 -0
- README.md +1277 -0
- Yi-34B-200K_Q3_K_M.gguf +3 -0
- Yi-34B-200K_Q4_K_M.gguf +3 -0
- Yi-34B-200K_Q5_K_M.gguf +3 -0
- Yi-34B-200K_Q6_K.gguf +3 -0
- Yi-34B-200K_Q8_0.gguf +3 -0
- test.log +2 -0
.gitattributes
CHANGED
@@ -33,3 +33,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
Yi-34B-200K_Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
37 |
+
Yi-34B-200K_Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
38 |
+
Yi-34B-200K_Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
39 |
+
Yi-34B-200K_Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
40 |
+
Yi-34B-200K_Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,1277 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: yi-license
|
4 |
+
license_link: LICENSE
|
5 |
+
widget:
|
6 |
+
- example_title: "Yi-34B-Chat"
|
7 |
+
text: "hi"
|
8 |
+
output:
|
9 |
+
text: " Hello! How can I assist you today?"
|
10 |
+
- example_title: "Yi-34B"
|
11 |
+
text: "There's a place where time stands still. A place of breath taking wonder, but also"
|
12 |
+
output:
|
13 |
+
text: " an eerie sense that something is just not right…\nBetween the two worlds lies The Forgotten Kingdom - home to creatures long since thought extinct and ancient magic so strong it defies belief! Only here can you find what has been lost for centuries: An Elixir Of Life which will restore youth and vitality if only those who seek its power are brave enough to face up against all manner of dangers lurking in this mysterious land! But beware; some say there may even exist powerful entities beyond our comprehension whose intentions towards humanity remain unclear at best ---- they might want nothing more than destruction itself rather then anything else from their quest after immortality (and maybe someone should tell them about modern medicine)? In any event though – one thing remains true regardless : whether or not success comes easy depends entirely upon how much effort we put into conquering whatever challenges lie ahead along with having faith deep down inside ourselves too ;) So let’s get started now shall We?"
|
14 |
+
pipeline_tag: text-generation
|
15 |
+
---
|
16 |
+
|
17 |
+
<div align="center">
|
18 |
+
|
19 |
+
<picture>
|
20 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/01-ai/Yi/main/assets/img/Yi_logo_icon_dark.svg" width="200px">
|
21 |
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/01-ai/Yi/main/assets/img/Yi_logo_icon_light.svg" width="200px">
|
22 |
+
<img alt="specify theme context for images" src="https://raw.githubusercontent.com/01-ai/Yi/main/assets/img/Yi_logo_icon_light.svg">
|
23 |
+
</picture>
|
24 |
+
|
25 |
+
</br>
|
26 |
+
</br>
|
27 |
+
|
28 |
+
<div style="display: inline-block;">
|
29 |
+
<a href="https://github.com/01-ai/Yi/actions/workflows/build_docker_image.yml">
|
30 |
+
<img src="https://github.com/01-ai/Yi/actions/workflows/build_docker_image.yml/badge.svg">
|
31 |
+
</a>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<div style="display: inline-block;">
|
35 |
+
<a href="https://github.com/01-ai/Yi/blob/main/LICENSE">
|
36 |
+
<img src="https://img.shields.io/badge/Code_License-Apache_2.0-lightblue">
|
37 |
+
</a>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<div style="display: inline-block;">
|
41 |
+
<a href="https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt">
|
42 |
+
<img src="https://img.shields.io/badge/Model_License-Yi_License-lightblue">
|
43 |
+
</a>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
<div style="display: inline-block;">
|
47 |
+
<a href="mailto:oss@01.ai">
|
48 |
+
<img src="https://img.shields.io/badge/✉️-yi@01.ai-FFE01B">
|
49 |
+
</a>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<div align="center">
|
55 |
+
<h3 align="center">Building the Next Generation of Open-Source and Bilingual LLMs</h3>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<p align="center">
|
59 |
+
🤗 <a href="https://huggingface.co/01-ai" target="_blank">Hugging Face</a> • 🤖 <a href="https://www.modelscope.cn/organization/01ai/" target="_blank">ModelScope</a> • ✡️ <a href="https://wisemodel.cn/organization/01.AI" target="_blank">WiseModel</a>
|
60 |
+
</p>
|
61 |
+
|
62 |
+
<p align="center">
|
63 |
+
👩🚀 Ask questions or discuss ideas on <a href="https://github.com/01-ai/Yi/discussions" target="_blank"> GitHub </a>
|
64 |
+
</p>
|
65 |
+
|
66 |
+
<p align="center">
|
67 |
+
👋 Join us on <a href="https://discord.gg/zQ4A6b6H" target="_blank"> 👾 Discord </a> or <a href="https://github.com/01-ai/Yi/issues/43#issuecomment-1827285245" target="_blank"> 💬 WeChat </a>
|
68 |
+
</p>
|
69 |
+
|
70 |
+
<p align="center">
|
71 |
+
📝 Check out <a href="https://arxiv.org/abs/2403.04652"> Yi Tech Report </a>
|
72 |
+
</p>
|
73 |
+
|
74 |
+
<p align="center">
|
75 |
+
📚 Grow at <a href="#learning-hub"> Yi Learning Hub </a>
|
76 |
+
</p>
|
77 |
+
|
78 |
+
<!-- DO NOT REMOVE ME -->
|
79 |
+
|
80 |
+
<hr>
|
81 |
+
|
82 |
+
<details open>
|
83 |
+
<summary></b>📕 Table of Contents</b></summary>
|
84 |
+
|
85 |
+
- [What is Yi?](#what-is-yi)
|
86 |
+
- [Introduction](#introduction)
|
87 |
+
- [Models](#models)
|
88 |
+
- [Chat models](#chat-models)
|
89 |
+
- [Base models](#base-models)
|
90 |
+
- [Other info](#other-info)
|
91 |
+
- [News](#news)
|
92 |
+
- [How to use Yi?](#how-to-use-yi)
|
93 |
+
- [Quick start](#quick-start)
|
94 |
+
- [Choose your path](#choose-your-path)
|
95 |
+
- [pip](#quick-start---pip)
|
96 |
+
- [docker](#quick-start---docker)
|
97 |
+
- [llama.cpp](#quick-start---llamacpp)
|
98 |
+
- [conda-lock](#quick-start---conda-lock)
|
99 |
+
- [Web demo](#web-demo)
|
100 |
+
- [Fine-tuning](#fine-tuning)
|
101 |
+
- [Quantization](#quantization)
|
102 |
+
- [Deployment](#deployment)
|
103 |
+
- [Learning hub](#learning-hub)
|
104 |
+
- [Why Yi?](#why-yi)
|
105 |
+
- [Ecosystem](#ecosystem)
|
106 |
+
- [Upstream](#upstream)
|
107 |
+
- [Downstream](#downstream)
|
108 |
+
- [Serving](#serving)
|
109 |
+
- [Quantization](#quantization-1)
|
110 |
+
- [Fine-tuning](#fine-tuning-1)
|
111 |
+
- [API](#api)
|
112 |
+
- [Benchmarks](#benchmarks)
|
113 |
+
- [Base model performance](#base-model-performance)
|
114 |
+
- [Chat model performance](#chat-model-performance)
|
115 |
+
- [Tech report](#tech-report)
|
116 |
+
- [Citation](#citation)
|
117 |
+
- [Who can use Yi?](#who-can-use-yi)
|
118 |
+
- [Misc.](#misc)
|
119 |
+
- [Acknowledgements](#acknowledgments)
|
120 |
+
- [Disclaimer](#disclaimer)
|
121 |
+
- [License](#license)
|
122 |
+
|
123 |
+
</details>
|
124 |
+
|
125 |
+
<hr>
|
126 |
+
|
127 |
+
# What is Yi?
|
128 |
+
|
129 |
+
## Introduction
|
130 |
+
|
131 |
+
- 🤖 The Yi series models are the next generation of open-source large language models trained from scratch by [01.AI](https://01.ai/).
|
132 |
+
|
133 |
+
- 🙌 Targeted as a bilingual language model and trained on 3T multilingual corpus, the Yi series models become one of the strongest LLM worldwide, showing promise in language understanding, commonsense reasoning, reading comprehension, and more. For example,
|
134 |
+
|
135 |
+
- Yi-34B-Chat model **landed in second place (following GPT-4 Turbo)**, outperforming other LLMs (such as GPT-4, Mixtral, Claude) on the AlpacaEval Leaderboard (based on data available up to January 2024).
|
136 |
+
|
137 |
+
- Yi-34B model **ranked first among all existing open-source models** (such as Falcon-180B, Llama-70B, Claude) in **both English and Chinese** on various benchmarks, including Hugging Face Open LLM Leaderboard (pre-trained) and C-Eval (based on data available up to November 2023).
|
138 |
+
|
139 |
+
- 🙏 (Credits to Llama) Thanks to the Transformer and Llama open-source communities, as they reduce the efforts required to build from scratch and enable the utilization of the same tools within the AI ecosystem.
|
140 |
+
|
141 |
+
<details style="display: inline;"><summary> If you're interested in Yi's adoption of Llama architecture and license usage policy, see <span style="color: green;">Yi's relation with Llama.</span> ⬇️</summary> <ul> <br>
|
142 |
+
|
143 |
+
> 💡 TL;DR
|
144 |
+
>
|
145 |
+
> The Yi series models adopt the same model architecture as Llama but are **NOT** derivatives of Llama.
|
146 |
+
|
147 |
+
- Both Yi and Llama are based on the Transformer structure, which has been the standard architecture for large language models since 2018.
|
148 |
+
|
149 |
+
- Grounded in the Transformer architecture, Llama has become a new cornerstone for the majority of state-of-the-art open-source models due to its excellent stability, reliable convergence, and robust compatibility. This positions Llama as the recognized foundational framework for models including Yi.
|
150 |
+
|
151 |
+
- Thanks to the Transformer and Llama architectures, other models can leverage their power, reducing the effort required to build from scratch and enabling the utilization of the same tools within their ecosystems.
|
152 |
+
|
153 |
+
- However, the Yi series models are NOT derivatives of Llama, as they do not use Llama's weights.
|
154 |
+
|
155 |
+
- As Llama's structure is employed by the majority of open-source models, the key factors of determining model performance are training datasets, training pipelines, and training infrastructure.
|
156 |
+
|
157 |
+
- Developing in a unique and proprietary way, Yi has independently created its own high-quality training datasets, efficient training pipelines, and robust training infrastructure entirely from the ground up. This effort has led to excellent performance with Yi series models ranking just behind GPT4 and surpassing Llama on the [Alpaca Leaderboard in Dec 2023](https://tatsu-lab.github.io/alpaca_eval/).
|
158 |
+
</ul>
|
159 |
+
</details>
|
160 |
+
|
161 |
+
<p align="right"> [
|
162 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
163 |
+
</p>
|
164 |
+
|
165 |
+
## News
|
166 |
+
|
167 |
+
<details open>
|
168 |
+
<summary>🎯 <b>2024-03-08</b>: <a href="https://arxiv.org/abs/2403.04652">Yi Tech Report</a> is published! </summary>
|
169 |
+
</details>
|
170 |
+
|
171 |
+
|
172 |
+
<details open>
|
173 |
+
<summary>🔔 <b>2024-03-07</b>: The long text capability of the Yi-34B-200K has been enhanced. </summary>
|
174 |
+
<br>
|
175 |
+
In the "Needle-in-a-Haystack" test, the Yi-34B-200K's performance is improved by 10.5%, rising from 89.3% to an impressive 99.8%. We continue to pre-train the model on 5B tokens long-context data mixture and demonstrate a near-all-green performance.
|
176 |
+
</details>
|
177 |
+
|
178 |
+
<details open>
|
179 |
+
<summary>🎯 <b>2024-03-06</b>: The <code>Yi-9B</code> is open-sourced and available to the public.</summary>
|
180 |
+
<br>
|
181 |
+
<code>Yi-9B</code> stands out as the top performer among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.
|
182 |
+
</details>
|
183 |
+
|
184 |
+
<details open>
|
185 |
+
<summary>🎯 <b>2024-01-23</b>: The Yi-VL models, <code><a href="https://huggingface.co/01-ai/Yi-VL-34B">Yi-VL-34B</a></code> and <code><a href="https://huggingface.co/01-ai/Yi-VL-6B">Yi-VL-6B</a></code>, are open-sourced and available to the public.</summary>
|
186 |
+
<br>
|
187 |
+
<code><a href="https://huggingface.co/01-ai/Yi-VL-34B">Yi-VL-34B</a></code> has ranked <strong>first</strong> among all existing open-source models in the latest benchmarks, including <a href="https://arxiv.org/abs/2311.16502">MMMU</a> and <a href="https://arxiv.org/abs/2401.11944">CMMMU</a> (based on data available up to January 2024).</li>
|
188 |
+
</details>
|
189 |
+
|
190 |
+
|
191 |
+
<details>
|
192 |
+
<summary>🎯 <b>2023-11-23</b>: <a href="#chat-models">Chat models</a> are open-sourced and available to the public.</summary>
|
193 |
+
<br>This release contains two chat models based on previously released base models, two 8-bit models quantized by GPTQ, and two 4-bit models quantized by AWQ.
|
194 |
+
|
195 |
+
- `Yi-34B-Chat`
|
196 |
+
- `Yi-34B-Chat-4bits`
|
197 |
+
- `Yi-34B-Chat-8bits`
|
198 |
+
- `Yi-6B-Chat`
|
199 |
+
- `Yi-6B-Chat-4bits`
|
200 |
+
- `Yi-6B-Chat-8bits`
|
201 |
+
|
202 |
+
You can try some of them interactively at:
|
203 |
+
|
204 |
+
- [Hugging Face](https://huggingface.co/spaces/01-ai/Yi-34B-Chat)
|
205 |
+
- [Replicate](https://replicate.com/01-ai)
|
206 |
+
</details>
|
207 |
+
|
208 |
+
<details>
|
209 |
+
<summary>🔔 <b>2023-11-23</b>: The Yi Series Models Community License Agreement is updated to <a href="https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt">v2.1</a>.</summary>
|
210 |
+
</details>
|
211 |
+
|
212 |
+
<details>
|
213 |
+
<summary>🔥 <b>2023-11-08</b>: Invited test of Yi-34B chat model.</summary>
|
214 |
+
<br>Application form:
|
215 |
+
|
216 |
+
- [English](https://cn.mikecrm.com/l91ODJf)
|
217 |
+
- [Chinese](https://cn.mikecrm.com/gnEZjiQ)
|
218 |
+
</details>
|
219 |
+
|
220 |
+
<details>
|
221 |
+
<summary>🎯 <b>2023-11-05</b>: <a href="#base-models">The base models, </a><code>Yi-6B-200K</code> and <code>Yi-34B-200K</code>, are open-sourced and available to the public.</summary>
|
222 |
+
<br>This release contains two base models with the same parameter sizes as the previous
|
223 |
+
release, except that the context window is extended to 200K.
|
224 |
+
</details>
|
225 |
+
|
226 |
+
<details>
|
227 |
+
<summary>🎯 <b>2023-11-02</b>: <a href="#base-models">The base models, </a><code>Yi-6B</code> and <code>Yi-34B</code>, are open-sourced and available to the public.</summary>
|
228 |
+
<br>The first public release contains two bilingual (English/Chinese) base models
|
229 |
+
with the parameter sizes of 6B and 34B. Both of them are trained with 4K
|
230 |
+
sequence length and can be extended to 32K during inference time.
|
231 |
+
|
232 |
+
</details>
|
233 |
+
|
234 |
+
<p align="right"> [
|
235 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
236 |
+
</p>
|
237 |
+
|
238 |
+
## Models
|
239 |
+
|
240 |
+
Yi models come in multiple sizes and cater to different use cases. You can also fine-tune Yi models to meet your specific requirements.
|
241 |
+
|
242 |
+
If you want to deploy Yi models, make sure you meet the [software and hardware requirements](#deployment).
|
243 |
+
|
244 |
+
### Chat models
|
245 |
+
|
246 |
+
| Model | Download
|
247 |
+
|---|---
|
248 |
+
Yi-34B-Chat | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat/summary)
|
249 |
+
Yi-34B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-4bits/summary)
|
250 |
+
Yi-34B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-Chat-8bits/summary)
|
251 |
+
Yi-6B-Chat| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat/summary)
|
252 |
+
Yi-6B-Chat-4bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-4bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-4bits/summary)
|
253 |
+
Yi-6B-Chat-8bits | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-Chat-8bits) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-Chat-8bits/summary)
|
254 |
+
|
255 |
+
|
256 |
+
<sub><sup> - 4-bit series models are quantized by AWQ. <br> - 8-bit series models are quantized by GPTQ <br> - All quantized models have a low barrier to use since they can be deployed on consumer-grade GPUs (e.g., 3090, 4090). </sup></sub>
|
257 |
+
|
258 |
+
### Base models
|
259 |
+
|
260 |
+
| Model | Download |
|
261 |
+
|---|---|
|
262 |
+
Yi-34B| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B/summary)
|
263 |
+
Yi-34B-200K|• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-34B-200K) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-34B-200K/summary)
|
264 |
+
Yi-9B|• [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-9B)
|
265 |
+
Yi-6B| • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B/summary)
|
266 |
+
Yi-6B-200K | • [🤗 Hugging Face](https://huggingface.co/01-ai/Yi-6B-200K) • [🤖 ModelScope](https://www.modelscope.cn/models/01ai/Yi-6B-200K/summary)
|
267 |
+
|
268 |
+
<sub><sup> - 200k is roughly equivalent to 400,000 Chinese characters. <br> - If you want to use the previous version of the Yi-34B-200K (released on Nov 5, 2023), run `git checkout 069cd341d60f4ce4b07ec394e82b79e94f656cf` to download the weight. </sup></sub>
|
269 |
+
|
270 |
+
### Model info
|
271 |
+
|
272 |
+
- For chat and base models
|
273 |
+
|
274 |
+
Model | Intro | Default context window | Pretrained tokens | Training Data Date
|
275 |
+
|---|---|---|---|---
|
276 |
+
6B series models |They are suitable for personal and academic use. | 4K | 3T | Up to June 2023
|
277 |
+
9B model| It is the best at coding and math in the Yi series models.|4K | Yi-9B is continuously trained based on Yi-6B, using 0.8T tokens. | Up to June 2023
|
278 |
+
34B series models | They are suitable for personal, academic, and commercial (particularly for small and medium-sized enterprises) purposes. It's a cost-effective solution that's affordable and equipped with emergent ability.|4K | 3T | Up to June 2023
|
279 |
+
|
280 |
+
- For chat models
|
281 |
+
|
282 |
+
<details style="display: inline;"><summary>For chat model limitations, see the explanations below. ⬇️</summary>
|
283 |
+
<ul>
|
284 |
+
<br>The released chat model has undergone exclusive training using Supervised Fine-Tuning (SFT). Compared to other standard chat models, our model produces more diverse responses, making it suitable for various downstream tasks, such as creative scenarios. Furthermore, this diversity is expected to enhance the likelihood of generating higher quality responses, which will be advantageous for subsequent Reinforcement Learning (RL) training.
|
285 |
+
|
286 |
+
<br>However, this higher diversity might amplify certain existing issues, including:
|
287 |
+
<li>Hallucination: This refers to the model generating factually incorrect or nonsensical information. With the model's responses being more varied, there's a higher chance of hallucination that are not based on accurate data or logical reasoning.</li>
|
288 |
+
<li>Non-determinism in re-generation: When attempting to regenerate or sample responses, inconsistencies in the outcomes may occur. The increased diversity can lead to varying results even under similar input conditions.</li>
|
289 |
+
<li>Cumulative Error: This occurs when errors in the model's responses compound over time. As the model generates more diverse responses, the likelihood of small inaccuracies building up into larger errors increases, especially in complex tasks like extended reasoning, mathematical problem-solving, etc.</li>
|
290 |
+
<li>To achieve more coherent and consistent responses, it is advisable to adjust generation configuration parameters such as temperature, top_p, or top_k. These adjustments can help in the balance between creativity and coherence in the model's outputs.</li>
|
291 |
+
</ul>
|
292 |
+
</details>
|
293 |
+
|
294 |
+
<p align="right"> [
|
295 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
296 |
+
</p>
|
297 |
+
|
298 |
+
|
299 |
+
# How to use Yi?
|
300 |
+
|
301 |
+
- [Quick start](#quick-start)
|
302 |
+
- [Choose your path](#choose-your-path)
|
303 |
+
- [pip](#quick-start---pip)
|
304 |
+
- [docker](#quick-start---docker)
|
305 |
+
- [conda-lock](#quick-start---conda-lock)
|
306 |
+
- [llama.cpp](#quick-start---llamacpp)
|
307 |
+
- [Web demo](#web-demo)
|
308 |
+
- [Fine-tuning](#fine-tuning)
|
309 |
+
- [Quantization](#quantization)
|
310 |
+
- [Deployment](#deployment)
|
311 |
+
- [Learning hub](#learning-hub)
|
312 |
+
|
313 |
+
## Quick start
|
314 |
+
|
315 |
+
Getting up and running with Yi models is simple with multiple choices available.
|
316 |
+
|
317 |
+
### Choose your path
|
318 |
+
|
319 |
+
Select one of the following paths to begin your journey with Yi!
|
320 |
+
|
321 |
+
![Quick start - Choose your path](https://github.com/01-ai/Yi/blob/main/assets/img/quick_start_path.png?raw=true)
|
322 |
+
|
323 |
+
#### 🎯 Deploy Yi locally
|
324 |
+
|
325 |
+
If you prefer to deploy Yi models locally,
|
326 |
+
|
327 |
+
- 🙋♀️ and you have **sufficient** resources (for example, NVIDIA A800 80GB), you can choose one of the following methods:
|
328 |
+
- [pip](#quick-start---pip)
|
329 |
+
- [Docker](#quick-start---docker)
|
330 |
+
- [conda-lock](#quick-start---conda-lock)
|
331 |
+
|
332 |
+
- 🙋♀️ and you have **limited** resources (for example, a MacBook Pro), you can use [llama.cpp](#quick-start---llamacpp).
|
333 |
+
|
334 |
+
#### 🎯 Not to deploy Yi locally
|
335 |
+
|
336 |
+
If you prefer not to deploy Yi models locally, you can explore Yi's capabilities using any of the following options.
|
337 |
+
|
338 |
+
##### 🙋♀️ Run Yi with APIs
|
339 |
+
|
340 |
+
If you want to explore more features of Yi, you can adopt one of these methods:
|
341 |
+
|
342 |
+
- Yi APIs (Yi official)
|
343 |
+
- [Early access has been granted](https://x.com/01AI_Yi/status/1735728934560600536?s=20) to some applicants. Stay tuned for the next round of access!
|
344 |
+
|
345 |
+
- [Yi APIs](https://replicate.com/01-ai/yi-34b-chat/api?tab=nodejs) (Replicate)
|
346 |
+
|
347 |
+
##### 🙋♀️ Run Yi in playground
|
348 |
+
|
349 |
+
If you want to chat with Yi with more customizable options (e.g., system prompt, temperature, repetition penalty, etc.), you can try one of the following options:
|
350 |
+
|
351 |
+
- [Yi-34B-Chat-Playground](https://platform.lingyiwanwu.com/prompt/playground) (Yi official)
|
352 |
+
- Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).
|
353 |
+
|
354 |
+
- [Yi-34B-Chat-Playground](https://replicate.com/01-ai/yi-34b-chat) (Replicate)
|
355 |
+
|
356 |
+
##### 🙋♀️ Chat with Yi
|
357 |
+
|
358 |
+
If you want to chat with Yi, you can use one of these online services, which offer a similar user experience:
|
359 |
+
|
360 |
+
- [Yi-34B-Chat](https://huggingface.co/spaces/01-ai/Yi-34B-Chat) (Yi official on Hugging Face)
|
361 |
+
- No registration is required.
|
362 |
+
|
363 |
+
- [Yi-34B-Chat](https://platform.lingyiwanwu.com/) (Yi official beta)
|
364 |
+
- Access is available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)).
|
365 |
+
|
366 |
+
<p align="right"> [
|
367 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
368 |
+
</p>
|
369 |
+
|
370 |
+
### Quick start - pip
|
371 |
+
|
372 |
+
This tutorial guides you through every step of running **Yi-34B-Chat locally on an A800 (80G)** and then performing inference.
|
373 |
+
|
374 |
+
#### Step 0: Prerequisites
|
375 |
+
|
376 |
+
- Make sure Python 3.10 or a later version is installed.
|
377 |
+
|
378 |
+
- If you want to run other Yi models, see [software and hardware requirements](#deployment).
|
379 |
+
|
380 |
+
#### Step 1: Prepare your environment
|
381 |
+
|
382 |
+
To set up the environment and install the required packages, execute the following command.
|
383 |
+
|
384 |
+
```bash
|
385 |
+
git clone https://github.com/01-ai/Yi.git
|
386 |
+
cd yi
|
387 |
+
pip install -r requirements.txt
|
388 |
+
```
|
389 |
+
|
390 |
+
#### Step 2: Download the Yi model
|
391 |
+
|
392 |
+
You can download the weights and tokenizer of Yi models from the following sources:
|
393 |
+
|
394 |
+
- [Hugging Face](https://huggingface.co/01-ai)
|
395 |
+
- [ModelScope](https://www.modelscope.cn/organization/01ai/)
|
396 |
+
- [WiseModel](https://wisemodel.cn/organization/01.AI)
|
397 |
+
|
398 |
+
#### Step 3: Perform inference
|
399 |
+
|
400 |
+
You can perform inference with Yi chat or base models as below.
|
401 |
+
|
402 |
+
##### Perform inference with Yi chat model
|
403 |
+
|
404 |
+
1. Create a file named `quick_start.py` and copy the following content to it.
|
405 |
+
|
406 |
+
```python
|
407 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
408 |
+
|
409 |
+
model_path = '<your-model-path>'
|
410 |
+
|
411 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False)
|
412 |
+
|
413 |
+
# Since transformers 4.35.0, the GPT-Q/AWQ model can be loaded using AutoModelForCausalLM.
|
414 |
+
model = AutoModelForCausalLM.from_pretrained(
|
415 |
+
model_path,
|
416 |
+
device_map="auto",
|
417 |
+
torch_dtype='auto'
|
418 |
+
).eval()
|
419 |
+
|
420 |
+
# Prompt content: "hi"
|
421 |
+
messages = [
|
422 |
+
{"role": "user", "content": "hi"}
|
423 |
+
]
|
424 |
+
|
425 |
+
input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
|
426 |
+
output_ids = model.generate(input_ids.to('cuda'))
|
427 |
+
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
|
428 |
+
|
429 |
+
# Model response: "Hello! How can I assist you today?"
|
430 |
+
print(response)
|
431 |
+
```
|
432 |
+
|
433 |
+
2. Run `quick_start.py`.
|
434 |
+
|
435 |
+
```bash
|
436 |
+
python quick_start.py
|
437 |
+
```
|
438 |
+
|
439 |
+
Then you can see an output similar to the one below. 🥳
|
440 |
+
|
441 |
+
```bash
|
442 |
+
Hello! How can I assist you today?
|
443 |
+
```
|
444 |
+
|
445 |
+
##### Perform inference with Yi base model
|
446 |
+
|
447 |
+
- Yi-34B
|
448 |
+
|
449 |
+
The steps are similar to [pip - Perform inference with Yi chat model](#perform-inference-with-yi-chat-model).
|
450 |
+
|
451 |
+
You can use the existing file [`text_generation.py`](https://github.com/01-ai/Yi/tree/main/demo).
|
452 |
+
|
453 |
+
```bash
|
454 |
+
python demo/text_generation.py --model <your-model-path>
|
455 |
+
```
|
456 |
+
|
457 |
+
Then you can see an output similar to the one below. 🥳
|
458 |
+
|
459 |
+
<details>
|
460 |
+
|
461 |
+
<summary>Output. ⬇️ </summary>
|
462 |
+
|
463 |
+
<br>
|
464 |
+
|
465 |
+
**Prompt**: Let me tell you an interesting story about cat Tom and mouse Jerry,
|
466 |
+
|
467 |
+
**Generation**: Let me tell you an interesting story about cat Tom and mouse Jerry, which happened in my childhood. My father had a big house with two cats living inside it to kill mice. One day when I was playing at home alone, I found one of the tomcats lying on his back near our kitchen door, looking very much like he wanted something from us but couldn’t get up because there were too many people around him! He kept trying for several minutes before finally giving up...
|
468 |
+
|
469 |
+
</details>
|
470 |
+
|
471 |
+
- Yi-9B
|
472 |
+
|
473 |
+
Input
|
474 |
+
|
475 |
+
```bash
|
476 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
477 |
+
|
478 |
+
MODEL_DIR = "01-ai/Yi-9B"
|
479 |
+
model = AutoModelForCausalLM.from_pretrained(MODEL_DIR, torch_dtype="auto")
|
480 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_DIR, use_fast=False)
|
481 |
+
|
482 |
+
input_text = "# write the quick sort algorithm"
|
483 |
+
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
|
484 |
+
outputs = model.generate(**inputs, max_length=256)
|
485 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
486 |
+
```
|
487 |
+
|
488 |
+
Output
|
489 |
+
|
490 |
+
```bash
|
491 |
+
# write the quick sort algorithm
|
492 |
+
def quick_sort(arr):
|
493 |
+
if len(arr) <= 1:
|
494 |
+
return arr
|
495 |
+
pivot = arr[len(arr) // 2]
|
496 |
+
left = [x for x in arr if x < pivot]
|
497 |
+
middle = [x for x in arr if x == pivot]
|
498 |
+
right = [x for x in arr if x > pivot]
|
499 |
+
return quick_sort(left) + middle + quick_sort(right)
|
500 |
+
|
501 |
+
# test the quick sort algorithm
|
502 |
+
print(quick_sort([3, 6, 8, 10, 1, 2, 1]))
|
503 |
+
```
|
504 |
+
|
505 |
+
<p align="right"> [
|
506 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
507 |
+
</p>
|
508 |
+
|
509 |
+
### Quick start - Docker
|
510 |
+
<details>
|
511 |
+
<summary> Run Yi-34B-chat locally with Docker: a step-by-step guide. ⬇️</summary>
|
512 |
+
<br>This tutorial guides you through every step of running <strong>Yi-34B-Chat on an A800 GPU</strong> or <strong>4*4090</strong> locally and then performing inference.
|
513 |
+
<h4>Step 0: Prerequisites</h4>
|
514 |
+
<p>Make sure you've installed <a href="https://docs.docker.com/engine/install/?open_in_browser=true">Docker</a> and <a href="https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html">nvidia-container-toolkit</a>.</p>
|
515 |
+
|
516 |
+
<h4> Step 1: Start Docker </h4>
|
517 |
+
<pre><code>docker run -it --gpus all \
|
518 |
+
-v <your-model-path>: /models
|
519 |
+
ghcr.io/01-ai/yi:latest
|
520 |
+
</code></pre>
|
521 |
+
<p>Alternatively, you can pull the Yi Docker image from <code>registry.lingyiwanwu.com/ci/01-ai/yi:latest</code>.</p>
|
522 |
+
|
523 |
+
<h4>Step 2: Perform inference</h4>
|
524 |
+
<p>You can perform inference with Yi chat or base models as below.</p>
|
525 |
+
|
526 |
+
<h5>Perform inference with Yi chat model</h5>
|
527 |
+
<p>The steps are similar to <a href="#perform-inference-with-yi-chat-model">pip - Perform inference with Yi chat model</a>.</p>
|
528 |
+
<p><strong>Note</strong> that the only difference is to set <code>model_path = '<your-model-mount-path>'</code> instead of <code>model_path = '<your-model-path>'</code>.</p>
|
529 |
+
<h5>Perform inference with Yi base model</h5>
|
530 |
+
<p>The steps are similar to <a href="#perform-inference-with-yi-base-model">pip - Perform inference with Yi base model</a>.</p>
|
531 |
+
<p><strong>Note</strong> that the only difference is to set <code>--model <your-model-mount-path>'</code> instead of <code>model <your-model-path></code>.</p>
|
532 |
+
</details>
|
533 |
+
|
534 |
+
### Quick start - conda-lock
|
535 |
+
|
536 |
+
<details>
|
537 |
+
<summary>You can use <code><a href="https://github.com/conda/conda-lock">conda-lock</a></code> to generate fully reproducible lock files for conda environments. ⬇️</summary>
|
538 |
+
<br>
|
539 |
+
You can refer to <a href="https://github.com/01-ai/Yi/blob/ebba23451d780f35e74a780987ad377553134f68/conda-lock.yml">conda-lock.yml</a> for the exact versions of the dependencies. Additionally, you can utilize <code><a href="https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html">micromamba</a></code> for installing these dependencies.
|
540 |
+
<br>
|
541 |
+
To install the dependencies, follow these steps:
|
542 |
+
|
543 |
+
1. Install micromamba by following the instructions available <a href="https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html">here</a>.
|
544 |
+
|
545 |
+
2. Execute <code>micromamba install -y -n yi -f conda-lock.yml</code> to create a conda environment named <code>yi</code> and install the necessary dependencies.
|
546 |
+
</details>
|
547 |
+
|
548 |
+
|
549 |
+
### Quick start - llama.cpp
|
550 |
+
<details>
|
551 |
+
<summary> Run Yi-chat-6B-2bits locally with llama.cpp: a step-by-step guide. ⬇️</summary>
|
552 |
+
<br>This tutorial guides you through every step of running a quantized model (<a href="https://huggingface.co/XeIaso/yi-chat-6B-GGUF/tree/main">Yi-chat-6B-2bits</a>) locally and then performing inference.</p>
|
553 |
+
|
554 |
+
- [Step 0: Prerequisites](#step-0-prerequisites)
|
555 |
+
- [Step 1: Download llama.cpp](#step-1-download-llamacpp)
|
556 |
+
- [Step 2: Download Yi model](#step-2-download-yi-model)
|
557 |
+
- [Step 3: Perform inference](#step-3-perform-inference)
|
558 |
+
|
559 |
+
#### Step 0: Prerequisites
|
560 |
+
|
561 |
+
- This tutorial assumes you use a MacBook Pro with 16GB of memory and an Apple M2 Pro chip.
|
562 |
+
|
563 |
+
- Make sure [`git-lfs`](https://git-lfs.com/) is installed on your machine.
|
564 |
+
|
565 |
+
#### Step 1: Download `llama.cpp`
|
566 |
+
|
567 |
+
To clone the [`llama.cpp`](https://github.com/ggerganov/llama.cpp) repository, run the following command.
|
568 |
+
|
569 |
+
```bash
|
570 |
+
git clone git@github.com:ggerganov/llama.cpp.git
|
571 |
+
```
|
572 |
+
|
573 |
+
#### Step 2: Download Yi model
|
574 |
+
|
575 |
+
2.1 To clone [XeIaso/yi-chat-6B-GGUF](https://huggingface.co/XeIaso/yi-chat-6B-GGUF/tree/main) with just pointers, run the following command.
|
576 |
+
|
577 |
+
```bash
|
578 |
+
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/XeIaso/yi-chat-6B-GGUF
|
579 |
+
```
|
580 |
+
|
581 |
+
2.2 To download a quantized Yi model ([yi-chat-6b.Q2_K.gguf](https://huggingface.co/XeIaso/yi-chat-6B-GGUF/blob/main/yi-chat-6b.Q2_K.gguf)), run the following command.
|
582 |
+
|
583 |
+
```bash
|
584 |
+
git-lfs pull --include yi-chat-6b.Q2_K.gguf
|
585 |
+
```
|
586 |
+
|
587 |
+
#### Step 3: Perform inference
|
588 |
+
|
589 |
+
To perform inference with the Yi model, you can use one of the following methods.
|
590 |
+
|
591 |
+
- [Method 1: Perform inference in terminal](#method-1-perform-inference-in-terminal)
|
592 |
+
|
593 |
+
- [Method 2: Perform inference in web](#method-2-perform-inference-in-web)
|
594 |
+
|
595 |
+
##### Method 1: Perform inference in terminal
|
596 |
+
|
597 |
+
To compile `llama.cpp` using 4 threads and then conduct inference, navigate to the `llama.cpp` directory, and run the following command.
|
598 |
+
|
599 |
+
> ##### Tips
|
600 |
+
>
|
601 |
+
> - Replace `/Users/yu/yi-chat-6B-GGUF/yi-chat-6b.Q2_K.gguf` with the actual path of your model.
|
602 |
+
>
|
603 |
+
> - By default, the model operates in completion mode.
|
604 |
+
>
|
605 |
+
> - For additional output customization options (for example, system prompt, temperature, repetition penalty, etc.), run `./main -h` to check detailed descriptions and usage.
|
606 |
+
|
607 |
+
```bash
|
608 |
+
make -j4 && ./main -m /Users/yu/yi-chat-6B-GGUF/yi-chat-6b.Q2_K.gguf -p "How do you feed your pet fox? Please answer this question in 6 simple steps:\nStep 1:" -n 384 -e
|
609 |
+
|
610 |
+
...
|
611 |
+
|
612 |
+
How do you feed your pet fox? Please answer this question in 6 simple steps:
|
613 |
+
|
614 |
+
Step 1: Select the appropriate food for your pet fox. You should choose high-quality, balanced prey items that are suitable for their unique dietary needs. These could include live or frozen mice, rats, pigeons, or other small mammals, as well as fresh fruits and vegetables.
|
615 |
+
|
616 |
+
Step 2: Feed your pet fox once or twice a day, depending on the species and its individual preferences. Always ensure that they have access to fresh water throughout the day.
|
617 |
+
|
618 |
+
Step 3: Provide an appropriate environment for your pet fox. Ensure it has a comfortable place to rest, plenty of space to move around, and opportunities to play and exercise.
|
619 |
+
|
620 |
+
Step 4: Socialize your pet with other animals if possible. Interactions with other creatures can help them develop social skills and prevent boredom or stress.
|
621 |
+
|
622 |
+
Step 5: Regularly check for signs of illness or discomfort in your fox. Be prepared to provide veterinary care as needed, especially for common issues such as parasites, dental health problems, or infections.
|
623 |
+
|
624 |
+
Step 6: Educate yourself about the needs of your pet fox and be aware of any potential risks or concerns that could affect their well-being. Regularly consult with a veterinarian to ensure you are providing the best care.
|
625 |
+
|
626 |
+
...
|
627 |
+
|
628 |
+
```
|
629 |
+
|
630 |
+
Now you have successfully asked a question to the Yi model and got an answer! 🥳
|
631 |
+
|
632 |
+
##### Method 2: Perform inference in web
|
633 |
+
|
634 |
+
1. To initialize a lightweight and swift chatbot, run the following command.
|
635 |
+
|
636 |
+
```bash
|
637 |
+
cd llama.cpp
|
638 |
+
./server --ctx-size 2048 --host 0.0.0.0 --n-gpu-layers 64 --model /Users/yu/yi-chat-6B-GGUF/yi-chat-6b.Q2_K.gguf
|
639 |
+
```
|
640 |
+
|
641 |
+
Then you can get an output like this:
|
642 |
+
|
643 |
+
|
644 |
+
```bash
|
645 |
+
...
|
646 |
+
|
647 |
+
llama_new_context_with_model: n_ctx = 2048
|
648 |
+
llama_new_context_with_model: freq_base = 5000000.0
|
649 |
+
llama_new_context_with_model: freq_scale = 1
|
650 |
+
ggml_metal_init: allocating
|
651 |
+
ggml_metal_init: found device: Apple M2 Pro
|
652 |
+
ggml_metal_init: picking default device: Apple M2 Pro
|
653 |
+
ggml_metal_init: ggml.metallib not found, loading from source
|
654 |
+
ggml_metal_init: GGML_METAL_PATH_RESOURCES = nil
|
655 |
+
ggml_metal_init: loading '/Users/yu/llama.cpp/ggml-metal.metal'
|
656 |
+
ggml_metal_init: GPU name: Apple M2 Pro
|
657 |
+
ggml_metal_init: GPU family: MTLGPUFamilyApple8 (1008)
|
658 |
+
ggml_metal_init: hasUnifiedMemory = true
|
659 |
+
ggml_metal_init: recommendedMaxWorkingSetSize = 11453.25 MB
|
660 |
+
ggml_metal_init: maxTransferRate = built-in GPU
|
661 |
+
ggml_backend_metal_buffer_type_alloc_buffer: allocated buffer, size = 128.00 MiB, ( 2629.44 / 10922.67)
|
662 |
+
llama_new_context_with_model: KV self size = 128.00 MiB, K (f16): 64.00 MiB, V (f16): 64.00 MiB
|
663 |
+
ggml_backend_metal_buffer_type_alloc_buffer: allocated buffer, size = 0.02 MiB, ( 2629.45 / 10922.67)
|
664 |
+
llama_build_graph: non-view tensors processed: 676/676
|
665 |
+
llama_new_context_with_model: compute buffer total size = 159.19 MiB
|
666 |
+
ggml_backend_metal_buffer_type_alloc_buffer: allocated buffer, size = 156.02 MiB, ( 2785.45 / 10922.67)
|
667 |
+
Available slots:
|
668 |
+
-> Slot 0 - max context: 2048
|
669 |
+
|
670 |
+
llama server listening at http://0.0.0.0:8080
|
671 |
+
```
|
672 |
+
|
673 |
+
2. To access the chatbot interface, open your web browser and enter `http://0.0.0.0:8080` into the address bar.
|
674 |
+
|
675 |
+
![Yi model chatbot interface - llama.cpp](https://github.com/01-ai/Yi/blob/main/assets/img/yi_llama_cpp1.png?raw=true)
|
676 |
+
|
677 |
+
|
678 |
+
3. Enter a question, such as "How do you feed your pet fox? Please answer this question in 6 simple steps" into the prompt window, and you will receive a corresponding answer.
|
679 |
+
|
680 |
+
![Ask a question to Yi model - llama.cpp](https://github.com/01-ai/Yi/blob/main/assets/img/yi_llama_cpp2.png?raw=true)
|
681 |
+
|
682 |
+
</ul>
|
683 |
+
</details>
|
684 |
+
|
685 |
+
<p align="right"> [
|
686 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
687 |
+
</p>
|
688 |
+
|
689 |
+
### Web demo
|
690 |
+
|
691 |
+
You can build a web UI demo for Yi **chat** models (note that Yi base models are not supported in this senario).
|
692 |
+
|
693 |
+
[Step 1: Prepare your environment](#step-1-prepare-your-environment).
|
694 |
+
|
695 |
+
[Step 2: Download the Yi model](#step-2-download-the-yi-model).
|
696 |
+
|
697 |
+
Step 3. To start a web service locally, run the following command.
|
698 |
+
|
699 |
+
```bash
|
700 |
+
python demo/web_demo.py -c <your-model-path>
|
701 |
+
```
|
702 |
+
|
703 |
+
You can access the web UI by entering the address provided in the console into your browser.
|
704 |
+
|
705 |
+
![Quick start - web demo](https://github.com/01-ai/Yi/blob/main/assets/img/yi_34b_chat_web_demo.gif?raw=true)
|
706 |
+
|
707 |
+
<p align="right"> [
|
708 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
709 |
+
</p>
|
710 |
+
|
711 |
+
### Fine-tuning
|
712 |
+
|
713 |
+
```bash
|
714 |
+
bash finetune/scripts/run_sft_Yi_6b.sh
|
715 |
+
```
|
716 |
+
|
717 |
+
Once finished, you can compare the finetuned model and the base model with the following command:
|
718 |
+
|
719 |
+
```bash
|
720 |
+
bash finetune/scripts/run_eval.sh
|
721 |
+
```
|
722 |
+
<details style="display: inline;"><summary>For advanced usage (like fine-tuning based on your custom data), see the explanations below. ⬇️ </summary> <ul>
|
723 |
+
|
724 |
+
### Finetune code for Yi 6B and 34B
|
725 |
+
|
726 |
+
#### Preparation
|
727 |
+
|
728 |
+
##### From Image
|
729 |
+
|
730 |
+
By default, we use a small dataset from [BAAI/COIG](https://huggingface.co/datasets/BAAI/COIG) to finetune the base model.
|
731 |
+
You can also prepare your customized dataset in the following `jsonl` format:
|
732 |
+
|
733 |
+
```json
|
734 |
+
{ "prompt": "Human: Who are you? Assistant:", "chosen": "I'm Yi." }
|
735 |
+
```
|
736 |
+
|
737 |
+
And then mount them in the container to replace the default ones:
|
738 |
+
|
739 |
+
```bash
|
740 |
+
docker run -it \
|
741 |
+
-v /path/to/save/finetuned/model/:/finetuned-model \
|
742 |
+
-v /path/to/train.jsonl:/yi/finetune/data/train.json \
|
743 |
+
-v /path/to/eval.jsonl:/yi/finetune/data/eval.json \
|
744 |
+
ghcr.io/01-ai/yi:latest \
|
745 |
+
bash finetune/scripts/run_sft_Yi_6b.sh
|
746 |
+
```
|
747 |
+
|
748 |
+
##### From Local Server
|
749 |
+
|
750 |
+
Make sure you have conda. If not, use
|
751 |
+
|
752 |
+
```bash
|
753 |
+
mkdir -p ~/miniconda3
|
754 |
+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
|
755 |
+
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
|
756 |
+
rm -rf ~/miniconda3/miniconda.sh
|
757 |
+
~/miniconda3/bin/conda init bash
|
758 |
+
source ~/.bashrc
|
759 |
+
```
|
760 |
+
|
761 |
+
Then, create a conda env:
|
762 |
+
|
763 |
+
```bash
|
764 |
+
conda create -n dev_env python=3.10 -y
|
765 |
+
conda activate dev_env
|
766 |
+
pip install torch==2.0.1 deepspeed==0.10 tensorboard transformers datasets sentencepiece accelerate ray==2.7
|
767 |
+
```
|
768 |
+
|
769 |
+
#### Hardware Setup
|
770 |
+
|
771 |
+
For the Yi-6B model, a node with 4 GPUs, each has GPU mem larger than 60GB is recommended.
|
772 |
+
|
773 |
+
For the Yi-34B model, because the usage of zero-offload technique takes a lot CPU memory, please be careful to limit the GPU numbers in 34B finetune training. Please use CUDA_VISIBLE_DEVICES to limit the GPU number (as shown in scripts/run_sft_Yi_34b.sh).
|
774 |
+
|
775 |
+
A typical hardware setup for finetuning 34B model is a node with 8GPUS (limit to 4 in running by CUDA_VISIBLE_DEVICES=0,1,2,3), each has GPU mem larger than 80GB, with total CPU mem larger than 900GB.
|
776 |
+
|
777 |
+
#### Quick Start
|
778 |
+
|
779 |
+
Download a LLM-base model to MODEL_PATH (6B and 34B). A typical folder of models is like:
|
780 |
+
|
781 |
+
```bash
|
782 |
+
|-- $MODEL_PATH
|
783 |
+
| |-- config.json
|
784 |
+
| |-- pytorch_model-00001-of-00002.bin
|
785 |
+
| |-- pytorch_model-00002-of-00002.bin
|
786 |
+
| |-- pytorch_model.bin.index.json
|
787 |
+
| |-- tokenizer_config.json
|
788 |
+
| |-- tokenizer.model
|
789 |
+
| |-- ...
|
790 |
+
```
|
791 |
+
|
792 |
+
Download a dataset from huggingface to local storage DATA_PATH, e.g. Dahoas/rm-static.
|
793 |
+
|
794 |
+
```bash
|
795 |
+
|-- $DATA_PATH
|
796 |
+
| |-- data
|
797 |
+
| | |-- train-00000-of-00001-2a1df75c6bce91ab.parquet
|
798 |
+
| | |-- test-00000-of-00001-8c7c51afc6d45980.parquet
|
799 |
+
| |-- dataset_infos.json
|
800 |
+
| |-- README.md
|
801 |
+
```
|
802 |
+
|
803 |
+
`finetune/yi_example_dataset` has example datasets, which are modified from [BAAI/COIG](https://huggingface.co/datasets/BAAI/COIG)
|
804 |
+
|
805 |
+
```bash
|
806 |
+
|-- $DATA_PATH
|
807 |
+
|--data
|
808 |
+
|-- train.jsonl
|
809 |
+
|-- eval.jsonl
|
810 |
+
```
|
811 |
+
|
812 |
+
`cd` into the scripts folder, copy and paste the script, and run. For example:
|
813 |
+
|
814 |
+
```bash
|
815 |
+
cd finetune/scripts
|
816 |
+
|
817 |
+
bash run_sft_Yi_6b.sh
|
818 |
+
```
|
819 |
+
|
820 |
+
For the Yi-6B base model, setting training_debug_steps=20 and num_train_epochs=4 can output a chat model, which takes about 20 minutes.
|
821 |
+
|
822 |
+
For the Yi-34B base model, it takes a relatively long time for initialization. Please be patient.
|
823 |
+
|
824 |
+
#### Evaluation
|
825 |
+
|
826 |
+
```bash
|
827 |
+
cd finetune/scripts
|
828 |
+
|
829 |
+
bash run_eval.sh
|
830 |
+
```
|
831 |
+
|
832 |
+
Then you'll see the answer from both the base model and the finetuned model.
|
833 |
+
</ul>
|
834 |
+
</details>
|
835 |
+
|
836 |
+
<p align="right"> [
|
837 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
838 |
+
</p>
|
839 |
+
|
840 |
+
### Quantization
|
841 |
+
|
842 |
+
#### GPT-Q
|
843 |
+
```bash
|
844 |
+
python quantization/gptq/quant_autogptq.py \
|
845 |
+
--model /base_model \
|
846 |
+
--output_dir /quantized_model \
|
847 |
+
--trust_remote_code
|
848 |
+
```
|
849 |
+
|
850 |
+
Once finished, you can then evaluate the resulting model as follows:
|
851 |
+
|
852 |
+
```bash
|
853 |
+
python quantization/gptq/eval_quantized_model.py \
|
854 |
+
--model /quantized_model \
|
855 |
+
--trust_remote_code
|
856 |
+
```
|
857 |
+
|
858 |
+
<details style="display: inline;"><summary>For a more detailed explanation, see the explanations below. ⬇️</summary> <ul>
|
859 |
+
|
860 |
+
#### GPT-Q quantization
|
861 |
+
|
862 |
+
[GPT-Q](https://github.com/IST-DASLab/gptq) is a PTQ(Post-Training Quantization)
|
863 |
+
method. It's memory saving and provides potential speedups while retaining the accuracy
|
864 |
+
of the model.
|
865 |
+
|
866 |
+
Yi models can be GPT-Q quantized without a lot of efforts.
|
867 |
+
We provide a step-by-step tutorial below.
|
868 |
+
|
869 |
+
To run GPT-Q, we will use [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) and
|
870 |
+
[exllama](https://github.com/turboderp/exllama).
|
871 |
+
And the huggingface transformers has integrated optimum and auto-gptq to perform
|
872 |
+
GPTQ quantization on language models.
|
873 |
+
|
874 |
+
##### Do Quantization
|
875 |
+
|
876 |
+
The `quant_autogptq.py` script is provided for you to perform GPT-Q quantization:
|
877 |
+
|
878 |
+
```bash
|
879 |
+
python quant_autogptq.py --model /base_model \
|
880 |
+
--output_dir /quantized_model --bits 4 --group_size 128 --trust_remote_code
|
881 |
+
```
|
882 |
+
|
883 |
+
|
884 |
+
##### Run Quantized Model
|
885 |
+
|
886 |
+
You can run a quantized model using the `eval_quantized_model.py`:
|
887 |
+
|
888 |
+
```bash
|
889 |
+
python eval_quantized_model.py --model /quantized_model --trust_remote_code
|
890 |
+
```
|
891 |
+
</ul>
|
892 |
+
</details>
|
893 |
+
|
894 |
+
#### AWQ
|
895 |
+
```bash
|
896 |
+
python quantization/awq/quant_autoawq.py \
|
897 |
+
--model /base_model \
|
898 |
+
--output_dir /quantized_model \
|
899 |
+
--trust_remote_code
|
900 |
+
```
|
901 |
+
|
902 |
+
Once finished, you can then evaluate the resulting model as follows:
|
903 |
+
|
904 |
+
```bash
|
905 |
+
python quantization/awq/eval_quantized_model.py \
|
906 |
+
--model /quantized_model \
|
907 |
+
--trust_remote_code
|
908 |
+
```
|
909 |
+
<details style="display: inline;"><summary>For detailed explanations, see the explanations below. ⬇️</summary> <ul>
|
910 |
+
|
911 |
+
#### AWQ quantization
|
912 |
+
|
913 |
+
[AWQ](https://github.com/mit-han-lab/llm-awq) is a PTQ(Post-Training Quantization)
|
914 |
+
method. It's an efficient and accurate low-bit weight quantization (INT3/4) for LLMs.
|
915 |
+
|
916 |
+
Yi models can be AWQ quantized without a lot of efforts.
|
917 |
+
We provide a step-by-step tutorial below.
|
918 |
+
|
919 |
+
To run AWQ, we will use [AutoAWQ](https://github.com/casper-hansen/AutoAWQ).
|
920 |
+
|
921 |
+
##### Do Quantization
|
922 |
+
|
923 |
+
The `quant_autoawq.py` script is provided for you to perform AWQ quantization:
|
924 |
+
|
925 |
+
```bash
|
926 |
+
python quant_autoawq.py --model /base_model \
|
927 |
+
--output_dir /quantized_model --bits 4 --group_size 128 --trust_remote_code
|
928 |
+
```
|
929 |
+
|
930 |
+
##### Run Quantized Model
|
931 |
+
|
932 |
+
You can run a quantized model using the `eval_quantized_model.py`:
|
933 |
+
|
934 |
+
```bash
|
935 |
+
python eval_quantized_model.py --model /quantized_model --trust_remote_code
|
936 |
+
```
|
937 |
+
|
938 |
+
|
939 |
+
</ul>
|
940 |
+
</details>
|
941 |
+
<p align="right"> [
|
942 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
943 |
+
</p>
|
944 |
+
|
945 |
+
### Deployment
|
946 |
+
|
947 |
+
If you want to deploy Yi models, make sure you meet the software and hardware requirements.
|
948 |
+
|
949 |
+
#### Software requirements
|
950 |
+
|
951 |
+
Before using Yi quantized models, make sure you've installed the correct software listed below.
|
952 |
+
|
953 |
+
| Model | Software
|
954 |
+
|---|---
|
955 |
+
Yi 4-bit quantized models | [AWQ and CUDA](https://github.com/casper-hansen/AutoAWQ?tab=readme-ov-file#install-from-pypi)
|
956 |
+
Yi 8-bit quantized models | [GPTQ and CUDA](https://github.com/PanQiWei/AutoGPTQ?tab=readme-ov-file#quick-installation)
|
957 |
+
|
958 |
+
#### Hardware requirements
|
959 |
+
|
960 |
+
Before deploying Yi in your environment, make sure your hardware meets the following requirements.
|
961 |
+
|
962 |
+
##### Chat models
|
963 |
+
|
964 |
+
| Model | Minimum VRAM | Recommended GPU Example |
|
965 |
+
|:----------------------|:--------------|:-------------------------------------:|
|
966 |
+
| Yi-6B-Chat | 15 GB | 1 x RTX 3090 (24 GB) <br> 1 x RTX 4090 (24 GB) <br> 1 x A10 (24 GB) <br> 1 x A30 (24 GB) |
|
967 |
+
| Yi-6B-Chat-4bits | 4 GB | 1 x RTX 3060 (12 GB)<br> 1 x RTX 4060 (8 GB) |
|
968 |
+
| Yi-6B-Chat-8bits | 8 GB | 1 x RTX 3070 (8 GB) <br> 1 x RTX 4060 (8 GB) |
|
969 |
+
| Yi-34B-Chat | 72 GB | 4 x RTX 4090 (24 GB)<br> 1 x A800 (80GB) |
|
970 |
+
| Yi-34B-Chat-4bits | 20 GB | 1 x RTX 3090 (24 GB) <br> 1 x RTX 4090 (24 GB) <br> 1 x A10 (24 GB) <br> 1 x A30 (24 GB) <br> 1 x A100 (40 GB) |
|
971 |
+
| Yi-34B-Chat-8bits | 38 GB | 2 x RTX 3090 (24 GB) <br> 2 x RTX 4090 (24 GB)<br> 1 x A800 (40 GB) |
|
972 |
+
|
973 |
+
Below are detailed minimum VRAM requirements under different batch use cases.
|
974 |
+
|
975 |
+
| Model | batch=1 | batch=4 | batch=16 | batch=32 |
|
976 |
+
| ----------------------- | ------- | ------- | -------- | -------- |
|
977 |
+
| Yi-6B-Chat | 12 GB | 13 GB | 15 GB | 18 GB |
|
978 |
+
| Yi-6B-Chat-4bits | 4 GB | 5 GB | 7 GB | 10 GB |
|
979 |
+
| Yi-6B-Chat-8bits | 7 GB | 8 GB | 10 GB | 14 GB |
|
980 |
+
| Yi-34B-Chat | 65 GB | 68 GB | 76 GB | > 80 GB |
|
981 |
+
| Yi-34B-Chat-4bits | 19 GB | 20 GB | 30 GB | 40 GB |
|
982 |
+
| Yi-34B-Chat-8bits | 35 GB | 37 GB | 46 GB | 58 GB |
|
983 |
+
|
984 |
+
##### Base models
|
985 |
+
|
986 |
+
| Model | Minimum VRAM | Recommended GPU Example |
|
987 |
+
|----------------------|--------------|:-------------------------------------:|
|
988 |
+
| Yi-6B | 15 GB | 1 x RTX 3090 (24 GB) <br> 1 x RTX 4090 (24 GB) <br> 1 x A10 (24 GB) <br> 1 x A30 (24 GB) |
|
989 |
+
| Yi-6B-200K | 50 GB | 1 x A800 (80 GB) |
|
990 |
+
| Yi-9B | 20 GB | 1 x RTX 4090 (24 GB) |
|
991 |
+
| Yi-34B | 72 GB | 4 x RTX 4090 (24 GB) <br> 1 x A800 (80 GB) |
|
992 |
+
| Yi-34B-200K | 200 GB | 4 x A800 (80 GB) |
|
993 |
+
|
994 |
+
<p align="right"> [
|
995 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
996 |
+
</p>
|
997 |
+
|
998 |
+
### Learning hub
|
999 |
+
|
1000 |
+
<details>
|
1001 |
+
<summary> If you want to learn Yi, you can find a wealth of helpful educational resources here. ⬇️</summary>
|
1002 |
+
<br>
|
1003 |
+
|
1004 |
+
Welcome to the Yi learning hub!
|
1005 |
+
|
1006 |
+
Whether you're a seasoned developer or a newcomer, you can find a wealth of helpful educational resources to enhance your understanding and skills with Yi models, including insightful blog posts, comprehensive video tutorials, hands-on guides, and more.
|
1007 |
+
|
1008 |
+
The content you find here has been generously contributed by knowledgeable Yi experts and passionate enthusiasts. We extend our heartfelt gratitude for your invaluable contributions!
|
1009 |
+
|
1010 |
+
At the same time, we also warmly invite you to join our collaborative effort by contributing to Yi. If you have already made contributions to Yi, please don't hesitate to showcase your remarkable work in the table below.
|
1011 |
+
|
1012 |
+
With all these resources at your fingertips, you're ready to start your exciting journey with Yi. Happy learning! 🥳
|
1013 |
+
|
1014 |
+
#### Tutorials
|
1015 |
+
##### English tutorials
|
1016 |
+
| Type | Deliverable | Date | Author |
|
1017 |
+
|-------------|--------------------------------------------------------|----------------|----------------|
|
1018 |
+
| Video | [Run dolphin-2.2-yi-34b on IoT Devices](https://www.youtube.com/watch?v=NJ89T5mO25Y) | 2023-11-30 | [Second State](https://github.com/second-state) |
|
1019 |
+
| Blog | [Running Yi-34B-Chat locally using LlamaEdge](https://www.secondstate.io/articles/yi-34b/) | 2023-11-30 | [Second State](https://github.com/second-state) |
|
1020 |
+
| Video | [Install Yi 34B Locally - Chinese English Bilingual LLM](https://www.youtube.com/watch?v=CVQvj4Wrh4w&t=476s) | 2023-11-05 | [Fahd Mirza](https://www.youtube.com/@fahdmirza) |
|
1021 |
+
| Video | [Dolphin Yi 34b - Brand New Foundational Model TESTED](https://www.youtube.com/watch?v=On3Zuv27V3k&t=85s) | 2023-11-27 | [Matthew Berman](https://www.youtube.com/@matthew_berman) |
|
1022 |
+
|
1023 |
+
|
1024 |
+
##### Chinese tutorials
|
1025 |
+
| Type | Deliverable | Date | Author |
|
1026 |
+
|-------------|--------------------------------------------------------|----------------|----------------|
|
1027 |
+
| Blog | [实测零一万物Yi-VL多模态语言模型:能准确“识图吃瓜”](https://mp.weixin.qq.com/s/fu4O9XvJ03JhimsEyI-SsQ) | 2024-02-02 | [苏洋](https://github.com/soulteary) |
|
1028 |
+
| Blog | [本地运行零一万物 34B 大模型,使用 Llama.cpp & 21G 显存](https://zhuanlan.zhihu.com/p/668921042) | 2023-11-26 | [苏洋](https://github.com/soulteary) |
|
1029 |
+
| Blog | [零一万物模型折腾笔记:官方 Yi-34B 模型基础使用](https://zhuanlan.zhihu.com/p/671387298) | 2023-12-10 | [苏洋](https://github.com/soulteary) |
|
1030 |
+
| Blog | [CPU 混合推理,非常见大模型量化方案:“二三五六” 位量化方案](https://zhuanlan.zhihu.com/p/671698216) | 2023-12-12 | [苏洋](https://github.com/soulteary) |
|
1031 |
+
| Blog | [单卡 3 小时训练 Yi-6B 大模型 Agent:基于 Llama Factory 实战](https://zhuanlan.zhihu.com/p/678989191) | 2024-01-22 | [郑耀威](https://github.com/hiyouga) |
|
1032 |
+
| Blog | [零一万物开源Yi-VL多模态大模型,魔搭社区推理&微调最佳实践来啦!](https://zhuanlan.zhihu.com/p/680098411) | 2024-01-26 | [ModelScope](https://github.com/modelscope) |
|
1033 |
+
| Video | [只需 24G 显存,用 vllm 跑起来 Yi-34B 中英双语大模型](https://www.bilibili.com/video/BV17t4y1f7Ee/) | 2023-12-28 | [漆妮妮](https://space.bilibili.com/1262370256) |
|
1034 |
+
| Video | [Yi-VL-34B 多模态大模型 - 用两张 A40 显卡跑起来](https://www.bilibili.com/video/BV1Q5411y7AG/) | 2023-01-28 | [漆妮妮](https://space.bilibili.com/1262370256) |
|
1035 |
+
|
1036 |
+
</details>
|
1037 |
+
|
1038 |
+
|
1039 |
+
# Why Yi?
|
1040 |
+
|
1041 |
+
- [Ecosystem](#ecosystem)
|
1042 |
+
- [Upstream](#upstream)
|
1043 |
+
- [Downstream](#downstream)
|
1044 |
+
- [Serving](#serving)
|
1045 |
+
- [Quantization](#quantization-1)
|
1046 |
+
- [Fine-tuning](#fine-tuning-1)
|
1047 |
+
- [API](#api)
|
1048 |
+
- [Benchmarks](#benchmarks)
|
1049 |
+
- [Chat model performance](#chat-model-performance)
|
1050 |
+
- [Base model performance](#base-model-performance)
|
1051 |
+
- [Yi-34B and Yi-34B-200K](#yi-34b-and-yi-34b-200k)
|
1052 |
+
- [Yi-9B](#yi-9b)
|
1053 |
+
|
1054 |
+
## Ecosystem
|
1055 |
+
|
1056 |
+
Yi has a comprehensive ecosystem, offering a range of tools, services, and models to enrich your experiences and maximize productivity.
|
1057 |
+
|
1058 |
+
- [Upstream](#upstream)
|
1059 |
+
- [Downstream](#downstream)
|
1060 |
+
- [Serving](#serving)
|
1061 |
+
- [Quantization](#quantization-1)
|
1062 |
+
- [Fine-tuning](#fine-tuning-1)
|
1063 |
+
- [API](#api)
|
1064 |
+
|
1065 |
+
### Upstream
|
1066 |
+
|
1067 |
+
The Yi series models follow the same model architecture as Llama. By choosing Yi, you can leverage existing tools, libraries, and resources within the Llama ecosystem, eliminating the need to create new tools and enhancing development efficiency.
|
1068 |
+
|
1069 |
+
For example, the Yi series models are saved in the format of the Llama model. You can directly use `LlamaForCausalLM` and `LlamaTokenizer` to load the model. For more information, see [Use the chat model](#31-use-the-chat-model).
|
1070 |
+
|
1071 |
+
```python
|
1072 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
1073 |
+
|
1074 |
+
tokenizer = AutoTokenizer.from_pretrained("01-ai/Yi-34b", use_fast=False)
|
1075 |
+
|
1076 |
+
model = AutoModelForCausalLM.from_pretrained("01-ai/Yi-34b", device_map="auto")
|
1077 |
+
```
|
1078 |
+
|
1079 |
+
<p align="right"> [
|
1080 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
1081 |
+
</p>
|
1082 |
+
|
1083 |
+
### Downstream
|
1084 |
+
|
1085 |
+
> 💡 Tip
|
1086 |
+
>
|
1087 |
+
> - Feel free to create a PR and share the fantastic work you've built using the Yi series models.
|
1088 |
+
>
|
1089 |
+
> - To help others quickly understand your work, it is recommended to use the format of `<model-name>: <model-intro> + <model-highlights>`.
|
1090 |
+
|
1091 |
+
#### Serving
|
1092 |
+
|
1093 |
+
If you want to get up with Yi in a few minutes, you can use the following services built upon Yi.
|
1094 |
+
|
1095 |
+
- Yi-34B-Chat: you can chat with Yi using one of the following platforms:
|
1096 |
+
- [Yi-34B-Chat | Hugging Face](https://huggingface.co/spaces/01-ai/Yi-34B-Chat)
|
1097 |
+
- [Yi-34B-Chat | Yi Platform](https://platform.lingyiwanwu.com/): **Note** that currently it's available through a whitelist. Welcome to apply (fill out a form in [English](https://cn.mikecrm.com/l91ODJf) or [Chinese](https://cn.mikecrm.com/gnEZjiQ)) and experience it firsthand!
|
1098 |
+
|
1099 |
+
- [Yi-6B-Chat (Replicate)](https://replicate.com/01-ai): you can use this model with more options by setting additional parameters and calling APIs.
|
1100 |
+
|
1101 |
+
- [ScaleLLM](https://github.com/vectorch-ai/ScaleLLM#supported-models): you can use this service to run Yi models locally with added flexibility and customization.
|
1102 |
+
|
1103 |
+
#### Quantization
|
1104 |
+
|
1105 |
+
If you have limited computational capabilities, you can use Yi's quantized models as follows.
|
1106 |
+
|
1107 |
+
These quantized models have reduced precision but offer increased efficiency, such as faster inference speed and smaller RAM usage.
|
1108 |
+
|
1109 |
+
- [TheBloke/Yi-34B-GPTQ](https://huggingface.co/TheBloke/Yi-34B-GPTQ)
|
1110 |
+
- [TheBloke/Yi-34B-GGUF](https://huggingface.co/TheBloke/Yi-34B-GGUF)
|
1111 |
+
- [TheBloke/Yi-34B-AWQ](https://huggingface.co/TheBloke/Yi-34B-AWQ)
|
1112 |
+
|
1113 |
+
#### Fine-tuning
|
1114 |
+
|
1115 |
+
If you're seeking to explore the diverse capabilities within Yi's thriving family, you can delve into Yi's fine-tuned models as below.
|
1116 |
+
|
1117 |
+
- [TheBloke Models](https://huggingface.co/TheBloke): this site hosts numerous fine-tuned models derived from various LLMs including Yi.
|
1118 |
+
|
1119 |
+
This is not an exhaustive list for Yi, but to name a few sorted on downloads:
|
1120 |
+
- [TheBloke/dolphin-2_2-yi-34b-AWQ](https://huggingface.co/TheBloke/dolphin-2_2-yi-34b-AWQ)
|
1121 |
+
- [TheBloke/Yi-34B-Chat-AWQ](https://huggingface.co/TheBloke/Yi-34B-Chat-AWQ)
|
1122 |
+
- [TheBloke/Yi-34B-Chat-GPTQ](https://huggingface.co/TheBloke/Yi-34B-Chat-GPTQ)
|
1123 |
+
|
1124 |
+
- [SUSTech/SUS-Chat-34B](https://huggingface.co/SUSTech/SUS-Chat-34B): this model ranked first among all models below 70B and outperformed the twice larger deepseek-llm-67b-chat. You can check the result on the [Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard).
|
1125 |
+
|
1126 |
+
- [OrionStarAI/OrionStar-Yi-34B-Chat-Llama](https://huggingface.co/OrionStarAI/OrionStar-Yi-34B-Chat-Llama): this model excelled beyond other models (such as GPT-4, Qwen-14B-Chat, Baichuan2-13B-Chat) in C-Eval and CMMLU evaluations on the [OpenCompass LLM Leaderboard](https://opencompass.org.cn/leaderboard-llm).
|
1127 |
+
|
1128 |
+
- [NousResearch/Nous-Capybara-34B](https://huggingface.co/NousResearch/Nous-Capybara-34B): this model is trained with 200K context length and 3 epochs on the Capybara dataset.
|
1129 |
+
|
1130 |
+
#### API
|
1131 |
+
|
1132 |
+
- [amazing-openai-api](https://github.com/soulteary/amazing-openai-api): this tool converts Yi model APIs into the OpenAI API format out of the box.
|
1133 |
+
- [LlamaEdge](https://www.secondstate.io/articles/yi-34b/#create-an-openai-compatible-api-service-for-the-yi-34b-chat-model): this tool builds an OpenAI-compatible API server for Yi-34B-Chat using a portable Wasm (WebAssembly) file, powered by Rust.
|
1134 |
+
|
1135 |
+
<p align="right"> [
|
1136 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
1137 |
+
</p>
|
1138 |
+
|
1139 |
+
## Tech report
|
1140 |
+
|
1141 |
+
For detailed capabilities of the Yi series model, see [Yi: Open Foundation Models by 01.AI](https://arxiv.org/abs/2403.04652).
|
1142 |
+
|
1143 |
+
### Citation
|
1144 |
+
|
1145 |
+
```
|
1146 |
+
@misc{ai2024yi,
|
1147 |
+
title={Yi: Open Foundation Models by 01.AI},
|
1148 |
+
author={01. AI and : and Alex Young and Bei Chen and Chao Li and Chengen Huang and Ge Zhang and Guanwei Zhang and Heng Li and Jiangcheng Zhu and Jianqun Chen and Jing Chang and Kaidong Yu and Peng Liu and Qiang Liu and Shawn Yue and Senbin Yang and Shiming Yang and Tao Yu and Wen Xie and Wenhao Huang and Xiaohui Hu and Xiaoyi Ren and Xinyao Niu and Pengcheng Nie and Yuchi Xu and Yudong Liu and Yue Wang and Yuxuan Cai and Zhenyu Gu and Zhiyuan Liu and Zonghong Dai},
|
1149 |
+
year={2024},
|
1150 |
+
eprint={2403.04652},
|
1151 |
+
archivePrefix={arXiv},
|
1152 |
+
primaryClass={cs.CL}
|
1153 |
+
}
|
1154 |
+
```
|
1155 |
+
|
1156 |
+
## Benchmarks
|
1157 |
+
|
1158 |
+
- [Chat model performance](#-chat-model-performance)
|
1159 |
+
- [Base model performance](#-base-model-performance)
|
1160 |
+
|
1161 |
+
### Chat model performance
|
1162 |
+
|
1163 |
+
Yi-34B-Chat model demonstrates exceptional performance, ranking first among all existing open-source models in the benchmarks including MMLU, CMMLU, BBH, GSM8k, and more.
|
1164 |
+
|
1165 |
+
![Chat model performance](https://github.com/01-ai/Yi/blob/main/assets/img/benchmark_chat.png?raw=true)
|
1166 |
+
|
1167 |
+
<details>
|
1168 |
+
<summary> Evaluation methods and challenges. ⬇️ </summary>
|
1169 |
+
|
1170 |
+
- **Evaluation methods**: we evaluated various benchmarks using both zero-shot and few-shot methods, except for TruthfulQA.
|
1171 |
+
- **Zero-shot vs. few-shot**: in chat models, the zero-shot approach is more commonly employed.
|
1172 |
+
- **Evaluation strategy**: our evaluation strategy involves generating responses while following instructions explicitly or implicitly (such as using few-shot examples). We then isolate relevant answers from the generated text.
|
1173 |
+
- **Challenges faced**: some models are not well-suited to produce output in the specific format required by instructions in few datasets, which leads to suboptimal results.
|
1174 |
+
|
1175 |
+
<strong>*</strong>: C-Eval results are evaluated on the validation datasets
|
1176 |
+
</details>
|
1177 |
+
|
1178 |
+
### Base model performance
|
1179 |
+
|
1180 |
+
#### Yi-34B and Yi-34B-200K
|
1181 |
+
|
1182 |
+
The Yi-34B and Yi-34B-200K models stand out as the top performers among open-source models, especially excelling in MMLU, CMMLU, common-sense reasoning, reading comprehension, and more.
|
1183 |
+
|
1184 |
+
![Base model performance](https://github.com/01-ai/Yi/blob/main/assets/img/benchmark_base.png?raw=true)
|
1185 |
+
|
1186 |
+
<details>
|
1187 |
+
<summary> Evaluation methods. ⬇️</summary>
|
1188 |
+
|
1189 |
+
- **Disparity in results**: while benchmarking open-source models, a disparity has been noted between results from our pipeline and those reported by public sources like OpenCompass.
|
1190 |
+
- **Investigation findings**: a deeper investigation reveals that variations in prompts, post-processing strategies, and sampling techniques across models may lead to significant outcome differences.
|
1191 |
+
- **Uniform benchmarking process**: our methodology aligns with the original benchmarks—consistent prompts and post-processing strategies are used, and greedy decoding is applied during evaluations without any post-processing for the generated content.
|
1192 |
+
- **Efforts to retrieve unreported scores**: for scores that were not reported by the original authors (including scores reported with different settings), we try to get results with our pipeline.
|
1193 |
+
- **Extensive model evaluation**: to evaluate the model’s capability extensively, we adopted the methodology outlined in Llama2. Specifically, we included PIQA, SIQA, HellaSwag, WinoGrande, ARC, OBQA, and CSQA to assess common sense reasoning. SquAD, QuAC, and BoolQ were incorporated to evaluate reading comprehension.
|
1194 |
+
- **Special configurations**: CSQA was exclusively tested using a 7-shot setup, while all other tests were conducted with a 0-shot configuration. Additionally, we introduced GSM8K (8-shot@1), MATH (4-shot@1), HumanEval (0-shot@1), and MBPP (3-shot@1) under the category "Math & Code".
|
1195 |
+
- **Falcon-180B caveat**: Falcon-180B was not tested on QuAC and OBQA due to technical constraints. Its performance score is an average from other tasks, and considering the generally lower scores of these two tasks, Falcon-180B's capabilities are likely not underestimated.
|
1196 |
+
</details>
|
1197 |
+
|
1198 |
+
#### Yi-9B
|
1199 |
+
|
1200 |
+
Yi-9B is almost the best among a range of similar-sized open-source models (including Mistral-7B, SOLAR-10.7B, Gemma-7B, DeepSeek-Coder-7B-Base-v1.5 and more), particularly excelling in code, math, common-sense reasoning, and reading comprehension.
|
1201 |
+
|
1202 |
+
![Yi-9B benchmark - details](https://github.com/01-ai/Yi/blob/main/assets/img/Yi-9B_benchmark_details.png?raw=true)
|
1203 |
+
|
1204 |
+
- In terms of **overall** ability (Mean-All), Yi-9B performs the best among similarly sized open-source models, surpassing DeepSeek-Coder, DeepSeek-Math, Mistral-7B, SOLAR-10.7B, and Gemma-7B.
|
1205 |
+
|
1206 |
+
![Yi-9B benchmark - overall](https://github.com/01-ai/Yi/blob/main/assets/img/Yi-9B_benchmark_overall.png?raw=true)
|
1207 |
+
|
1208 |
+
- In terms of **coding** ability (Mean-Code), Yi-9B's performance is second only to DeepSeek-Coder-7B, surpassing Yi-34B, SOLAR-10.7B, Mistral-7B, and Gemma-7B.
|
1209 |
+
|
1210 |
+
![Yi-9B benchmark - code](https://github.com/01-ai/Yi/blob/main/assets/img/Yi-9B_benchmark_code.png?raw=true)
|
1211 |
+
|
1212 |
+
- In terms of **math** ability (Mean-Math), Yi-9B's performance is second only to DeepSeek-Math-7B, surpassing SOLAR-10.7B, Mistral-7B, and Gemma-7B.
|
1213 |
+
|
1214 |
+
![Yi-9B benchmark - math](https://github.com/01-ai/Yi/blob/main/assets/img/Yi-9B_benchmark_math.png?raw=true)
|
1215 |
+
|
1216 |
+
- In terms of **common sense and reasoning** ability (Mean-Text), Yi-9B's performance is on par with Mistral-7B, SOLAR-10.7B, and Gemma-7B.
|
1217 |
+
|
1218 |
+
![Yi-9B benchmark - text](https://github.com/01-ai/Yi/blob/main/assets/img/Yi-9B_benchmark_text.png?raw=true)
|
1219 |
+
|
1220 |
+
<p align="right"> [
|
1221 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
1222 |
+
</p>
|
1223 |
+
|
1224 |
+
# Who can use Yi?
|
1225 |
+
|
1226 |
+
Everyone! 🙌 ✅
|
1227 |
+
|
1228 |
+
- The Yi series models are free for personal usage, academic purposes, and commercial use. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt)
|
1229 |
+
|
1230 |
+
- For free commercial use, you only need to [complete this form](https://www.lingyiwanwu.com/yi-license) to get a Yi Model Commercial License.
|
1231 |
+
|
1232 |
+
<p align="right"> [
|
1233 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
1234 |
+
</p>
|
1235 |
+
|
1236 |
+
# Misc.
|
1237 |
+
|
1238 |
+
### Acknowledgments
|
1239 |
+
|
1240 |
+
A heartfelt thank you to each of you who have made contributions to the Yi community! You have helped Yi not just a project, but a vibrant, growing home for innovation.
|
1241 |
+
|
1242 |
+
[![yi contributors](https://contrib.rocks/image?repo=01-ai/yi&max=2000&columns=15)](https://github.com/01-ai/yi/graphs/contributors)
|
1243 |
+
|
1244 |
+
<p align="right"> [
|
1245 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
1246 |
+
</p>
|
1247 |
+
|
1248 |
+
### Disclaimer
|
1249 |
+
|
1250 |
+
We use data compliance checking algorithms during the training process, to
|
1251 |
+
ensure the compliance of the trained model to the best of our ability. Due to
|
1252 |
+
complex data and the diversity of language model usage scenarios, we cannot
|
1253 |
+
guarantee that the model will generate correct, and reasonable output in all
|
1254 |
+
scenarios. Please be aware that there is still a risk of the model producing
|
1255 |
+
problematic outputs. We will not be responsible for any risks and issues
|
1256 |
+
resulting from misuse, misguidance, illegal usage, and related misinformation,
|
1257 |
+
as well as any associated data security concerns.
|
1258 |
+
|
1259 |
+
<p align="right"> [
|
1260 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
1261 |
+
</p>
|
1262 |
+
|
1263 |
+
### License
|
1264 |
+
|
1265 |
+
The source code in this repo is licensed under the [Apache 2.0
|
1266 |
+
license](https://github.com/01-ai/Yi/blob/main/LICENSE). The Yi series models are fully open for academic research and free for commercial use, with automatic permission granted upon application. All usage must adhere to the [Yi Series Models Community License Agreement 2.1](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).
|
1267 |
+
For free commercial use, you only need to send an email to [get official commercial permission](https://www.lingyiwanwu.com/yi-license).
|
1268 |
+
|
1269 |
+
<p align="right"> [
|
1270 |
+
<a href="#top">Back to top ⬆️ </a> ]
|
1271 |
+
</p>
|
1272 |
+
|
1273 |
+
|
1274 |
+
***
|
1275 |
+
|
1276 |
+
Quantization of Model [01-ai/Yi-34B-200K](https://huggingface.co/01-ai/Yi-34B-200K).
|
1277 |
+
Created using [llm-quantizer](https://github.com/Nold360/llm-quantizer) Pipeline
|
Yi-34B-200K_Q3_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b2a53bdf3bdce684633462ee87e7077b7ddae17d3a4180c58ecbe6c006fc815c
|
3 |
+
size 16654923840
|
Yi-34B-200K_Q4_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1702a43ec08d1f7d7dfd17f3f5265ff45b2d148ed0f88fa739dcc4635bbc9621
|
3 |
+
size 20658710592
|
Yi-34B-200K_Q5_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f76296506b6e313b5dabc8c714463e24cc1e81524ad753ff9f961e8c7144a740
|
3 |
+
size 24321845312
|
Yi-34B-200K_Q6_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:89a89b9414b8998312680160c4b6c71a160bb17ffe78116b98bdb15847815240
|
3 |
+
size 28213925952
|
Yi-34B-200K_Q8_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b5ab3a0bbc1da53b1c785a99bbcf3fbf1d254c3ce52f6e096423a00d5f3ecf78
|
3 |
+
size 36542281792
|
test.log
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
What is a Large Language Model?
|
2 |
+
Large Language Models (LLMs) are neural network models trained on large amounts of text data. They have been shown to be capable of generating human-like text and performing various natural language processing tasks with high accuracy.
|