Update README.md
Browse files
README.md
CHANGED
@@ -1,4 +1,53 @@
|
|
1 |
---
|
2 |
license: cc-by-sa-4.0
|
3 |
---
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc-by-sa-4.0
|
3 |
---
|
4 |
+
|
5 |
+
# **koOpenChat-sftπ§**
|
6 |
+
|
7 |
+
## Support Me
|
8 |
+
μλνΈλΌλ κ°μΈ νλ‘μ νΈλ‘, 1μΈμ μμμΌλ‘ κ°λ°λκ³ μμ΅λλ€. λͺ¨λΈμ΄ λ§μμ λμ
¨λ€λ©΄ μ½κ°μ μ°κ΅¬λΉ μ§μμ μ΄λ¨κΉμ?
|
9 |
+
[<img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy me a Coffee" width="217" height="50">](https://www.buymeacoffee.com/mwell)
|
10 |
+
|
11 |
+
Wanna be a sponser? (Please) Contact me on Telegram **AlzarTakkarsen**
|
12 |
+
|
13 |
+
|
14 |
+
# **Model Details**
|
15 |
+
**Base Model**
|
16 |
+
OpenChat3.5
|
17 |
+
|
18 |
+
**Trained On**
|
19 |
+
A100 80GB * 1
|
20 |
+
|
21 |
+
**Instruction format**
|
22 |
+
|
23 |
+
It follows [ChatML](https://github.com/openai/openai-python/blob/main/chatml.md) format and **Alpaca(No-Input)** format.
|
24 |
+
|
25 |
+
# **Model Benchmark**
|
26 |
+
None
|
27 |
+
|
28 |
+
# **Implementation Code**
|
29 |
+
|
30 |
+
Since, chat_template already contains insturction format above.
|
31 |
+
You can use the code below.
|
32 |
+
|
33 |
+
```python
|
34 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
35 |
+
|
36 |
+
device = "cuda" # the device to load the model onto
|
37 |
+
|
38 |
+
model = AutoModelForCausalLM.from_pretrained("maywell/koOpenChat-sft")
|
39 |
+
tokenizer = AutoTokenizer.from_pretrained("maywell/koOpenChat-sft")
|
40 |
+
|
41 |
+
messages = [
|
42 |
+
{"role": "user", "content": "λ°λλλ μλ νμμμ΄μΌ?"},
|
43 |
+
]
|
44 |
+
|
45 |
+
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
|
46 |
+
|
47 |
+
model_inputs = encodeds.to(device)
|
48 |
+
model.to(device)
|
49 |
+
|
50 |
+
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
|
51 |
+
decoded = tokenizer.batch_decode(generated_ids)
|
52 |
+
print(decoded[0])
|
53 |
+
```
|