Update README.md
Browse files
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
|