JacopoAbate commited on
Commit
e12c0fb
1 Parent(s): 1151de2

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])
```

Files changed (1) hide show
  1. README.md +10 -1
README.md CHANGED
@@ -1,3 +1,12 @@
1
  ---
2
  license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - it
5
+ - en
6
+ library_name: transformers
7
+ tags:
8
+ - sft
9
+ - it
10
+ - mistral
11
+ - chatml
12
+ ---