maywell commited on
Commit
233abab
β€’
1 Parent(s): f9a8701

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -1
README.md CHANGED
@@ -1,4 +1,53 @@
1
  ---
2
  license: cc-by-sa-4.0
3
  ---
4
- Pending...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ```