Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- text-generation
|
| 4 |
+
license: cc-by-nc-4.0
|
| 5 |
+
language:
|
| 6 |
+
- ko
|
| 7 |
+
base_model: Edentns/DataVortexS-10.7B-dpo-v1.11
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
## **Model Details**
|
| 13 |
+
|
| 14 |
+
### **Base Model**
|
| 15 |
+
|
| 16 |
+
[Edentns/DataVortexS-10.7B-dpo-v1.11](https://huggingface.co/Edentns/DataVortexS-10.7B-dpo-v1.11)
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
### **Trained On**
|
| 20 |
+
|
| 21 |
+
- **GPU**: A100 80GB 8ea
|
| 22 |
+
|
| 23 |
+
### **Instruction format**
|
| 24 |
+
|
| 25 |
+
It follows **Alpaca (Chat)** format.
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
## **Implementation Code**
|
| 30 |
+
|
| 31 |
+
This model contains the chat_template instruction format.
|
| 32 |
+
You can use the code below.
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 36 |
+
|
| 37 |
+
device = "cuda" # the device to load the model onto
|
| 38 |
+
|
| 39 |
+
model = AutoModelForCausalLM.from_pretrained("Raphael21/Raphael21-SOLAR-10.7B")
|
| 40 |
+
tokenizer = AutoTokenizer.from_pretrained("Raphael21/Raphael21-SOLAR-10.7B")
|
| 41 |
+
|
| 42 |
+
messages = [
|
| 43 |
+
{"role": "system", "content": "๋น์ ์ ์ฌ๋๋ค์ด ์ ๋ณด๋ฅผ ์ฐพ์ ์ ์๋๋ก ๋์์ฃผ๋ ์ธ๊ณต์ง๋ฅ ๋น์์
๋๋ค."},
|
| 44 |
+
{"role": "user", "content": "์ด์์ ์ฅ๊ตฐ์ ๋ํด ์ค๋ช
ํด์ค"},
|
| 45 |
+
]
|
| 46 |
+
|
| 47 |
+
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
|
| 48 |
+
|
| 49 |
+
model_inputs = encodeds.to(device)
|
| 50 |
+
model.to(device)
|
| 51 |
+
|
| 52 |
+
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
| 53 |
+
decoded = tokenizer.batch_decode(generated_ids)
|
| 54 |
+
print(decoded[0])
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## **License**
|
| 58 |
+
|
| 59 |
+
This model is licensed under the [cc-by-nc-4.0](https://creativecommons.org/licenses/by-nc/4.0/). which allows others to share and adapt the model for non-commercial purposes.
|
| 60 |
+
|
| 61 |
+
|