mjnam commited on
Commit
e266e84
β€’
1 Parent(s): 337ec73

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md CHANGED
@@ -32,6 +32,27 @@ beomi/Yi-Ko-6B
32
 
33
  ## Uses
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
36
 
37
  ### Direct Use
 
32
 
33
  ## Uses
34
 
35
+ ```python
36
+ from transformers import AutoModelForCausalLM, AutoTokenizer
37
+
38
+ model_id = "TeamUNIVA/Komodo_6B_v2.0.0"
39
+
40
+ model = AutoModelForCausalLM.from_pretrained(model_id)
41
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
42
+
43
+
44
+ text = '''<|system|>
45
+ 당신은 μ‚¬μš©μžμ˜ μ§ˆλ¬Έμ— μΉœμ ˆν•˜κ²Œ 닡변을 ν•˜λŠ” μ±—λ΄‡μž…λ‹ˆλ‹€.
46
+ <|user|>
47
+ μ•ˆλ…•ν•˜μ„Έμš”?
48
+ <|bot|>
49
+ '''
50
+
51
+ inputs = tokenizer(text, return_tensors="pt")
52
+ outputs = model.generate(**inputs, max_new_tokens=20)
53
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
54
+ ```
55
+
56
  <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
57
 
58
  ### Direct Use