Update README.md
Browse files
README.md
CHANGED
@@ -1,201 +1,186 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
library_name: transformers
|
3 |
-
|
4 |
---
|
5 |
|
6 |
-
#
|
7 |
|
8 |
-
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
|
|
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
- **Developed by:** [More Information Needed]
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
-
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
-
|
36 |
-
## Uses
|
37 |
-
|
38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
-
|
40 |
-
### Direct Use
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
-
|
46 |
-
### Downstream Use [optional]
|
47 |
-
|
48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
-
|
72 |
-
Use the code below to get started with the model.
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Training Details
|
77 |
-
|
78 |
-
### Training Data
|
79 |
-
|
80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
|
107 |
-
|
108 |
|
109 |
-
|
110 |
|
111 |
-
|
112 |
|
113 |
-
|
114 |
|
115 |
-
|
116 |
|
117 |
-
|
118 |
|
119 |
-
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
124 |
|
125 |
-
|
126 |
|
127 |
-
|
128 |
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
|
135 |
-
|
136 |
|
137 |
-
|
138 |
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
-
|
142 |
|
143 |
-
|
|
|
144 |
|
145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
|
153 |
-
|
154 |
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
-
|
158 |
|
159 |
-
|
160 |
|
161 |
-
|
162 |
|
163 |
-
|
164 |
|
165 |
-
|
166 |
|
167 |
-
|
168 |
|
169 |
-
|
170 |
|
171 |
-
|
172 |
|
173 |
-
|
|
|
|
|
174 |
|
175 |
-
**
|
176 |
|
177 |
-
|
|
|
|
|
|
|
178 |
|
179 |
-
**
|
180 |
|
181 |
-
|
|
|
|
|
|
|
|
|
182 |
|
183 |
-
|
184 |
|
185 |
-
|
|
|
|
|
|
|
|
|
186 |
|
187 |
-
|
188 |
|
189 |
-
##
|
190 |
|
191 |
-
|
192 |
|
193 |
-
##
|
194 |
|
195 |
-
|
196 |
|
197 |
-
##
|
198 |
|
199 |
-
|
200 |
|
|
|
201 |
|
|
|
|
1 |
---
|
2 |
+
extra_gated_heading: Access beomi/Yi-Ko-34B on Hugging Face
|
3 |
+
extra_gated_button_content: Submit
|
4 |
+
extra_gated_fields:
|
5 |
+
I agree to share my name, email address and username: checkbox
|
6 |
+
I confirm that I understand this project is for research purposes only, and confirm that I agree to follow the LICENSE of this model: checkbox
|
7 |
+
language:
|
8 |
+
- en
|
9 |
+
- ko
|
10 |
+
pipeline_tag: text-generation
|
11 |
+
inference: false
|
12 |
+
tags:
|
13 |
+
- pytorch
|
14 |
+
- Yi-Ko
|
15 |
+
- 01-ai
|
16 |
+
- Yi
|
17 |
library_name: transformers
|
18 |
+
license: cc-by-nc-sa-4.0
|
19 |
---
|
20 |
|
21 |
+
# **beomi/Yi-Ko-34B-Chat-Preview**
|
22 |
|
23 |
+
This repo is naive ChatVector applied using these 3 models:
|
24 |
|
25 |
+
```python
|
26 |
+
ko_model_id = 'beomi/Yi-Ko-34B-dev'
|
27 |
+
chat_model = '01-ai/Yi-34B-Chat'
|
28 |
+
base_model = '01-ai/Yi-34B'
|
29 |
+
```
|
30 |
|
31 |
+
## Samples
|
32 |
|
33 |
+
```python
|
34 |
+
messages = [
|
35 |
+
{"role": "system", "content": "์น์ ํ ์ฑ๋ด์ผ๋ก์ ์๋๋ฐฉ์ ์์ฒญ์ ์ต๋ํ ์์ธํ๊ณ ์น์ ํ๊ฒ ๋ตํ์. ๋ชจ๋ ๋๋ต์ ํ๊ตญ์ด(Korean)์ผ๋ก ๋๋ตํด์ค."},
|
36 |
+
{"role": "user", "content": "ํ๊ตญ์ ์ ํ ํ๋ฒ์ ๋ํด์ ์์ธํ ์ค๋ช
ํด์ฃผ์ธ์."},
|
37 |
+
]
|
38 |
+
---
|
39 |
+
ํ๊ตญ์ ํ๋ฒ์ ใ๋ํ๋ฏผ๊ตญ ํ๋ฒใ์ด๋ผ๊ณ ๋ถ๋ฅด๋ฉฐ, ์ฐ๋ฆฌ๋๋ผ์ ๊ธฐ๋ณธ๋ฒ์ด๋ค. ์ด ํ๋ฒ์ 1948๋
7์ 12์ผ์ ์ ์ ๋๊ณ 8์ 15์ผ์ ๊ณตํฌ๋์์ผ๋ฉฐ, ์ดํ ์ฌ๋ฌ ์ฐจ๋ก ๊ฐ์ ์ด ์์ด ์๋ค. ํ๋ฒ์ ๋ชฉ์ ์ ํ๊ตญ์ ๊ธฐ๋ณธ์ ๊ฐ์น์ ํต์น ์์คํ
, ๊ตญ๋ฏผ์ ๊ถ๋ฆฌ์ ์๋ฌด๋ฅผ ๊ท์ ํ๊ณ ์๋ค.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
ํ๊ตญ ํ๋ฒ์ ์ฃผ์ ๋ด์ฉ์ ๋ค์๊ณผ ๊ฐ๋ค.
|
42 |
|
43 |
+
1. ๊ธฐ๋ณธ๊ถ ๋ณด์ฅ: ํ๋ฒ์ ๊ตญ๋ฏผ์ ๊ธฐ๋ณธ๊ถ์ ๋ณด์ฅํ๊ณ ์๋ค. ํํ์ ์์ , ์ ์์ ์์ , ๊ต์ก์ ์์ , ํ๋์ ์์ , ๊ฑฐ์ฃผ์ด์ ์ ์์ , ์ฒดํฌยท์์ฌยท์ฌํ์ ๋ํ ๊ถ๋ฆฌ๋ฅผ ๋ณด์ฅํ๊ณ ์๋ค.
|
44 |
|
45 |
+
2. ํ๋ฑ: ๋ชจ๋ ๊ตญ๋ฏผ์ ๋ฒ ์์ ํ๋ฑํ๋ค๊ณ ๊ท์ ํ๊ณ ์๋ค.
|
46 |
|
47 |
+
3. ๊ตญ๋ฏผํฌํ: ์ค์ ์ ์ฑ
์ด๋ ๊ตญ๊ฐ ์์ ์ ๊ดํ ์ฌํญ์ ๋ํด์๋ ๊ตญ๋ฏผํฌํ๋ฅผ ๊ฑฐ์น ์ ์๋๋ก ํ๊ณ ์๋ค.
|
48 |
|
49 |
+
4. ์ฌ๋ฒ์ฒด๊ณ: ํ๊ตญ์ ์ผ๊ถ๋ถ๋ฆฝ ์ ๋๋ฅผ ์ฑํํ๊ณ ์์ด, ํ์ ๋ถ(์ ๋ถ), ์
๋ฒ๋ถ(๊ตญํ), ์ฌ๋ฒ๋ถ(๋ฒ์)๊ฐ ์๋ก์ ๊ธฐ๋ฅ์ ๊ฒฌ์ ํ๋ฉฐ ์๋ํ๋ค.
|
50 |
|
51 |
+
5. ๋ํต๋ น์ค์ฌ์ : ํ๊ตญ์ ๋ํต๋ น์ค์ฌ์ ๋ก, ๋ํต๋ น์ ๊ตญ๊ฐ์ ์๋ฐ์ด๋ฉฐ ํ๋ฒ์์ ๊ถํ์ ๊ฐ์ง๋ค.
|
52 |
|
53 |
+
6. ๋ฏผ์ฃผ์ฃผ์ ์ ์ฐจ: ์ ๋น, ์ ๊ฑฐ, ๊ทธ๋ฆฌ๊ณ ๊ตญ๋ฏผ๋ํ๊ธฐ๊ด์ธ ๊ตญํ๋ฅผ ํตํด ๋ฏผ์ฃผ์ฃผ์๊ฐ ์ด์๋๋ค.
|
54 |
|
55 |
+
7. ํต์ผ์ ์ฑ
: ํ๋ฒ์ ํต์ผ์ ๋ํ ๊ตญ๊ฐ์ ๋
ธ๋ ฅ์ ๊ท์ ํ๊ณ ์์ผ๋ฉฐ, ๋ถํ์ ์ฃผ๋ฏผ์ ์ฐ๋ฆฌ์ ๋ํฌ๋ก ๊ท์ ํ๊ณ ์ธ๋์ ์ง์์ ํ ์ ์๋๋ก ํ๊ณ ์๋ค.
|
56 |
|
57 |
+
8. ์ฌ๋ฒ๊ถ ๋
๋ฆฝ: ์ฌ๋ฒ๋ถ๋ ํ๋ฒ๊ณผ ๋ฒ๋ฅ ์ ๋ฐ๋ผ ๋
๋ฆฝ์ ์ผ๋ก ์ฌํ๊ถ์ ํ์ฌํ๋ค.
|
58 |
|
59 |
+
9. ๊ฒฝ์ ์ ์ฑ
: ๊ฒฝ์ ์ง์๋ฅผ ๊ธฐ๋ณธ์ ์ผ๋ก ์์ ์์ฅ๊ฒฝ์ ์ ์ํด ์ ์งํ๋, ๊ตญ๊ฐ๋ ๊ท ํ ์๋ ๊ตญ๋ฏผ๊ฒฝ์ ์ ์ฑ์ฅ๊ณผ ์์ ๋ฐ ๊ณต์ ํ ๋ถ๋ฐฐ๋ฅผ ์ํด ๋
ธ๋ ฅํด์ผ ํ๋ค๋ ์ ์ด ๋ช
์๋์ด ์๋ค.
|
60 |
|
61 |
+
10. ํ๊ฒฝ๋ณดํธ: ์ธ๊ฐ๋ค์ด ์ํ์ ์ ์งํ๊ณ ์์ฐ๊ณผ ์ญ์ฌ์์ ์ฐ์ ๋ณดํธํ๊ณ ๊ด๋ฆฌํด์ผ ํ๋ค๋ ์ ๋ ํ๋ฒ์ ๊ธฐ์ฌ๋์ด ์๋ค.
|
62 |
|
63 |
+
ํ๊ตญ์ ํ๋ฒ์ ์ด๋ฌํ ๊ธฐ๋ณธ ๊ฐ๋
์ ๋ฐํ์ผ๋ก ํ๊ตญ์ ์ ์นยท๊ฒฝ์ ยท์ฌํ์ ๊ธฐ๋ณธ์ง์์ ๊ตญ๋ฏผ์ํ์ ๊ธฐ๋ณธ์๋ฆฌ๋ฅผ ์ ํ๊ณ ์์ผ๋ฉฐ, ๊ตญ๋ฏผ๋ค์ ๊ธฐ๋ณธ๊ถ์ ๋ณดํธํ๋ ๋ฐ ์ค์ํ ์ญํ ์ ํ๊ณ ์๋ค.<|im_end|>
|
64 |
+
์ 1ํญ ๋ํ๋ฏผ๊ตญ์ ๋ฏผ์ฃผ๊ณตํ๊ตญ์ด๋ค.
|
65 |
+
์ 3ํญ ๋ํ๋ฏผ๊ตญ์ ์ฃผ๊ถ์ ๊ตญ๋ฏผ์๊ฒ ์๊ณ , ๋ชจ๋ ๊ถ๋ ฅ์
|
66 |
+
์ 5ํญ ๊ตญ๋ฏผ์ ๋ฒ ์์ ํ๋ฑํ๋ค.
|
67 |
+
์ 6ํญ ๋ชจ๋ ๊ตญ๋ฏผ์ ์ธ๊ฐ๋ค์ด ์ํ์ ํ ๊ถ๋ฆฌ๋ฅผ ๊ฐ์ง๋ค.<|im_end|>
|
68 |
+
```
|
69 |
|
70 |
+
```python
|
71 |
+
messages = [
|
72 |
+
{"role": "system", "content": "์น์ ํ ์ฑ๋ด์ผ๋ก์ ์๋๋ฐฉ์ ์์ฒญ์ ์ต๋ํ ์์ธํ๊ณ ์น์ ํ๊ฒ ๋ตํ์. ๋ชจ๋ ๋๋ต์ ํ๊ตญ์ด(Korean)์ผ๋ก ๋๋ตํด์ค."},
|
73 |
+
{"role": "user", "content": "์ด์์ ์ฅ๊ตฐ์ ๋ํด ์ค๋ช
ํด์ค."},
|
74 |
+
]
|
75 |
+
---
|
76 |
+
์ด์์ ์ฅ๊ตฐ์ ์กฐ์ ์๋์ ํ์ฝํ ์ ๋ช
ํ ์์ง์๋์ ์ ๋ต๊ฐ์. ๊ทธ๊ฐ ํ์ฝํ ์๊ธฐ๋ 16์ธ๊ธฐ ๋ง์ด์์ผ๋ฉฐ, ์ด๋๋ ์ผ๋ณธ์ด ์กฐ์ ์ ์นจ๋ตํ๋ ์์ง์๋์ด ๋ฐ๋ฐํ ๋์
๋๋ค. ์ด์์ ์ฅ๊ตฐ์ ์ด๋ ์ผ๋ณธ์ ํด๊ตฐ์ผ๋ก ๊ตฌ์ฑ๋ ๊ตฐ๋๊ฐ ์กฐ์ ์ ๊ณต๊ฒฉํ์, ์กฐ์ ์ ํด๊ตฐ์์ ํ์ฝํ๋ฉฐ ์ผ๋ณธ์ ์๋ํ์ต๋๋ค. ์ ๋ช
ํ ํด์ ์ธ 'ํ์ฐ๋๋์ฒฉ'๊ณผ '๋ช
๋๋์ฒฉ'์์ ์ด์์ ์ฅ๊ตฐ์ ๋ฐ์ด๋ ์ ๋ต๊ณผ ์ฉ๊ธฐ๋ก ์ผ๋ณธ์ ์๋๋ก ํฌ๊ฒ ์น๋ฆฌํ๋ ๋ฑ ์กฐ์ ์ ์๊ธฐ์์ ๊ตฌํ ์ค์ํ ์ธ๋ฌผ๋ก ํ๊ฐ๋ฐ๊ณ ์์ต๋๋ค. ๊ทธ์ ์ฉ๊ธฐ์ ์ง๋ต์ ํ์ฌ๊น์ง๋ ๋ง์ ์ฌ๋๋ค์ ๊ท๊ฐ์ผ๋ก ์ ํด์ง๊ณ ์์ต๋๋ค<|im_end|>
|
77 |
+
```
|
78 |
+
|
79 |
+
```python
|
80 |
+
messages = [
|
81 |
+
{"role": "system", "content": "์น์ ํ ์ฑ๋ด์ผ๋ก์ ์๋๋ฐฉ์ ์์ฒญ์ ์ต๋ํ ์์ธํ๊ณ ์น์ ํ๊ฒ ๋ตํ์. ๋ชจ๋ ๋๋ต์ ํ๊ตญ์ด(Korean)์ผ๋ก ๋๋ตํด์ค."},
|
82 |
+
{"role": "user", "content": "๋
๋์ ๋ค์ผ์๋ง์ ์ฐจ์ด๊ฐ ๋ญ์ผ?"},
|
83 |
+
]
|
84 |
+
---
|
85 |
+
"๋
๋"์ "๋ค์ผ์๋ง"๋ ๋์ผํ ์ฌ์ ๊ฐ๋ฆฌํค๋ ์ด๋ฆ์ด์ง๋ง ์๋ก ๋ค๋ฅธ ๋๋ผ์ ์ธ์ด๋ก ๋ถ๋ฆฌ๊ณ ์์ต๋๋ค. "๋
๋"๋ ๋ํ๋ฏผ๊ตญ ์ด๋ก "็จๅณถ"๋ผ๊ณ ๋ถ๋ฅด๋ฉฐ, "๋ค์ผ์๋ง"๋ ์ผ๋ณธ ์ด๋ก "็ซนๅณถ"๋ผ๊ณ ๋ถ๋ฆ
๋๋ค. ์ด ์ฌ์ ์ผ๋ณธ ๋ํ ๋ฆฌํ๊ณผ ์ฌ์นด์ด๋ฏธ๋ํ ์์ ์ธ์ ํ ์ผ๋ณธ์ ๊ฐ๊น์ด ๊ณณ์ ์์นํด ์์ง๋ง, ๊ตญ์ ๋ฒ์ ์ผ๋ก ๋ํ๋ฏผ๊ตญ์ ์ํ ๋ก ์ธ์ ๋ฐ๊ณ ์์ต๋๋ค.
|
86 |
|
87 |
+
๋ํ๋ฏผ๊ตญ์ ์ด ์ฌ์ ๋
๋๋ก ์นญํ๋ฉฐ ์ญ์ฌ์ ์ผ๋ก๋ถํฐOwnership๋ฅผ ์ฃผ์ฅํ๊ณ ์์ต๋๋ค. ์ญ์ฌ์ ๊ธฐ๋ก์ ๋ฐ๋ฅด๋ฉด ๋
๋๋ ์กฐ์ ์๋์ ์ด๋ฏธ ํ๊ตญ์ ์ํ ๋ก ์ธ์๋์๊ณ , ์ผ๋ณธ ์ ๊ตญ์ฃผ์ ์์ ์ ์ ์ ๊ดํ ๊ถ์ ์ํ๋ค๊ฐ ์ผ๋ณธ์ด ํจ์ ํ ์ดํ ๋ํ๋ฏผ๊ตญ ์ํ ๋ก ํ์๋์์ต๋๋ค.
|
88 |
|
89 |
+
์ผ๋ณธ์ ์ด ์ฌ์ ๋ค์ผ์๋ง๋ก ์นญํ๋ฉฐ ์์ ๊ถ์ ์ฃผ์ฅํ๊ณ ์์ต๋๋ค. ํ์ง๋ง, ์ด๋ฌํ ์ฃผ์ฅ์ ๊ตญ์ ๋ฒ์ ์ธ์ ๋์ง ์์ผ๋ฉฐ, ํ๊ตญ ์ ๋ถ๋ ๋
๋๋ฅผ ๋ํ๋ฏผ๊ตญ์ ์ํ ๋ก์ ์ ๋์ ์ธ ๊ถ๋ฆฌ๋ฅผ ๊ฐ์ง๊ณ ์์์ ๋ถ๋ช
ํ ํ๊ณ ์์ต๋๋ค.
|
90 |
|
91 |
+
๊ฒฐ๋ก ์ ์ผ๋ก, "๋
๋"์ "๋ค์ผ์๋ง"๋ ๋์ผํ ์ฌ์ ๊ฐ๋ฆฌํค์ง๋ง, ์๋ก ๋ค๋ฅธ ๊ตญ๊ฐ์ ์ญ์ฌ์ ์ด๊ณ ์ ์น์ ์ํฉ์ ๋ฐ๋ผ ๋ถ๋ฅด๋ ์ด๋ฆ์ด ๋ค๋ฅด๋ฉฐ, ๊ตญ์ ๋ฒ์ ์ด ์ฌ์ ๋ํ๋ฏผ๊ตญ์ ์ํ ๋ก ๋ถ๋ฅ๋๊ณ ์์ต๋๋ค.<|im_end|>
|
92 |
|
93 |
+
```
|
94 |
|
95 |
+
```python
|
96 |
+
messages = [
|
97 |
+
{"role": "system", "content": "์น์ ํ ์ฑ๋ด์ผ๋ก์ ์๋๋ฐฉ์ ์์ฒญ์ ์ต๋ํ ์์ธํ๊ณ ์น์ ํ๊ฒ ๋ตํ์. ๏ฟฝ๏ฟฝ๋ ๋๋ต์ ํ๊ตญ์ด(Korean)์ผ๋ก ๋๋ตํด์ค."},
|
98 |
+
{"role": "user", "content": "์ธ์ข
๋์์ ์งํ์ ๋งฅ๋ถ ๋์ง ์ฌ๊ฑด์ ๋ํด์ ์๊ณ ์์ด?"},
|
99 |
+
]
|
100 |
+
---
|
101 |
+
์ธ์ข
๋์์ ์งํ์ ๋งฅ๋ถ ๋์ง ์ฌ๊ฑด์ ๋ํด ๋ค์ด๋ณธ ์ ์ด ์์ต๋๋ค. ์ด ์ฌ๊ฑด์ 2017๋
ํ ๋ฐฉ์ก์ฌ์ ๋๋ผ๋ง์์ ๋ฑ์ฅํ๋ฉฐ ๋๋ฆฌ ์๋ ค์ก๋๋ฐ์, ๋๋ผ๋ง์์๋ ์งํ์ ํ์๋ค์ด ์๋ก์ด ๋ฌธ๋ฌผ์ธ ๋งฅ๋ถ์ ๋ณด๊ณ ์ธ์ข
๋์์ด ์ด๋ฅผ ๋์ง ๊ฒ์ผ๋ก ๋ฌ์ฌ๋์ด ๋
ผ๋์ด ๋์์ต๋๋ค.
|
102 |
|
103 |
+
ํ์ง๋ง ์ด ๋ด์ฉ์ ์ญ์ฌ์ ์ฌ์ค๊ณผ ๋ค๋ฅด๋ค๋ ๊ฒ์ด ๋ฐํ์ก์ต๋๋ค. ์งํ์ ํ์๋ค์ด ์ค์ ๋ก ๋งฅ๋ถ๊ณผ ๊ฐ์ ์ธ๊ณ ๋ฌธ๋ฌผ์ ๋ชฉ๊ฒฉํ์ ๋ฆฌ ์๊ณ , ์ธ์ข
๋์์ด ํ์๋ค์ ๋
ธ๋ ฅ์ ํํํ๊ฑฐ๋ ๋ฌผ๊ฑด์ ๋์ง๋ ํ๋์ ํ์ ๊ฒ์ด๋ผ๋ ์ ์ ์ ๋ฌธ์ ๊ฐ ์์์ต๋๋ค. ์คํ๋ ค ์ธ์ข
๋์์ ์๋ช
ํ์ ์ค๋ฆฝํ๊ณ ํ๊ธ์ ์ฐฝ์ ํ๋ ๋ฑ ํ๋ฌธ๊ณผ ๋ฌธํ์ ๋ํ ์ง์์ ์๊น์ง ์์๋ ๊ฒ์ผ๋ก ์๋ ค์ ธ ์์ต๋๋ค.
|
104 |
|
105 |
+
๋๋ผ๋ง ์์ ๋ฑ์ฅํ ์ฌ๊ฑด์ ํ๊ตฌ์ ์ธ ์ค์ ์ผ๋ฟ, ์ค์ ์ญ์ฌ์์ ์ผ์ด๋ ์ผ์ ์๋๋๋ค. ์ด๋ฌํ ์ค๋ฅ๋ฅผ ๋ฐ์ํ๋ฏ, ์ดํ์ ๋ฐฉ์ก์์๋ ํด๋น ์ฅ๋ฉด์ด ์์ ๋๊ฑฐ๋ ์ญ์ ๋์์ต๋๋ค.<|im_end|>
|
106 |
+
```
|
107 |
|
108 |
+
```python
|
109 |
+
messages = [
|
110 |
+
{"role": "system", "content": "์น์ ํ ์ฑ๋ด์ผ๋ก์ ์๋๋ฐฉ์ ์์ฒญ์ ์ต๋ํ ์์ธํ๊ณ ์น์ ํ๊ฒ ๋ตํ์. ๋ชจ๋ ๋๋ต์ ํ๊ตญ์ด(Korean)์ผ๋ก ๋๋ตํด์ค."},
|
111 |
+
{"role": "user", "content": "๋๋ ์ค๋ ์ฌ๊ณผ 5๊ฐ๋ฅผ ๊ฐ๊ณ ์์ด. ๊ทธ๋ฆฌ๊ณ ์ด์ ๋๋ ์ฌ๊ณผ 2๊ฐ๋ฅผ ๋จน์์ง. ๋ด๊ฐ ์ง๊ธ ๊ฐ์ง ์ฌ๊ณผ๋ ๋ช ๊ฐ์ง?"},
|
112 |
+
]
|
113 |
+
---
|
114 |
+
์ง๋ ๋ฒ์๋ ์ฌ๊ณผ 2๊ฐ๋ฅผ ๋จน์๊ณ , ์ง๊ธ์ ์ฌ๊ณผ 5๊ฐ๋ฅผ ๊ฐ๊ณ ์๋ค๊ณ ํ์ผ๋, ์ง๊ธ ๊ฐ์ง ์ฌ๊ณผ์ ๊ฐ์๋ 5๊ฐ์
๋๋ค. ๊ทธ๋ฐ๋ฐ, ์ฌ๊ณผ 2๊ฐ๋ฅผ ๋จน์ด์ ์ด ์ฌ๊ณผ๋ฅผ 5๊ฐ์์ 2๊ฐ ๋นผ๋ฉด, ๋จ์ ์ฌ๊ณผ์ ๊ฐ์๋ 5 - 2 = 3๊ฐ์
๋๋ค. ๊ทธ๋ฌ๋๊น, ์ง๊ธ ๊ฐ์ง ์ฌ๊ณผ๋ 3๊ฐ์
๋๋ค.<|im_end|>
|
115 |
+
```
|
116 |
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
+
# beomi/Yi-Ko-34B-Preview
|
119 |
|
120 |
+
Yi-Ko series models serve as advanced iterations of 01-ai/Yi models,
|
121 |
+
benefiting from an expanded vocabulary and the inclusion of Korean/English corpus in its further pretraining.
|
122 |
+
Just like its predecessor, Yi-Ko series models operate within the broad range of generative text models that stretch from 6 billion to 34 billion parameters.
|
123 |
+
This repository focuses on the **34B** pretrained version,
|
124 |
+
which is tailored to fit the Hugging Face Transformers format.
|
125 |
+
For access to the other models, feel free to consult the index provided below.
|
126 |
|
127 |
+
## Model Details
|
128 |
|
129 |
+
**Model Developers** Junbum Lee (Beomi)
|
130 |
|
131 |
+
**Variations** Yi-Ko-34B will come in a range of parameter sizes โ 6B and 34B โ with Ko(Korean Only)/KoEn(Korean+English)/KoEnCo(Korean+English+Code) variations.
|
132 |
|
133 |
+
**Input** Models input text only.
|
134 |
|
135 |
+
**Output** Models generate text only.
|
136 |
|
137 |
+
**Model Architecture**
|
138 |
|
139 |
+
Yi-Ko series models are an auto-regressive language model that uses an optimized transformer architecture based on Llama-2*.
|
140 |
|
141 |
+
<small>*Yi model architecture is based on Llama2, so it can be loaded via `LlamaForCausalLM` class on HF.</small>
|
142 |
|
143 |
+
|Model Name|Training Data|Params|Context Length|GQA|Trained Tokens|LR|Batch Size(per step)|
|
144 |
+
|---|---|---|---|---|---|---|---|
|
145 |
+
|Yi-Ko-34B|*A mix of Korean + English online data*|34B|4k|O|TBD(under training)|5e<sup>-5</sup>|2048|
|
146 |
|
147 |
+
**Vocab Expansion**
|
148 |
|
149 |
+
| Model Name | Vocabulary Size | Description |
|
150 |
+
| --- | --- | --- |
|
151 |
+
| Original Yi-Series | 64000 | Sentencepiece BPE |
|
152 |
+
| **Expanded Yi-Ko Series** | 78464 | Sentencepiece BPE. Added Korean vocab and merges |
|
153 |
|
154 |
+
**Tokenizing "์๋
ํ์ธ์, ์ค๋์ ๋ ์จ๊ฐ ์ข๋ค์.ใ
ใ
"**
|
155 |
|
156 |
+
| Model | # of tokens | Tokens |
|
157 |
+
| --- | --- | --- |
|
158 |
+
| Original Yi-Series | 47 | `['<0xEC>', '<0x95>', '<0x88>', '<0xEB>', '<0x85>', '<0x95>', 'ํ', '<0xEC>', '<0x84>', '<0xB8>', '<0xEC>', '<0x9A>', '<0x94>', ',', 'โ', '<0xEC>', '<0x98>', '<0xA4>', '<0xEB>', '<0x8A>', '<0x98>', '์', 'โ', '<0xEB>', '<0x82>', '<0xA0>', '<0xEC>', '<0x94>', '<0xA8>', '๊ฐ', 'โ', '<0xEC>', '<0xA2>', '<0x8B>', '<0xEB>', '<0x84>', '<0xA4>', '<0xEC>', '<0x9A>', '<0x94>', '.', '<0xE3>', '<0x85>', '<0x8E>', '<0xE3>', '<0x85>', '<0x8E>']` |
|
159 |
+
| **Expanded Yi-Ko Series** | 10 | `['โ์๋
', 'ํ์ธ์', ',', 'โ์ค๋์', 'โ๋ ', '์จ๊ฐ', 'โ์ข๋ค์', '.', 'ใ
', 'ใ
']` |
|
160 |
+
|<small>*Equal Korean vocab with Llama-2-Ko Series</small>||
|
161 |
|
162 |
+
**Tokenizing "Llama 2: Open Foundation and Fine-Tuned Chat Models"**
|
163 |
|
164 |
+
| Model | # of tokens | Tokens |
|
165 |
+
| --- | --- | --- |
|
166 |
+
| Original Yi-Series | 21 | `['The', 'โY', 'i', 'โseries', 'โmodels', 'โare', 'โlarge', 'โlanguage', 'โmodels', 'โtrained', 'โfrom', 'โscratch', 'โby', 'โdevelopers', 'โat', 'โ', '0', '1', '.', 'AI', '.']` |
|
167 |
+
| **Expanded Yi-Ko Series** | 21 | `['โThe', 'โY', 'i', 'โseries', 'โmodels', 'โare', 'โlarge', 'โlanguage', 'โmodels', 'โtrained', 'โfrom', 'โscratch', 'โby', 'โdevelopers', 'โat', 'โ', '0', '1', '.', 'AI', '.']` |
|
168 |
+
|<small>*Equal Korean vocab with Llama-2-Ko Series</small>| | <small>*Since **Expanded Yi-Ko Series** prepends `_` at the beginning of the text(to ensure same tokenization for Korean sentences), it shows negilible difference for the first token on English tokenization. </small>|
|
169 |
|
170 |
+
# **Model Benchmark**
|
171 |
|
172 |
+
## LM Eval Harness - Korean (polyglot branch)
|
173 |
|
174 |
+
TBD
|
175 |
|
176 |
+
## LICENSE
|
177 |
|
178 |
+
CC-BY-NC-SA-4.0 under Yi license
|
179 |
|
180 |
+
## Citation
|
181 |
|
182 |
+
TBD
|
183 |
|
184 |
+
## Acknowledgement
|
185 |
|
186 |
+
The training is supported by [TPU Research Cloud](https://sites.research.google/trc/) program.
|