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