chenxingphh
commited on
Commit
•
74e266d
1
Parent(s):
6782937
Create README_en.md
Browse files- README_en.md +175 -0
README_en.md
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- markdownlint-disable first-line-h1 -->
|
2 |
+
<!-- markdownlint-disable html -->
|
3 |
+
![](./pics/orion_start.PNG)
|
4 |
+
|
5 |
+
<div align="center">
|
6 |
+
<h1>
|
7 |
+
OrionStar-Yi-34B-Chat
|
8 |
+
</h1>
|
9 |
+
</div>
|
10 |
+
|
11 |
+
<p align="center">
|
12 |
+
🤗 <a href="https://huggingface.co/OrionStarAI/OrionStar-Yi-34B-Chat" target="_blank">Hugging Face</a> |
|
13 |
+
<a href="https://github.com/OrionStarAI/OrionStar-Yi-34B-Chat" target="_blank">Github</a>
|
14 |
+
</p>
|
15 |
+
|
16 |
+
<div align="center">
|
17 |
+
|
18 |
+
|
19 |
+
<h4 align="center">
|
20 |
+
<p>
|
21 |
+
<b>English</b> |
|
22 |
+
<a href="https://huggingface.co/OrionStarAI/OrionStar-Yi-34B-Chat/blob/main/README.md">中文</a>
|
23 |
+
<p>
|
24 |
+
</h4>
|
25 |
+
|
26 |
+
</div>
|
27 |
+
|
28 |
+
# Table of Contents
|
29 |
+
|
30 |
+
- [📖 Model Introduction](#model-introduction)
|
31 |
+
- [📊 Model Inference 🔥](#model-inference)
|
32 |
+
- [👥 Example Output](#example-output)
|
33 |
+
- [🥇 Company Introduction](#company-introduction)
|
34 |
+
- [📜 Declarations, License](#declarations-license)
|
35 |
+
|
36 |
+
# Model Introduction
|
37 |
+
|
38 |
+
- OrionStar-Yi-34B-Chat from OrionStarAI is based on the open-source Yi-34B model, fine-tuned on a high-quality corpus
|
39 |
+
of over 15 million sentences. OrionStar-Yi-34B-Chat aims to provide an excellent interactive experience for users in
|
40 |
+
the large model community.
|
41 |
+
|
42 |
+
- The Yi series models, open-sourced by the 01-ai team, have shown impressive performance on various benchmarks in
|
43 |
+
Chinese, English, and general domains. OrionStar-Yi-34B-Chat further explores the potential of Yi-34B. Through
|
44 |
+
extensive fine-tuning on a large and high-quality corpus, OrionStar-Yi-34B-Chat performs exceptionally well on
|
45 |
+
evaluation data. We strive to make it an outstanding open-source alternative in the ChatGPT domain!
|
46 |
+
|
47 |
+
- Our fine-tuned model is completely open for academic research, but please adhere to the [agreement](#license) and
|
48 |
+
the [Yi License](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).
|
49 |
+
|
50 |
+
- Model Evaluation Results
|
51 |
+
|
52 |
+
We use [opencompass](https://opencompass.org.cn) to perform 5-shot on the following general domain datasets Testing.
|
53 |
+
The evaluation results of other models are taken
|
54 |
+
from [opencompass leaderboard](https://opencompass.org.cn/leaderboard-llm).
|
55 |
+
|
56 |
+
| | C-Eval | MMLU | CMMLU |
|
57 |
+
|---------------------------|--------|-------|-------|
|
58 |
+
| **GPT-4** | 69.9 | 83 | 71 |
|
59 |
+
| **ChatGPT** | 52.5 | 69.1 | 53.9 |
|
60 |
+
| **Claude-1** | 52 | 65.7 | - |
|
61 |
+
| **TigerBot-70B-Chat-V2** | 57.7 | 65.9 | 59.9 |
|
62 |
+
| **WeMix-LLaMA2-70B** | 55.2 | 71.3 | 56 |
|
63 |
+
| **LLaMA-2-70B-Chat** | 44.3 | 63.8 | 43.3 |
|
64 |
+
| **OrionStar-Yi-34B-Chat** | 77.71 | 78.32 | 73.52 |
|
65 |
+
|
66 |
+
# Model Inference
|
67 |
+
|
68 |
+
The relevant code required for inference has been published on Github. Github
|
69 |
+
link: [OrionStar-Yi-34B-Chat](https://github.com/OrionStarAI/OrionStar-Yi-34B-Chat)
|
70 |
+
|
71 |
+
## Python Code
|
72 |
+
|
73 |
+
```python
|
74 |
+
import torch
|
75 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
76 |
+
from transformers.generation.utils import GenerationConfig
|
77 |
+
|
78 |
+
tokenizer = AutoTokenizer.from_pretrained("OrionStarAI/OrionStar-Yi-34B-Chat", use_fast=False, trust_remote_code=True)
|
79 |
+
model = AutoModelForCausalLM.from_pretrained("OrionStarAI/OrionStar-Yi-34B-Chat", device_map="auto",
|
80 |
+
torch_dtype=torch.bfloat16, trust_remote_code=True)
|
81 |
+
|
82 |
+
model.generation_config = GenerationConfig.from_pretrained("OrionStarAI/OrionStar-Yi-34B-Chat")
|
83 |
+
messages = [{"role": "user", "content": "Hello, what is your name? "}]
|
84 |
+
response = model.chat(tokenizer, messages, streaming=False)
|
85 |
+
print(response)
|
86 |
+
|
87 |
+
# Hello, my name is ChatMax. Nice to meet you.
|
88 |
+
```
|
89 |
+
|
90 |
+
In the above Python code, the model is loaded with `device_map='auto'` to utilize all available GPUs. To specify the
|
91 |
+
device, you can use something like `export CUDA_VISIBLE_DEVICES=0,1` (using GPUs 0 and 1).
|
92 |
+
|
93 |
+
## Command Line Tool
|
94 |
+
|
95 |
+
```shell
|
96 |
+
python cli_demo.py
|
97 |
+
```
|
98 |
+
|
99 |
+
This command-line tool is designed for chat scenarios, and thus, it does not support calling the base model.
|
100 |
+
|
101 |
+
## Direct Script Inference
|
102 |
+
|
103 |
+
```shell
|
104 |
+
python text_generation.py --model OrionStarAI/OrionStar-Yi-34B-Chat --tokenizer OrionStarAI/OrionStar-Yi-34B-Chat --prompt 你好,你叫什么名字
|
105 |
+
```
|
106 |
+
|
107 |
+
# Example Output
|
108 |
+
|
109 |
+
## Casual Chat
|
110 |
+
|
111 |
+
`````
|
112 |
+
User: Hello, what is your name?
|
113 |
+
OrionStar-Yi-34B: Hello, my name is ChatMax. Nice to meet you.
|
114 |
+
User: What functions do you have?
|
115 |
+
OrionStar-Yi-34B: I am a versatile AI assistant. I can answer your questions, chat with you, help you look up information, provide life advice, and more.
|
116 |
+
User: Tell me a joke.
|
117 |
+
OrionStar-Yi-34B: Why is sausage always unhappy? Because it has no friends and can only be sandwiched between bread.
|
118 |
+
`````
|
119 |
+
|
120 |
+
## Mathematical Problem
|
121 |
+
|
122 |
+
`````
|
123 |
+
User: In a cage, there are chickens and rabbits with a total of 26 heads and 68 feet. So, how many chickens and how many rabbits are there?
|
124 |
+
OrionStar-Yi-34B: Let the number of chickens be x, and the number of rabbits be y.
|
125 |
+
According to the problem, we can derive the following two equations:
|
126 |
+
x + y = 26 (Total number of heads)
|
127 |
+
2x + 4y = 68 (Total number of feet)
|
128 |
+
Rewriting the first equation, we get y = 26 - x.
|
129 |
+
Substituting the value of y into the second equation, we get:
|
130 |
+
2x + 4(26 - x) = 68
|
131 |
+
Solving this equation, we find x = 18.
|
132 |
+
Therefore, there are 18 chickens and 26 - 18 = 8 rabbits.
|
133 |
+
`````
|
134 |
+
|
135 |
+
# Company Introduction
|
136 |
+
|
137 |
+
OrionStar is a leading global service robot solutions company, founded in September 2016. OrionStar is dedicated to
|
138 |
+
using artificial intelligence technology to create the next generation of revolutionary robots, allowing people to break
|
139 |
+
free from repetitive physical labor and making human work and life more intelligent and enjoyable. Through technology,
|
140 |
+
OrionStar aims to make society and the world a better place.
|
141 |
+
|
142 |
+
OrionStar possesses fully self-developed end-to-end artificial intelligence technologies, such as voice interaction and
|
143 |
+
visual navigation. It integrates product development capabilities and technological application capabilities. Based on
|
144 |
+
the Orion robotic arm platform, it has launched products such as OrionStar AI Robot Greeting, AI Robot Greeting Mini,
|
145 |
+
Lucki, Coffee Master, and established the open platform OrionOS for Orion robots. Following the philosophy of "Born for
|
146 |
+
Truly Useful Robots", OrionStar empowers more people through AI technology.
|
147 |
+
|
148 |
+
# Declarations, License
|
149 |
+
|
150 |
+
## Declarations
|
151 |
+
|
152 |
+
Hereby, we declare that our development team has not developed any applications based on the OrionStar-Yi-34B-Chat
|
153 |
+
model, whether on iOS, Android, the web, or any other platform. We strongly urge all users not to use the
|
154 |
+
OrionStar-Yi-34B-Chat model for any activities that may harm national or social security or violate the law.
|
155 |
+
Additionally, we request users not to use the OrionStar-Yi-34B-Chat model for internet services without proper security
|
156 |
+
review and filing.
|
157 |
+
We hope all users abide by this principle to ensure that technological development takes place in a regulated and legal
|
158 |
+
environment.
|
159 |
+
We have done our best to ensure the compliance of the data used in the model training process. However, despite our
|
160 |
+
significant efforts, unforeseen issues may still arise due to the complexity of the model and data. Therefore, if any
|
161 |
+
problems arise due to the use of the OrionStar-Yi-34B-Chat open-source model, including but not limited to data security
|
162 |
+
issues, public opinion risks, or any risks and issues arising from the model being misled, abused, disseminated, or
|
163 |
+
improperly utilized, we will not assume any responsibility.
|
164 |
+
|
165 |
+
## License
|
166 |
+
|
167 |
+
Community use of the OrionStar-Yi-34B-Chat model must comply with
|
168 |
+
the [Apache 2.0](https://github.com/OrionStarAI/OrionStar-Yi-34B-Chat/blob/main/LICENSE)
|
169 |
+
and [Yi-34B Model Community License Agreement](https://github.com/01-ai/Yi/blob/main/MODEL_LICENSE_AGREEMENT.txt).
|
170 |
+
|
171 |
+
# Contact Us
|
172 |
+
|
173 |
+
Email: [email protected]
|
174 |
+
|
175 |
+
WhatsApp Group: https://chat.whatsapp.com/J30ig8Dx4ja5jc0cfx2nVs
|