iperbole commited on
Commit
f9f480f
·
verified ·
1 Parent(s): 4693c12

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -5
README.md CHANGED
@@ -40,7 +40,16 @@ The model is trained for two epoches in the aforementioned data.
40
 
41
  ## Evaluation
42
 
43
- ...
 
 
 
 
 
 
 
 
 
44
 
45
  ## Use with Transformers
46
 
@@ -52,17 +61,45 @@ Make sure to update your transformers installation via `pip install --upgrade tr
52
  import transformers
53
  import torch
54
 
55
- model_id = "SemanticAlignment/Mistral-v0.1-Italian-FVT-instruct"
 
 
56
 
57
- pipeline = transformers.pipeline(
58
- "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  )
60
 
61
- pipeline("Cosa si può fare in una bella giornata di sole?")
62
  ```
63
 
64
  Code: https://github.com/SapienzaNLP/sava
65
 
 
 
 
 
 
66
  ## Citation
67
 
68
  If you use any part of this work, please consider citing the paper as follows:
 
40
 
41
  ## Evaluation
42
 
43
+ Adapted models are evaluated on [ITA-Bench])(https://github.com/SapienzaNLP/ita-bench).
44
+
45
+ | Model | MMLU (5-shots) | ARC-C (5-shots) | Hellaswag (0-shots) | IFEval (inst_level) |
46
+ |------|-----|------|------|------|
47
+ | Llama-3.1-SAVA | 56.9 | 42.3 | 58.1 | 62.3 |
48
+ | Llama-3.1-LAPT | 58.5 | 47.9 | 62.4 | 67.3 |
49
+ | Mistral-0.1-SAVA | 51.5 | 41.6 | 57.5 | 61.7 |
50
+ | **Mistral-0.1-LAPT** | 52.9 | 39.9 | 58.4 | 60.0 |
51
+ | Llama-3.1-Original | 47.4 | 43.1 | 57.9 | 66.8 |
52
+ | Mistral-0.1-Original | 41.6 | 38.9 | 50.0 | 42.2 |
53
 
54
  ## Use with Transformers
55
 
 
61
  import transformers
62
  import torch
63
 
64
+ model_id = "SemanticAlignment/Mistral-v0.1-Italian-LAPT-instruct"
65
+
66
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
67
 
68
+ generator = pipeline(
69
+ "text-generation",
70
+ model=model_name,
71
+ device_map="auto",
72
+ dtype=torch.bfloat16
73
+ )
74
+
75
+ conversations.append([
76
+ {"role": "system", "content": "Sei un assistente utile, rispondi in modo conciso e coerente."},
77
+ {"role": "user", "content": "Cosa si può fare in una bella giornata di sole?"},
78
+ ])
79
+
80
+ chat_samples = tokenizer.apply_chat_template(conversations, tokenize=False)
81
+
82
+ # get number of prompt tokens
83
+ prompt_tokens_number = len(tokenizer(chat_samples)["input_ids"])
84
+
85
+ outputs = generator(
86
+ conversations,
87
+ max_new_tokens=2048,
88
+ eos_token_id=[
89
+ tokenizer.eos_token_id,
90
+ tokenizer.convert_tokens_to_ids("<|eot_id|>"),
91
+ ],
92
  )
93
 
 
94
  ```
95
 
96
  Code: https://github.com/SapienzaNLP/sava
97
 
98
+ ## Aknowledgement
99
+ Thanks to Leonardo Colosi (colosi@diag.uniroma1.it) for helping in instruction tuning phase.
100
+
101
+ We acknowledge ISCRA for awarding this project access to the LEONARDO supercomputer, owned by the EuroHPC Joint Undertaking, hosted by CINECA (Italy).
102
+
103
  ## Citation
104
 
105
  If you use any part of this work, please consider citing the paper as follows: