myeongho-jeong
commited on
Commit
β’
6712245
1
Parent(s):
7383911
Update README.md
Browse files
README.md
CHANGED
@@ -30,6 +30,43 @@ If you're passionate about the field of Large Language Models and wish to exchan
|
|
30 |
|
31 |
This model is a fine-tuned version of [yanolja/EEVE-Korean-10.8B-v1.0](https://huggingface.co/yanolja/EEVE-Korean-10.8B-v1.0), which is a Korean vocabulary-extended version of [upstage/SOLAR-10.7B-v1.0](https://huggingface.co/upstage/SOLAR-10.7B-v1.0). Specifically, we employed Direct Preference Optimization (DPO) based on [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory).
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
### Training Data
|
34 |
- Korean-translated version of [Open-Orca/SlimOrca-Dedup](https://huggingface.co/datasets/Open-Orca/SlimOrca-Dedup)
|
35 |
- Korean-translated version of [argilla/ultrafeedback-binarized-preferences-cleaned](https://huggingface.co/datasets/argilla/ultrafeedback-binarized-preferences-cleaned)
|
|
|
30 |
|
31 |
This model is a fine-tuned version of [yanolja/EEVE-Korean-10.8B-v1.0](https://huggingface.co/yanolja/EEVE-Korean-10.8B-v1.0), which is a Korean vocabulary-extended version of [upstage/SOLAR-10.7B-v1.0](https://huggingface.co/upstage/SOLAR-10.7B-v1.0). Specifically, we employed Direct Preference Optimization (DPO) based on [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory).
|
32 |
|
33 |
+
## Prompt Template
|
34 |
+
```
|
35 |
+
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
|
36 |
+
Human: {prompt}
|
37 |
+
Assistant:
|
38 |
+
```
|
39 |
+
## How to Use it
|
40 |
+
```python
|
41 |
+
from transformers import AutoTokenizer
|
42 |
+
from transformers import AutoModelForCausalLM
|
43 |
+
|
44 |
+
model = AutoModelForCausalLM.from_pretrained("yanolja/EEVE-Korean-Instruct-10.8B-v1.0")
|
45 |
+
tokenizer = AutoTokenizer.from_pretrained("yanolja/EEVE-Korean-Instruct-10.8B-v1.0")
|
46 |
+
|
47 |
+
prompt_template = "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\nHuman: {prompt}\nAssistant:\n"
|
48 |
+
text = 'νκ΅μ μλλ μ΄λμΈκ°μ? μλ μ νμ§ μ€ κ³¨λΌμ£ΌμΈμ.\n\n(A) κ²½μ±\n(B) λΆμ°\n(C) νμ\n(D) μμΈ\n(E) μ μ£Ό'
|
49 |
+
model_inputs = tokenizer(prompt_template.format(prompt=text), return_tensors='pt')
|
50 |
+
|
51 |
+
outputs = model.generate(**model_inputs, max_new_tokens=256)
|
52 |
+
output_text = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
|
53 |
+
print(output_text)
|
54 |
+
```
|
55 |
+
|
56 |
+
### Example Output
|
57 |
+
```
|
58 |
+
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
|
59 |
+
Human: νκ΅μ μλλ μ΄λμΈκ°μ? μλ μ νμ§ μ€ κ³¨λΌμ£ΌμΈμ.
|
60 |
+
|
61 |
+
(A) κ²½μ±
|
62 |
+
(B) λΆμ°
|
63 |
+
(C) νμ
|
64 |
+
(D) μμΈ
|
65 |
+
(E) μ μ£Ό
|
66 |
+
Assistant:
|
67 |
+
(D) μμΈμ΄ νκ΅μ μλμ
λλ€. μμΈμ λλΌμ λΆλλΆμ μμΉν΄ μμΌλ©°, μ μΉ, κ²½μ , λ¬Ένμ μ€μ¬μ§μ
λλ€. μ½ 1,000λ§ λͺ
μ΄ λλ μΈκ΅¬λ₯Ό κ°μ§ μΈκ³μμ κ°μ₯ ν° λμ μ€ νλμ
λλ€. μμΈμ λμ λΉλ©, νλμ μΈ μΈνλΌ, νκΈ° λ¬Έν μ₯λ©΄μΌλ‘ μ λͺ
ν©λλ€. λν, λ§μ μμ¬μ λͺ
μμ λ°λ¬Όκ΄μ΄ μμ΄ λ°©λ¬Έκ°λ€μκ² νλΆν λ¬Έν 체νμ μ 곡ν©λλ€.
|
68 |
+
```
|
69 |
+
|
70 |
### Training Data
|
71 |
- Korean-translated version of [Open-Orca/SlimOrca-Dedup](https://huggingface.co/datasets/Open-Orca/SlimOrca-Dedup)
|
72 |
- Korean-translated version of [argilla/ultrafeedback-binarized-preferences-cleaned](https://huggingface.co/datasets/argilla/ultrafeedback-binarized-preferences-cleaned)
|