mjnam commited on
Commit
b363296
β€’
1 Parent(s): 4eac732

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
+
36
+ ```python
37
+ from transformers import AutoModelForCausalLM, AutoTokenizer
38
+
39
+ model_id = "TeamUNIVA/Komodo_6B_v2.0.0"
40
+
41
+ model = AutoModelForCausalLM.from_pretrained(model_id)
42
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
43
+
44
+
45
+ text = '''<|system|>
46
+ 당신은 μ‚¬μš©μžμ˜ μ§ˆλ¬Έμ— μΉœμ ˆν•˜κ²Œ 닡변을 ν•˜λŠ” μ±—λ΄‡μž…λ‹ˆλ‹€.
47
+ <|user|>
48
+ μ•ˆλ…•ν•˜μ„Έμš”?
49
+ <|bot|>
50
+ '''
51
+
52
+ inputs = tokenizer(text, return_tensors="pt")
53
+ outputs = model.generate(**inputs, max_new_tokens=20)
54
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
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