cArlIcon commited on
Commit
994cf06
1 Parent(s): a7c6fc5

add meta data

Browse files
Files changed (1) hide show
  1. README.md +126 -0
README.md CHANGED
@@ -3,3 +3,129 @@ license: other
3
  license_name: yi-license
4
  license_link: LICENSE
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  license_name: yi-license
4
  license_link: LICENSE
5
  ---
6
+ <div align="center">
7
+
8
+ <h1>
9
+ Yi
10
+ </h1>
11
+
12
+ <a href="https://github.com/01-ai/Yi/actions/workflows/ci.yml">
13
+ <img src="https://github.com/01-ai/Yi/actions/workflows/ci.yml/badge.svg">
14
+ </a>
15
+ <a href="https://huggingface.co/01-ai">
16
+ <img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-01--ai-blue">
17
+ </a>
18
+ <a href="https://www.modelscope.cn/organization/01ai/">
19
+ <img src="https://img.shields.io/badge/ModelScope-01--ai-blue">
20
+ </a>
21
+ <a href="https://github.com/01-ai/Yi/blob/main/LICENSE">
22
+ <img src="https://img.shields.io/github/license/01-ai/yi">
23
+ </a>
24
+
25
+ </div>
26
+
27
+ ## Introduction
28
+
29
+ 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.
30
+
31
+ ## News
32
+
33
+ - 🎯 **2023/11/05**: The base model of `Yi-6B` and `Yi-34B` (with **200K** context window)
34
+
35
+ ## Model Performance
36
+
37
+ (FIXME)
38
+
39
+ ## Usage
40
+
41
+ ### 1. Download the model (optional)
42
+
43
+ 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:
44
+
45
+ - ModelScope (FIXME)
46
+ - Mirror site (remember to extra the content with `tar`)
47
+ - [Yi-6B.tar](https://01-ai.tos-cn-beijing.volces.com/yi/models/Yi-6B.tar)
48
+ - [Yi-34B.tar](https://01-ai.tos-cn-beijing.volces.com/yi/models/Yi-34B.tar)
49
+
50
+ ### 2. Run with docker
51
+
52
+ The recommended approach to try out our models is through docker. We provide the following docker images.
53
+
54
+ - `ghcr.io/01-ai/yi:latest`
55
+ - `ml-a100-cn-beijing.cr.volces.com/ci/01-ai/yi:latest`
56
+
57
+ 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).
58
+
59
+ #### 2.1 Try out the base model:
60
+
61
+ ```bash
62
+ docker run -it ghcr.io/01-ai/yi:latest python demo/text_generation.py
63
+ ```
64
+
65
+ To reuse the downloaded models in the previous step, you can mount them into the container:
66
+
67
+ ```bash
68
+ docker run -it \
69
+ -v /path/to/model:/model \
70
+ ghcr.io/01-ai/yi:latest \
71
+ python demo/text_generation.py \
72
+ --model /model
73
+ ```
74
+
75
+ For more advanced usage, please refer the [doc](./demo/README.md).
76
+
77
+ #### 2.2 Finetuning from the base model:
78
+
79
+ ```bash
80
+ docker run -it \
81
+ -v /path/to/base/model:/base_model \
82
+ -v /path/to/save/finetuned/model:/finetuned_model \
83
+ ghcr.io/01-ai/yi:latest \
84
+ bash finetune/scripts/run_sft_Yi_6b.sh
85
+ ```
86
+
87
+ Once finished, you can compare the finetuned model and the base model with the following command:
88
+
89
+ ```bash
90
+ docker run -it \
91
+ -v /path/to/save/finetuned/model/:/finetuned_model \
92
+ -v /path/to/base/model/:/base_model \
93
+ ghcr.io/01-ai/yi:latest \
94
+ bash finetune/scripts/run_eval.sh
95
+ ```
96
+
97
+ For more advanced usage like fine-tuning based on your custom data, please refer the [doc](./finetune/README.md).
98
+
99
+ #### 2.3 Quantization
100
+
101
+ ```bash
102
+ docker run -it \
103
+ -v /path/to/base/model:/base_model \
104
+ -v /path/to/save/quantization/model:/quantized_model \
105
+ ghcr.io/01-ai/yi:latest \
106
+ python quantization/gptq/quant_autogptq.py \
107
+ --model /base_model \
108
+ --output_dir /quantized_model \
109
+ --trust_remote_code
110
+ ```
111
+
112
+ Once finished, you can then evaluate the resulted model as follows:
113
+
114
+ ```bash
115
+ docker run -it \
116
+ -v /path/to/save/quantization/model:/quantized_model \
117
+ ghcr.io/01-ai/yi:latest \
118
+ python quantization/gptq/eval_quantized_model.py \
119
+ --model /quantized_model \
120
+ --trust_remote_code
121
+ ```
122
+
123
+ For more detailed explanation, please read the [doc](./quantization/gptq/README.md)
124
+
125
+ ## Disclaimer
126
+
127
+ 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.
128
+
129
+ ## License
130
+
131
+ 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).