JeongwonChoi
commited on
Commit
β’
35798fa
1
Parent(s):
cc61ae3
Update README.md
Browse files
README.md
CHANGED
@@ -1,77 +1,111 @@
|
|
1 |
---
|
2 |
tags:
|
3 |
-
- text-generation
|
4 |
license: cc-by-nc-sa-4.0
|
5 |
language:
|
6 |
-
- ko
|
7 |
base_model: yanolja/KoSOLAR-10.7B-v0.1
|
8 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
9 |
---
|
10 |
|
11 |
# **DataVortexS-10.7B-dpo-v0.1**
|
12 |
-
<img src="./DataVortex.png" alt="DataVortex" style="height: 8em;">
|
13 |
-
|
14 |
-
## **License**
|
15 |
|
16 |
-
|
17 |
|
18 |
## **Model Details**
|
19 |
|
20 |
### **Base Model**
|
|
|
21 |
[yanolja/KoSOLAR-10.7B-v0.1](https://huggingface.co/yanolja/KoSOLAR-10.7B-v0.1) _(Tokenizer Issue Fixed Version)_
|
22 |
|
23 |
### **Trained On**
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
### **Instruction format**
|
27 |
|
28 |
-
It follows **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
## **Model Benchmark**
|
31 |
|
32 |
-
### **Ko-LLM-Leaderboard**
|
|
|
|
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
39 |
You can use the code below.
|
40 |
|
41 |
```python
|
42 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
43 |
|
44 |
-
device = "cuda"
|
45 |
|
46 |
-
model = AutoModelForCausalLM.from_pretrained("Edentns/DataVortexS-10.7B-dpo-v0.1"
|
47 |
tokenizer = AutoTokenizer.from_pretrained("Edentns/DataVortexS-10.7B-dpo-v0.1")
|
48 |
|
49 |
messages = [
|
50 |
-
{
|
|
|
|
|
|
|
51 |
]
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
decoded
|
61 |
-
input_ids=encoded,
|
62 |
-
temperature=0.2,
|
63 |
-
top_p=0.9,
|
64 |
-
repetition_penalty=1.2,
|
65 |
-
do_sample=True,
|
66 |
-
max_length=4096,
|
67 |
-
eos_token_id=tokenizer.eos_token_id,
|
68 |
-
pad_token_id=tokenizer.eos_token_id
|
69 |
-
)
|
70 |
-
decoded = decoded[0][encoded.shape[1]:decoded[0].shape[-1]]
|
71 |
-
decoded_text = tokenizer.decode(decoded, skip_special_tokens=True)
|
72 |
-
print(decoded_text)
|
73 |
```
|
74 |
|
|
|
|
|
|
|
|
|
75 |
<div align="center">
|
76 |
<a href="https://edentns.com/">
|
77 |
<img src="./Logo.png" alt="Logo" style="height: 3em;">
|
|
|
1 |
---
|
2 |
tags:
|
3 |
+
- text-generation
|
4 |
license: cc-by-nc-sa-4.0
|
5 |
language:
|
6 |
+
- ko
|
7 |
base_model: yanolja/KoSOLAR-10.7B-v0.1
|
8 |
pipeline_tag: text-generation
|
9 |
+
datasets:
|
10 |
+
- mncai/orca_dpo_pairs_ko
|
11 |
+
- Ja-ck/Orca-DPO-Pairs-KO
|
12 |
+
- We-Want-GPU/Yi-Ko-DPO-Orca-DPO-Pairs
|
13 |
---
|
14 |
|
15 |
# **DataVortexS-10.7B-dpo-v0.1**
|
|
|
|
|
|
|
16 |
|
17 |
+
<img src="./DataVortex.png" alt="DataVortex" style="height: 8em;">
|
18 |
|
19 |
## **Model Details**
|
20 |
|
21 |
### **Base Model**
|
22 |
+
|
23 |
[yanolja/KoSOLAR-10.7B-v0.1](https://huggingface.co/yanolja/KoSOLAR-10.7B-v0.1) _(Tokenizer Issue Fixed Version)_
|
24 |
|
25 |
### **Trained On**
|
26 |
+
|
27 |
+
- **OS**: Ubuntu 20.04
|
28 |
+
- **GPU**: H100 80GB 2ea
|
29 |
+
- **transformers**: v4.36.2
|
30 |
+
|
31 |
+
### **Dataset**
|
32 |
+
|
33 |
+
- [mncai/orca_dpo_pairs_ko](https://huggingface.co/datasets/mncai/orca_dpo_pairs_ko)
|
34 |
+
- [Ja-ck/Orca-DPO-Pairs-KO](https://huggingface.co/datasets/Ja-ck/Orca-DPO-Pairs-KO)
|
35 |
+
- [We-Want-GPU/Yi-Ko-DPO-Orca-DPO-Pairs](https://huggingface.co/datasets/We-Want-GPU/Yi-Ko-DPO-Orca-DPO-Pairs)
|
36 |
|
37 |
### **Instruction format**
|
38 |
|
39 |
+
It follows **Alpaca** format.
|
40 |
+
|
41 |
+
E.g.
|
42 |
+
|
43 |
+
```python
|
44 |
+
text = """\
|
45 |
+
λΉμ μ μ¬λλ€μ΄ μ 보λ₯Ό μ°Ύμ μ μλλ‘ λμμ£Όλ μΈκ³΅μ§λ₯ λΉμμ
λλ€.
|
46 |
+
|
47 |
+
### User:
|
48 |
+
λνλ―Όκ΅μ μλλ μ΄λμΌ?
|
49 |
+
|
50 |
+
### Assistant:
|
51 |
+
λνλ―Όκ΅μ μλλ μμΈμ
λλ€.
|
52 |
+
|
53 |
+
### User:
|
54 |
+
μμΈ μΈκ΅¬λ μ΄ λͺ λͺ
μ΄μΌ?
|
55 |
+
"""
|
56 |
+
```
|
57 |
|
58 |
## **Model Benchmark**
|
59 |
|
60 |
+
### **[Ko-LLM-Leaderboard](https://huggingface.co/spaces/upstage/open-ko-llm-leaderboard)**
|
61 |
+
|
62 |
+
On Benchmarking ...
|
63 |
|
64 |
+
| Model | Average | Ko-ARC | Ko-HellaSwag | Ko-MMLU | Ko-TruthfulQA | Ko-CommonGen V2 |
|
65 |
+
| ------------------------------ | ------- | ------ | ------------ | ------- | ------------- | --------------- |
|
66 |
+
| DataVortexM-7B-Instruct-v0.1 | 39.81 | 34.13 | 42.35 | 38.73 | 45.46 | 38.37 |
|
67 |
+
| DataVortexS-10.7B-v0.1 | 0 | 0 | 0 | 0 | 0 | 0 |
|
68 |
+
| DataVortexS-10.7B-v0.2 | 43.6 | 38.74 | 50.74 | 38.98 | 44.7 | 44.86 |
|
69 |
+
| DataVortexS-10.7B-v0.3 | 0 | 0 | 0 | 0 | 0 | 0 |
|
70 |
+
| DataVortexS-10.7B-v0.4 | 0 | 0 | 0 | 0 | 0 | 0 |
|
71 |
+
| DataVortexS-10.7B-v0.5 | 0 | 0 | 0 | 0 | 0 | 0 |
|
72 |
+
| DataVortexTL-1.1B-v0.1 | 0 | 0 | 0 | 0 | 0 | 0 |
|
73 |
+
| **DataVortexS-10.7B-dpo-v0.1** | **0** | **0** | **0** | **0** | **0** | 0 |
|
74 |
|
75 |
+
## **Implementation Code**
|
76 |
|
77 |
+
This model contains the chat_template instruction format.
|
78 |
You can use the code below.
|
79 |
|
80 |
```python
|
81 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
82 |
|
83 |
+
device = "cuda" # the device to load the model onto
|
84 |
|
85 |
+
model = AutoModelForCausalLM.from_pretrained("Edentns/DataVortexS-10.7B-dpo-v0.1")
|
86 |
tokenizer = AutoTokenizer.from_pretrained("Edentns/DataVortexS-10.7B-dpo-v0.1")
|
87 |
|
88 |
messages = [
|
89 |
+
{"role": "system", "content": "λΉμ μ μ¬λλ€μ΄ μ 보λ₯Ό μ°Ύμ μ μλλ‘ λμμ£Όλ μΈκ³΅μ§λ₯ λΉμμ
λλ€."},
|
90 |
+
{"role": "user", "content": "λνλ―Όκ΅μ μλλ μ΄λμΌ?"},
|
91 |
+
{"role": "assistant", "content": "λνλ―Όκ΅μ μλλ μμΈμ
λλ€."},
|
92 |
+
{"role": "user", "content": "μμΈ μΈκ΅¬λ μ΄ λͺ λͺ
μ΄μΌ?"}
|
93 |
]
|
94 |
|
95 |
+
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
|
96 |
+
|
97 |
+
model_inputs = encodeds.to(device)
|
98 |
+
model.to(device)
|
99 |
+
|
100 |
+
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
101 |
+
decoded = tokenizer.batch_decode(generated_ids)
|
102 |
+
print(decoded[0])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
```
|
104 |
|
105 |
+
## **License**
|
106 |
+
|
107 |
+
The model is licensed under the [cc-by-nc-sa-4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license, which allows others to copy, modify, and share the work non-commercially, as long as they give appropriate credit and distribute any derivative works under the same license.
|
108 |
+
|
109 |
<div align="center">
|
110 |
<a href="https://edentns.com/">
|
111 |
<img src="./Logo.png" alt="Logo" style="height: 3em;">
|