mjnam commited on
Commit
940bdea
β€’
1 Parent(s): 984c54b

Update README.md

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