File size: 533 Bytes
344d2d9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
---
license: mit
---
## Quick start
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("npvinHnivqn/phi-1_5-CRL-v0.2", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("npvinHnivqn/phi-1_5-CRL-v0.2", trust_remote_code=True)
inputs = tokenizer('''<|USER|> Write a paragragh about animal''', return_tensors="pt", return_attention_mask=False)
outputs = model.generate(**inputs, max_length=200)
text = tokenizer.batch_decode(outputs)[0]
print(text)
``` |