RichardErkhov commited on
Commit
e2eae3f
·
verified ·
1 Parent(s): 4080efd

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +175 -0
README.md ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ zefiro-7b-beta-ITA-v0.1 - GGUF
11
+ - Model creator: https://huggingface.co/giux78/
12
+ - Original model: https://huggingface.co/giux78/zefiro-7b-beta-ITA-v0.1/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [zefiro-7b-beta-ITA-v0.1.Q2_K.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q2_K.gguf) | Q2_K | 2.53GB |
18
+ | [zefiro-7b-beta-ITA-v0.1.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.IQ3_XS.gguf) | IQ3_XS | 2.81GB |
19
+ | [zefiro-7b-beta-ITA-v0.1.IQ3_S.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.IQ3_S.gguf) | IQ3_S | 2.96GB |
20
+ | [zefiro-7b-beta-ITA-v0.1.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q3_K_S.gguf) | Q3_K_S | 2.95GB |
21
+ | [zefiro-7b-beta-ITA-v0.1.IQ3_M.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.IQ3_M.gguf) | IQ3_M | 3.06GB |
22
+ | [zefiro-7b-beta-ITA-v0.1.Q3_K.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q3_K.gguf) | Q3_K | 3.28GB |
23
+ | [zefiro-7b-beta-ITA-v0.1.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q3_K_M.gguf) | Q3_K_M | 3.28GB |
24
+ | [zefiro-7b-beta-ITA-v0.1.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q3_K_L.gguf) | Q3_K_L | 3.56GB |
25
+ | [zefiro-7b-beta-ITA-v0.1.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.IQ4_XS.gguf) | IQ4_XS | 3.67GB |
26
+ | [zefiro-7b-beta-ITA-v0.1.Q4_0.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q4_0.gguf) | Q4_0 | 3.83GB |
27
+ | [zefiro-7b-beta-ITA-v0.1.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.IQ4_NL.gguf) | IQ4_NL | 3.87GB |
28
+ | [zefiro-7b-beta-ITA-v0.1.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q4_K_S.gguf) | Q4_K_S | 3.86GB |
29
+ | [zefiro-7b-beta-ITA-v0.1.Q4_K.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q4_K.gguf) | Q4_K | 4.07GB |
30
+ | [zefiro-7b-beta-ITA-v0.1.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q4_K_M.gguf) | Q4_K_M | 4.07GB |
31
+ | [zefiro-7b-beta-ITA-v0.1.Q4_1.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q4_1.gguf) | Q4_1 | 4.24GB |
32
+ | [zefiro-7b-beta-ITA-v0.1.Q5_0.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q5_0.gguf) | Q5_0 | 4.65GB |
33
+ | [zefiro-7b-beta-ITA-v0.1.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q5_K_S.gguf) | Q5_K_S | 4.65GB |
34
+ | [zefiro-7b-beta-ITA-v0.1.Q5_K.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q5_K.gguf) | Q5_K | 4.78GB |
35
+ | [zefiro-7b-beta-ITA-v0.1.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q5_K_M.gguf) | Q5_K_M | 4.78GB |
36
+ | [zefiro-7b-beta-ITA-v0.1.Q5_1.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q5_1.gguf) | Q5_1 | 5.07GB |
37
+ | [zefiro-7b-beta-ITA-v0.1.Q6_K.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q6_K.gguf) | Q6_K | 5.53GB |
38
+ | [zefiro-7b-beta-ITA-v0.1.Q8_0.gguf](https://huggingface.co/RichardErkhov/giux78_-_zefiro-7b-beta-ITA-v0.1-gguf/blob/main/zefiro-7b-beta-ITA-v0.1.Q8_0.gguf) | Q8_0 | 7.17GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ license: apache-2.0
46
+ datasets:
47
+ - giux78/100k-sft-ready-ultrafeedback-ita
48
+ language:
49
+ - it
50
+ pipeline_tag: text-generation
51
+ ---
52
+ <img src="https://hoodie-creator.s3.eu-west-1.amazonaws.com/15be78c6-original.png" alt="llamantino53" border="0" width="400px">
53
+
54
+
55
+
56
+ # Model Card for zefiro-7b-beta-ITA-v0.1
57
+ *Last Update: 11/01/2024*<br>
58
+
59
+
60
+ <!-- Provide a quick summary of what the model is/does. -->
61
+
62
+ Zefiro is a SFT fine tuned model for the Italian language based on [Mistral](https://huggingface.co/mistralai/Mistral-7B-v0.1) .
63
+ To create a set of open source models and datasets suited for italian language is the aim of the project and this is the first experiment.
64
+ The model can be used as base model for more specific conversationl tasks for Italian language
65
+
66
+ ## Model Details
67
+
68
+ Zefiro is a porting of the [Zephyr](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) model to the italian language using the wonderful recipes
69
+ from [alignment-handbook](https://huggingface.co/alignment-handbook) . It has also taken ispiration and insights from the [Llamantino](https://huggingface.co/swap-uniba/LLaMAntino-2-chat-7b-hf-UltraChat-ITA) model
70
+ developed by Università di Bari. For the implementation we combined different approaches from the two models mentioned but also from the wondeful communtity of open source.
71
+
72
+
73
+ ## Model description
74
+
75
+ - **Model type:** A 7B parameter GPT-like model fine-tuned on a mix of publicly available, synthetic datasets.
76
+ - **Language(s) (NLP):** Primarily Italian
77
+ - **License:** Apache 2
78
+ - **Finetuned from model:** [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1)
79
+ - **Developed by:** [giux78](https://alessandroercolani.webflow.io/)
80
+ - **Funded by:** [Business Operating System](https://www.businessos.xyz)
81
+
82
+
83
+ ## Intended uses & limitations
84
+
85
+ The model was initially fine-tuned on a filtered and preprocessed version of [UltraChat-ITA](https://huggingface.co/datasets/giux78/100k-sft-ready-ultrafeedback-ita) that is a filtered version of the [`UltraChat`](https://huggingface.co/datasets/stingning/ultrachat) dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT.
86
+
87
+ Here's how you can run the model using Transformers from 🤗 :
88
+
89
+ ```python
90
+ # Install transformers from source - only needed for versions <= v4.34
91
+ # pip install git+https://github.com/huggingface/transformers.git
92
+ # pip install accelerate
93
+ from transformers import AutoModelForCausalLM, AutoTokenizer
94
+
95
+ model_id = "giux78/zefiro-7b-beta-ITA-v0.1"
96
+ model = AutoModelForCausalLM.from_pretrained(model_id)
97
+ model.to('cuda')
98
+ tokenizer = AutoTokenizer.from_pretrained(model_id, padding_side="left")
99
+
100
+
101
+ sys_prompt = "Sei un assistente disponibile, rispettoso e onesto. " \
102
+ "Rispondi sempre nel modo piu' utile possibile, pur essendo sicuro. " \
103
+ "Le risposte non devono includere contenuti dannosi, non etici, razzisti, sessisti, tossici, pericolosi o illegali. " \
104
+ "Assicurati che le tue risposte siano socialmente imparziali e positive. " \
105
+ "Se una domanda non ha senso o non e' coerente con i fatti, spiegane il motivo invece di rispondere in modo non corretto. " \
106
+ "Se non conosci la risposta a una domanda, non condividere informazioni false."
107
+
108
+ messages = [{ 'content' : sys_prompt, 'role' : 'assistant'},
109
+ {'content' : 'Crea una lista su cosa mangiare a pranzo ogni giorno della settimana a pranzo e cena', 'role' : 'user'}]
110
+
111
+
112
+ def generate_text(sys_prompt, user_prompt):
113
+ messages = [{ 'content' : sys_prompt, 'role' : 'assistant'},
114
+ {'content' : user_prompt, 'role' : 'user'}]
115
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
116
+ model_inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
117
+ generated_ids = model.generate(**model_inputs, max_new_tokens=1024)
118
+ return tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
119
+
120
+
121
+ generate_text(sys_prompt, 'cosa ne pensi della politica italiana?')
122
+ ```
123
+
124
+ ## Bias, Risks, and Limitations
125
+
126
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
127
+
128
+ Zefiro-7b-beta-ITA-v0.1 has not been aligned to human preferences for safety within the RLHF phase or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so).
129
+ It is also unknown what the size and composition of the corpus was used to train the base model (`mistralai/Mistral-7B-v0.1`), however it is likely to have included a mix of Web data and technical sources like books and code. See the [Falcon 180B model card](https://huggingface.co/tiiuae/falcon-180B#training-data) for an example of this.
130
+
131
+
132
+
133
+ ### Training Data
134
+
135
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
136
+
137
+ We used [UltraChat-ITA](https://huggingface.co/datasets/giux78/100k-sft-ready-ultrafeedback-ita) as training data that is a filtered version of the [`UltraChat`](https://huggingface.co/datasets/stingning/ultrachat).
138
+ For translating the dataset we combined different tools and API we are also evaluating the best approach for translating many more datasets.
139
+ We have seen that the translation phase is critical and can introduce incorrect syntax and semantics.
140
+
141
+ #### Summary
142
+ Zefiro-7b-beta-ITA-v0.1 is finetuned version of mistral-7b using the zephyr approach for the italian language.
143
+
144
+ ## Citation
145
+
146
+ ```
147
+ @misc{tunstall2023zephyr,
148
+ title={Zephyr: Direct Distillation of LM Alignment},
149
+ author={Lewis Tunstall and Edward Beeching and Nathan Lambert and Nazneen Rajani and Kashif Rasul and Younes Belkada and Shengyi Huang and Leandro von Werra and Clémentine Fourrier and Nathan Habib and Nathan Sarrazin and Omar Sanseviero and Alexander M. Rush and Thomas Wolf},
150
+ year={2023},
151
+ eprint={2310.16944},
152
+ archivePrefix={arXiv},
153
+ primaryClass={cs.LG}
154
+ }
155
+
156
+ @misc{basile2023llamantino,
157
+ title={LLaMAntino: LLaMA 2 Models for Effective Text Generation in Italian Language},
158
+ author={Pierpaolo Basile and Elio Musacchio and Marco Polignano and Lucia Siciliani and Giuseppe Fiameni and Giovanni Semeraro},
159
+ year={2023},
160
+ eprint={2312.09993},
161
+ archivePrefix={arXiv},
162
+ primaryClass={cs.CL}
163
+ }
164
+
165
+ ```
166
+
167
+
168
+ ## Model Card Authors
169
+
170
+ [giux78](https://huggingface.co/giux78)
171
+
172
+ ## Model Card Contact
173
+
174
175
+