RichardErkhov
commited on
Commit
•
bc90435
1
Parent(s):
023dff8
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,455 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
canarim-7b - GGUF
|
11 |
+
- Model creator: https://huggingface.co/dominguesm/
|
12 |
+
- Original model: https://huggingface.co/dominguesm/canarim-7b/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [canarim-7b.Q2_K.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q2_K.gguf) | Q2_K | 2.36GB |
|
18 |
+
| [canarim-7b.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q3_K_S.gguf) | Q3_K_S | 2.75GB |
|
19 |
+
| [canarim-7b.Q3_K.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q3_K.gguf) | Q3_K | 3.07GB |
|
20 |
+
| [canarim-7b.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q3_K_M.gguf) | Q3_K_M | 3.07GB |
|
21 |
+
| [canarim-7b.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q3_K_L.gguf) | Q3_K_L | 3.35GB |
|
22 |
+
| [canarim-7b.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.IQ4_XS.gguf) | IQ4_XS | 3.4GB |
|
23 |
+
| [canarim-7b.Q4_0.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q4_0.gguf) | Q4_0 | 3.56GB |
|
24 |
+
| [canarim-7b.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.IQ4_NL.gguf) | IQ4_NL | 3.58GB |
|
25 |
+
| [canarim-7b.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q4_K_S.gguf) | Q4_K_S | 3.59GB |
|
26 |
+
| [canarim-7b.Q4_K.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q4_K.gguf) | Q4_K | 3.8GB |
|
27 |
+
| [canarim-7b.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q4_K_M.gguf) | Q4_K_M | 3.8GB |
|
28 |
+
| [canarim-7b.Q4_1.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q4_1.gguf) | Q4_1 | 3.95GB |
|
29 |
+
| [canarim-7b.Q5_0.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q5_0.gguf) | Q5_0 | 4.33GB |
|
30 |
+
| [canarim-7b.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q5_K_S.gguf) | Q5_K_S | 4.33GB |
|
31 |
+
| [canarim-7b.Q5_K.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q5_K.gguf) | Q5_K | 4.45GB |
|
32 |
+
| [canarim-7b.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q5_K_M.gguf) | Q5_K_M | 4.45GB |
|
33 |
+
| [canarim-7b.Q5_1.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q5_1.gguf) | Q5_1 | 4.72GB |
|
34 |
+
| [canarim-7b.Q6_K.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q6_K.gguf) | Q6_K | 5.15GB |
|
35 |
+
| [canarim-7b.Q8_0.gguf](https://huggingface.co/RichardErkhov/dominguesm_-_canarim-7b-gguf/blob/main/canarim-7b.Q8_0.gguf) | Q8_0 | 6.67GB |
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
Original model description:
|
41 |
+
---
|
42 |
+
language:
|
43 |
+
- pt
|
44 |
+
license: llama2
|
45 |
+
library_name: transformers
|
46 |
+
tags:
|
47 |
+
- text-generation
|
48 |
+
- pytorch
|
49 |
+
- LLM
|
50 |
+
- Portuguese
|
51 |
+
- Llama 2
|
52 |
+
datasets:
|
53 |
+
- dominguesm/CC-MAIN-2023-23
|
54 |
+
inference: false
|
55 |
+
pipeline_tag: text-generation
|
56 |
+
model-index:
|
57 |
+
- name: canarim-7b
|
58 |
+
results:
|
59 |
+
- task:
|
60 |
+
type: text-generation
|
61 |
+
name: Text Generation
|
62 |
+
dataset:
|
63 |
+
name: AI2 Reasoning Challenge (25-Shot)
|
64 |
+
type: ai2_arc
|
65 |
+
config: ARC-Challenge
|
66 |
+
split: test
|
67 |
+
args:
|
68 |
+
num_few_shot: 25
|
69 |
+
metrics:
|
70 |
+
- type: acc_norm
|
71 |
+
value: 51.96
|
72 |
+
name: normalized accuracy
|
73 |
+
source:
|
74 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b
|
75 |
+
name: Open LLM Leaderboard
|
76 |
+
- task:
|
77 |
+
type: text-generation
|
78 |
+
name: Text Generation
|
79 |
+
dataset:
|
80 |
+
name: HellaSwag (10-Shot)
|
81 |
+
type: hellaswag
|
82 |
+
split: validation
|
83 |
+
args:
|
84 |
+
num_few_shot: 10
|
85 |
+
metrics:
|
86 |
+
- type: acc_norm
|
87 |
+
value: 77.52
|
88 |
+
name: normalized accuracy
|
89 |
+
source:
|
90 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b
|
91 |
+
name: Open LLM Leaderboard
|
92 |
+
- task:
|
93 |
+
type: text-generation
|
94 |
+
name: Text Generation
|
95 |
+
dataset:
|
96 |
+
name: MMLU (5-Shot)
|
97 |
+
type: cais/mmlu
|
98 |
+
config: all
|
99 |
+
split: test
|
100 |
+
args:
|
101 |
+
num_few_shot: 5
|
102 |
+
metrics:
|
103 |
+
- type: acc
|
104 |
+
value: 40.92
|
105 |
+
name: accuracy
|
106 |
+
source:
|
107 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b
|
108 |
+
name: Open LLM Leaderboard
|
109 |
+
- task:
|
110 |
+
type: text-generation
|
111 |
+
name: Text Generation
|
112 |
+
dataset:
|
113 |
+
name: TruthfulQA (0-shot)
|
114 |
+
type: truthful_qa
|
115 |
+
config: multiple_choice
|
116 |
+
split: validation
|
117 |
+
args:
|
118 |
+
num_few_shot: 0
|
119 |
+
metrics:
|
120 |
+
- type: mc2
|
121 |
+
value: 40.03
|
122 |
+
source:
|
123 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b
|
124 |
+
name: Open LLM Leaderboard
|
125 |
+
- task:
|
126 |
+
type: text-generation
|
127 |
+
name: Text Generation
|
128 |
+
dataset:
|
129 |
+
name: Winogrande (5-shot)
|
130 |
+
type: winogrande
|
131 |
+
config: winogrande_xl
|
132 |
+
split: validation
|
133 |
+
args:
|
134 |
+
num_few_shot: 5
|
135 |
+
metrics:
|
136 |
+
- type: acc
|
137 |
+
value: 71.43
|
138 |
+
name: accuracy
|
139 |
+
source:
|
140 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b
|
141 |
+
name: Open LLM Leaderboard
|
142 |
+
- task:
|
143 |
+
type: text-generation
|
144 |
+
name: Text Generation
|
145 |
+
dataset:
|
146 |
+
name: GSM8k (5-shot)
|
147 |
+
type: gsm8k
|
148 |
+
config: main
|
149 |
+
split: test
|
150 |
+
args:
|
151 |
+
num_few_shot: 5
|
152 |
+
metrics:
|
153 |
+
- type: acc
|
154 |
+
value: 9.93
|
155 |
+
name: accuracy
|
156 |
+
source:
|
157 |
+
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b
|
158 |
+
name: Open LLM Leaderboard
|
159 |
+
- task:
|
160 |
+
type: text-generation
|
161 |
+
name: Text Generation
|
162 |
+
dataset:
|
163 |
+
name: ENEM (3-shot)
|
164 |
+
type: enem_challenge
|
165 |
+
config: main
|
166 |
+
split: test
|
167 |
+
args:
|
168 |
+
num_few_shot: 3
|
169 |
+
metrics:
|
170 |
+
- type: acc
|
171 |
+
value: 26.96
|
172 |
+
name: accuracy
|
173 |
+
source:
|
174 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
175 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
176 |
+
- task:
|
177 |
+
type: text-generation
|
178 |
+
name: Text Generation
|
179 |
+
dataset:
|
180 |
+
name: BLUEX (3-shot)
|
181 |
+
type: bluex
|
182 |
+
config: main
|
183 |
+
split: test
|
184 |
+
args:
|
185 |
+
num_few_shot: 3
|
186 |
+
metrics:
|
187 |
+
- type: acc
|
188 |
+
value: 29.76
|
189 |
+
name: accuracy
|
190 |
+
source:
|
191 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
192 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
193 |
+
- task:
|
194 |
+
type: text-generation
|
195 |
+
name: Text Generation
|
196 |
+
dataset:
|
197 |
+
name: OAB Exams (3-shot)
|
198 |
+
type: oab_exams
|
199 |
+
config: main
|
200 |
+
split: test
|
201 |
+
args:
|
202 |
+
num_few_shot: 3
|
203 |
+
metrics:
|
204 |
+
- type: acc
|
205 |
+
value: 31.48
|
206 |
+
name: accuracy
|
207 |
+
source:
|
208 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
209 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
210 |
+
- task:
|
211 |
+
type: text-generation
|
212 |
+
name: Text Generation
|
213 |
+
dataset:
|
214 |
+
name: ASSIN2 RTE (15-shot)
|
215 |
+
type: assin2_rte
|
216 |
+
config: main
|
217 |
+
split: test
|
218 |
+
args:
|
219 |
+
num_few_shot: 15
|
220 |
+
metrics:
|
221 |
+
- type: acc
|
222 |
+
value: 71.96
|
223 |
+
name: accuracy
|
224 |
+
source:
|
225 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
226 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
227 |
+
- task:
|
228 |
+
type: text-generation
|
229 |
+
name: Text Generation
|
230 |
+
dataset:
|
231 |
+
name: ASSIN2 STS (15-shot)
|
232 |
+
type: assin2_sts
|
233 |
+
config: main
|
234 |
+
split: test
|
235 |
+
args:
|
236 |
+
num_few_shot: 15
|
237 |
+
metrics:
|
238 |
+
- type: acc
|
239 |
+
value: 13.33
|
240 |
+
name: accuracy
|
241 |
+
source:
|
242 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
243 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
244 |
+
- task:
|
245 |
+
type: text-generation
|
246 |
+
name: Text Generation
|
247 |
+
dataset:
|
248 |
+
name: FAQUAD NLI (15-shot)
|
249 |
+
type: faquad_nli
|
250 |
+
config: main
|
251 |
+
split: test
|
252 |
+
args:
|
253 |
+
num_few_shot: 15
|
254 |
+
metrics:
|
255 |
+
- type: acc
|
256 |
+
value: 49.09
|
257 |
+
name: accuracy
|
258 |
+
source:
|
259 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
260 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
261 |
+
- task:
|
262 |
+
type: text-generation
|
263 |
+
name: Text Generation
|
264 |
+
dataset:
|
265 |
+
name: HateBR (25-shot)
|
266 |
+
type: hatebr_offensive
|
267 |
+
config: main
|
268 |
+
split: test
|
269 |
+
args:
|
270 |
+
num_few_shot: 25
|
271 |
+
metrics:
|
272 |
+
- type: acc
|
273 |
+
value: 78.48
|
274 |
+
name: accuracy
|
275 |
+
source:
|
276 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
277 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
278 |
+
- task:
|
279 |
+
type: text-generation
|
280 |
+
name: Text Generation
|
281 |
+
dataset:
|
282 |
+
name: PT Hate Speech (25-shot)
|
283 |
+
type: portuguese_hate_speech
|
284 |
+
config: main
|
285 |
+
split: test
|
286 |
+
args:
|
287 |
+
num_few_shot: 25
|
288 |
+
metrics:
|
289 |
+
- type: acc
|
290 |
+
value: 63.73
|
291 |
+
name: accuracy
|
292 |
+
source:
|
293 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
294 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
295 |
+
- task:
|
296 |
+
type: text-generation
|
297 |
+
name: Text Generation
|
298 |
+
dataset:
|
299 |
+
name: tweetSentBR (25-shot)
|
300 |
+
type: tweetsentbr
|
301 |
+
config: main
|
302 |
+
split: test
|
303 |
+
args:
|
304 |
+
num_few_shot: 25
|
305 |
+
metrics:
|
306 |
+
- type: acc
|
307 |
+
value: 62.38
|
308 |
+
name: accuracy
|
309 |
+
source:
|
310 |
+
url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b
|
311 |
+
name: Open PT LLM Leaderboard Evaluation Results
|
312 |
+
---
|
313 |
+
|
314 |
+
|
315 |
+
<p align="center">
|
316 |
+
<img width="250" alt="Camarim Logo" src="https://raw.githubusercontent.com/DominguesM/Canarim-Instruct-PTBR/main/assets/canarim.png">
|
317 |
+
</p>
|
318 |
+
|
319 |
+
<hr>
|
320 |
+
|
321 |
+
# Canarim-7B
|
322 |
+
|
323 |
+
Canarim-7B is a Portuguese large language model developed by [Maicon Domingues](https://nlp.rocks).
|
324 |
+
|
325 |
+
## Model description
|
326 |
+
|
327 |
+
The model was pretrained on 16 billion tokens from the Portuguese subset of [CommonCrawl 2023-23](https://huggingface.co/datasets/dominguesm/CC-MAIN-2023-23), starting with the weights of LLaMA2-7B. The pretraining data has cutoff of mid-2023.
|
328 |
+
|
329 |
+
## Key Features
|
330 |
+
|
331 |
+
- **Language:** Specialized in understanding and generating Portuguese text, making it ideal for applications targeting Portuguese-speaking audiences.
|
332 |
+
- **Architecture:** Inherits the robust architecture from LLaMA2-7B, ensuring efficient performance and accurate results.
|
333 |
+
- **Diverse Dataset:** The pretraining dataset includes a wide range of topics and writing styles, enhancing the model's ability to understand various contexts and nuances in Portuguese.
|
334 |
+
|
335 |
+
## Applications
|
336 |
+
|
337 |
+
Canarim-7B, was trained solely on a language modeling objective and has not been fine-tuned for instruction following. Therefore, it is more suited for few-shot tasks rather than zero-shot tasks. This means the model tends to perform better when provided with a few examples of the desired outcome during use. Here are some practical applications:
|
338 |
+
|
339 |
+
- **Natural Language Understanding (NLU):** Efficient in tasks such as sentiment analysis, topic classification, and entity recognition in Portuguese text, especially when relevant examples are provided.
|
340 |
+
- **Natural Language Generation (NLG):** Capable of generating coherent and contextually relevant text, useful for content creation, chatbots, and more, with improved results when provided examples of the desired style or format.
|
341 |
+
- **Language Translation:** Suitable for high-quality translation between Portuguese and other languages, especially when examples of desired translations are included during model training or fine-tuning.
|
342 |
+
|
343 |
+
### Tips for Efficient Use
|
344 |
+
|
345 |
+
- **Few-shot Learning:** When using Canarim-7B for specific tasks, it is beneficial to provide a few relevant examples. This helps the model better understand the context and purpose of the task.
|
346 |
+
- **Contextualization:** Including additional context in the input can significantly improve the quality of the model’s predictions and text generation.
|
347 |
+
|
348 |
+
---
|
349 |
+
|
350 |
+
## Getting Started
|
351 |
+
|
352 |
+
To start using Canarim-7B with the Transformers library, first install the library if you haven't already:
|
353 |
+
|
354 |
+
```bash
|
355 |
+
pip install transformers
|
356 |
+
```
|
357 |
+
|
358 |
+
You can then load the model using the Transformers library. Here's a simple example of how to use the model for text generation using the `pipeline` function:
|
359 |
+
|
360 |
+
```python
|
361 |
+
from transformers import AutoTokenizer, pipeline
|
362 |
+
import torch
|
363 |
+
|
364 |
+
model_id = "dominguesm/canarim-7b"
|
365 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
366 |
+
|
367 |
+
pipe = pipeline(
|
368 |
+
"text-generation",
|
369 |
+
model=model_id,
|
370 |
+
torch_dtype=torch.float16,
|
371 |
+
device_map="auto",
|
372 |
+
)
|
373 |
+
|
374 |
+
prompt = make_prompt(question)
|
375 |
+
sequences = pipe(
|
376 |
+
prompt,
|
377 |
+
do_sample=True,
|
378 |
+
num_return_sequences=1,
|
379 |
+
eos_token_id=tokenizer.eos_token_id,
|
380 |
+
max_length=2048,
|
381 |
+
temperature=0.9,
|
382 |
+
top_p=0.6,
|
383 |
+
repetition_penalty=1.15
|
384 |
+
)
|
385 |
+
```
|
386 |
+
|
387 |
+
This code snippet demonstrates how to generate text with Canarim-7B. You can customize the input text and adjust parameters like `max_length` according to your requirements.
|
388 |
+
|
389 |
+
## How to Cite
|
390 |
+
|
391 |
+
If you want to cite **Canarim-7B**, you could use this:
|
392 |
+
|
393 |
+
```
|
394 |
+
@misc {maicon_domingues_2023,
|
395 |
+
author = { {Maicon Domingues} },
|
396 |
+
title = { canarim-7b (Revision 08fdd2b) },
|
397 |
+
year = 2023,
|
398 |
+
url = { https://huggingface.co/dominguesm/canarim-7b },
|
399 |
+
doi = { 10.57967/hf/1356 },
|
400 |
+
publisher = { Hugging Face }
|
401 |
+
}
|
402 |
+
```
|
403 |
+
|
404 |
+
|
405 |
+
## Citations
|
406 |
+
|
407 |
+
```bibtex
|
408 |
+
@misc{touvron2023llama,
|
409 |
+
title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
|
410 |
+
author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom},
|
411 |
+
year={2023},
|
412 |
+
eprint={2307.09288},
|
413 |
+
archivePrefix={arXiv},
|
414 |
+
primaryClass={cs.CL}
|
415 |
+
}
|
416 |
+
```
|
417 |
+
|
418 |
+
## License
|
419 |
+
|
420 |
+
Canarim-7B is released under the [LLAMA 2 COMMUNITY LICENSE AGREEMENT](https://ai.meta.com/llama/license/).
|
421 |
+
|
422 |
+
## [Open PT LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard)
|
423 |
+
|
424 |
+
Detailed results can be found [here](https://huggingface.co/datasets/eduagarcia-temp/llm_pt_leaderboard_raw_results/tree/main/dominguesm/canarim-7b)
|
425 |
+
|
426 |
+
| Metric |Value|
|
427 |
+
|---------------------------------|----:|
|
428 |
+
|Avg. |47.36|
|
429 |
+
|ENEM (3-Shot) |25.96|
|
430 |
+
|BLUEX (3-Shot) |29.76|
|
431 |
+
|OAB Exams (3-Shot) |31.48|
|
432 |
+
|ASSIN2 RTE (15-shot) |71.96|
|
433 |
+
|ASSIN2 STS (15-shot) |13.33|
|
434 |
+
|FAQUAD NLI (15-shot) |49.09|
|
435 |
+
|HateBR (25-shot) |78.48|
|
436 |
+
|PT Hate Speech (25-shot) |63.73|
|
437 |
+
|tweetSentBR (25-shot) |62.38|
|
438 |
+
|
439 |
+
|
440 |
+
## [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
441 |
+
|
442 |
+
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_dominguesm__canarim-7b)
|
443 |
+
|
444 |
+
| Metric |Value|
|
445 |
+
|---------------------------------|----:|
|
446 |
+
|Avg. |48.63|
|
447 |
+
|AI2 Reasoning Challenge (25-Shot)|51.96|
|
448 |
+
|HellaSwag (10-Shot) |77.52|
|
449 |
+
|MMLU (5-Shot) |40.92|
|
450 |
+
|TruthfulQA (0-shot) |40.03|
|
451 |
+
|Winogrande (5-shot) |71.43|
|
452 |
+
|GSM8k (5-shot) | 9.93|
|
453 |
+
|
454 |
+
|
455 |
+
|