cArlIcon commited on
Commit
5f5a111
1 Parent(s): 672a9fb

update README

Browse files
Files changed (1) hide show
  1. README.md +126 -5
README.md CHANGED
@@ -1,5 +1,126 @@
1
- ---
2
- license: other
3
- license_name: yi-license
4
- license_link: LICENSE
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ <h1>
4
+ Yi
5
+ </h1>
6
+
7
+ <a href="https://github.com/01-ai/Yi/actions/workflows/ci.yml">
8
+ <img src="https://github.com/01-ai/Yi/actions/workflows/ci.yml/badge.svg">
9
+ </a>
10
+ <a href="https://huggingface.co/01-ai">
11
+ <img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-01--ai-blue">
12
+ </a>
13
+ <a href="https://www.modelscope.cn/organization/01ai/">
14
+ <img src="https://img.shields.io/badge/ModelScope-01--ai-blue">
15
+ </a>
16
+ <a href="https://github.com/01-ai/Yi/blob/main/LICENSE">
17
+ <img src="https://img.shields.io/github/license/01-ai/yi">
18
+ </a>
19
+
20
+ </div>
21
+
22
+ ## Introduction
23
+
24
+ The **Yi** series models are large language models trained from scratch by developers at [01.AI](https://01.ai/). The first public release contains two base models with the parameter size of 6B and 34B. Besides, a specialized version with **200K** context window size is also provided.
25
+
26
+ ## News
27
+
28
+ - 🎯 **2023/11/05**: The base model of `Yi-6B` and `Yi-34B` (with **200K** context window)
29
+
30
+ ## Model Performance
31
+
32
+ (FIXME)
33
+
34
+ ## Usage
35
+
36
+ ### 1. Download the model (optional)
37
+
38
+ By default the model weights and tokenizer will be downloaded from [HuggingFace](https://huggingface.co/01-ai) automatically in the next step. You can also download them manually from the following places:
39
+
40
+ - ModelScope (FIXME)
41
+ - Mirror site (remember to extra the content with `tar`)
42
+ - [Yi-6B.tar](https://01-ai.tos-cn-beijing.volces.com/yi/models/Yi-6B.tar)
43
+ - [Yi-34B.tar](https://01-ai.tos-cn-beijing.volces.com/yi/models/Yi-34B.tar)
44
+
45
+ ### 2. Run with docker
46
+
47
+ The recommended approach to try out our models is through docker. We provide the following docker images.
48
+
49
+ - `ghcr.io/01-ai/yi:latest`
50
+ - `ml-a100-cn-beijing.cr.volces.com/ci/01-ai/yi:latest`
51
+
52
+ Note that the `latest` tag always point to the latest code in the `main` branch. To test a stable version, please replace it with a specific [tag](https://github.com/01-ai/Yi/tags).
53
+
54
+ #### 2.1 Try out the base model:
55
+
56
+ ```bash
57
+ docker run -it ghcr.io/01-ai/yi:latest python demo/text_generation.py
58
+ ```
59
+
60
+ To reuse the downloaded models in the previous step, you can mount them into the container:
61
+
62
+ ```bash
63
+ docker run -it \
64
+ -v /path/to/model:/model \
65
+ ghcr.io/01-ai/yi:latest \
66
+ python demo/text_generation.py \
67
+ --model /model
68
+ ```
69
+
70
+ For more advanced usage, please refer the [doc](./demo/README.md).
71
+
72
+ #### 2.2 Finetuning from the base model:
73
+
74
+ ```bash
75
+ docker run -it \
76
+ -v /path/to/base/model:/base_model \
77
+ -v /path/to/save/finetuned/model:/finetuned_model \
78
+ ghcr.io/01-ai/yi:latest \
79
+ bash finetune/scripts/run_sft_Yi_6b.sh
80
+ ```
81
+
82
+ Once finished, you can compare the finetuned model and the base model with the following command:
83
+
84
+ ```bash
85
+ docker run -it \
86
+ -v /path/to/save/finetuned/model/:/finetuned_model \
87
+ -v /path/to/base/model/:/base_model \
88
+ ghcr.io/01-ai/yi:latest \
89
+ bash finetune/scripts/run_eval.sh
90
+ ```
91
+
92
+ For more advanced usage like fine-tuning based on your custom data, please refer the [doc](./finetune/README.md).
93
+
94
+ #### 2.3 Quantization
95
+
96
+ ```bash
97
+ docker run -it \
98
+ -v /path/to/base/model:/base_model \
99
+ -v /path/to/save/quantization/model:/quantized_model \
100
+ ghcr.io/01-ai/yi:latest \
101
+ python quantization/gptq/quant_autogptq.py \
102
+ --model /base_model \
103
+ --output_dir /quantized_model \
104
+ --trust_remote_code
105
+ ```
106
+
107
+ Once finished, you can then evaluate the resulted model as follows:
108
+
109
+ ```bash
110
+ docker run -it \
111
+ -v /path/to/save/quantization/model:/quantized_model \
112
+ ghcr.io/01-ai/yi:latest \
113
+ python quantization/gptq/eval_quantized_model.py \
114
+ --model /quantized_model \
115
+ --trust_remote_code
116
+ ```
117
+
118
+ For more detailed explanation, please read the [doc](./quantization/gptq/README.md)
119
+
120
+ ## Disclaimer
121
+
122
+ Although we use data compliance checking algorithms during the training process to ensure the compliance of the trained model to the best of our ability, due to the complexity of the data and the diversity of language model usage scenarios, we cannot guarantee that the model will generate correct and reasonable output in all scenarios. Please be aware that there is still a risk of the model producing problematic outputs. We will not be responsible for any risks and issues resulting from misuse, misguidance, illegal usage, and related misinformation, as well as any associated data security concerns.
123
+
124
+ ## License
125
+
126
+ The source code in this repo is licensed under the [Apache 2.0 license](./LICENSE). The Yi series model must be adhere to the [Model License Agreement](./MODEL_LICENSE_AGREEMENT.txt).