language: | |
- en | |
- fa | |
**How to use:** | |
```python | |
from transformers import AutoTokenizer, AutoModelForCausalLM | |
tokenizer = AutoTokenizer.from_pretrained("aidal/Persian-Mistral-7B") | |
model = AutoModelForCausalLM.from_pretrained("aidal/Persian-Mistral-7B") | |
input_text = "پایتخت ایران کجاست؟" | |
input_ids = tokenizer(input_text, return_tensors="pt") | |
outputs = model.generate(**input_ids) | |
print(tokenizer.decode(outputs[0])) | |
``` |