Update README.md
Browse files## Model Description
xxxx is a SFT and LoRA fine tuned model for the Italian language
## Training Description
The model has been fine-tuned using a mixed dataset, with parts from opensourced datasets like SQUAD-it and others made in-house by us.
The dataset is not a traditional Q&A; it adds Context to the mix.
This means that it is best suited for use in RAGs and applications where context is needed.
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto
model = AutoModelForCausalLM.from_pretrained("MoxoffSpA/xxxx")
tokenizer = AutoTokenizer.from_pretrained("MoxoffSpA/xxxx")
question = """Quanto è alta la torre di Pisa?"""
context = """
La Torre di Pisa è un campanile del XII secolo, famoso per la sua inclinazione. Alta circa 56 metri.
"""
prompt = f"Rispondi alla seguente domanda con meno parle possibili basandoti sul contesto fornito. Domanda: {question}, contesto: {context}"
messages = [
{"role": "user", "content": prompt},
]
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
model_inputs = encodeds.to(device)
model.to(device)
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
decoded = tokenizer.batch_decode(generated_ids)
print(decoded[0])
```