JacopoAbate
commited on
Commit
•
782e79c
1
Parent(s):
25e2e30
Update README.md
Browse files
README.md
CHANGED
@@ -29,13 +29,23 @@ We evaluated the model using the same test sets as used for the Open Ita LLM Lea
|
|
29 |
|
30 |
## Usage
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
```python
|
33 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
34 |
|
35 |
device = "cuda"
|
36 |
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
|
40 |
messages = [
|
41 |
{"role": "user", "content": "Qual è il tuo piatto preferito??"},
|
|
|
29 |
|
30 |
## Usage
|
31 |
|
32 |
+
Be sure to have transformers, peft and sentencepiece installed
|
33 |
+
|
34 |
+
```python
|
35 |
+
pip install transformers peft sentencepiece
|
36 |
+
```
|
37 |
+
|
38 |
```python
|
39 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
40 |
+
from peft import PeftModel, PeftConfig
|
41 |
|
42 |
device = "cuda"
|
43 |
|
44 |
+
config = PeftConfig.from_pretrained("MoxoffSpA/xxxx")
|
45 |
+
model = AutoModelForCausalLM.from_pretrained("alpindale/Mistral-7B-v0.2-hf")
|
46 |
+
tokenizer = AutoTokenizer.from_pretrained("alpindale/Mistral-7B-v0.2-hf")
|
47 |
+
|
48 |
+
model = PeftModel.from_pretrained(model, "MoxoffSpA/xxxx")
|
49 |
|
50 |
messages = [
|
51 |
{"role": "user", "content": "Qual è il tuo piatto preferito??"},
|