File size: 9,249 Bytes
80a145b
 
b9e8ddc
80a145b
 
 
 
 
 
 
 
497c7b8
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9e8ddc
 
1ce79fa
80a145b
d6d5b63
497c7b8
 
 
d6d5b63
497c7b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80a145b
1ce79fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e00ab51
 
 
 
 
 
 
 
b9e8ddc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
---
language:
- pt
license: apache-2.0
tags:
- text-generation-inference
- transformers
- unsloth
- mistral
- trl
base_model: unsloth/mistral-7b-bnb-4bit
datasets:
- lucianosb/cetacean-ptbr
model-index:
- name: boto-7B-v1.1
  results:
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: ENEM Challenge (No Images)
      type: eduagarcia/enem_challenge
      split: train
      args:
        num_few_shot: 3
    metrics:
    - type: acc
      value: 60.81
      name: accuracy
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: BLUEX (No Images)
      type: eduagarcia-temp/BLUEX_without_images
      split: train
      args:
        num_few_shot: 3
    metrics:
    - type: acc
      value: 49.37
      name: accuracy
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: OAB Exams
      type: eduagarcia/oab_exams
      split: train
      args:
        num_few_shot: 3
    metrics:
    - type: acc
      value: 42.28
      name: accuracy
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: Assin2 RTE
      type: assin2
      split: test
      args:
        num_few_shot: 15
    metrics:
    - type: f1_macro
      value: 88.12
      name: f1-macro
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: Assin2 STS
      type: eduagarcia/portuguese_benchmark
      split: test
      args:
        num_few_shot: 15
    metrics:
    - type: pearson
      value: 63.71
      name: pearson
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: FaQuAD NLI
      type: ruanchaves/faquad-nli
      split: test
      args:
        num_few_shot: 15
    metrics:
    - type: f1_macro
      value: 48.83
      name: f1-macro
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: HateBR Binary
      type: ruanchaves/hatebr
      split: test
      args:
        num_few_shot: 25
    metrics:
    - type: f1_macro
      value: 75.97
      name: f1-macro
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: PT Hate Speech Binary
      type: hate_speech_portuguese
      split: test
      args:
        num_few_shot: 25
    metrics:
    - type: f1_macro
      value: 64.66
      name: f1-macro
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: tweetSentBR
      type: eduagarcia/tweetsentbr_fewshot
      split: test
      args:
        num_few_shot: 25
    metrics:
    - type: f1_macro
      value: 55.45
      name: f1-macro
    source:
      url: >-
        https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=lucianosb/boto-7B-v1.1
      name: Open Portuguese LLM Leaderboard
---
# Boto 7B v1.1

<img src="https://i.imgur.com/xscFgqH.png" alt="logo do boto cor-de-rosa" width="300px" />

Boto é um fine-tuning do Mistral 7B para língua portuguesa usando o dataset cetacean-ptbr. O Boto é bem "falante", as respostas tendem a ser longas e nem sempre objetivas por padrão.

Quantizações disponíveis em [lucianosb/boto-7B-GGUF](https://huggingface.co/lucianosb/boto-7B-GGUF).

Acesse a [demonstração online](https://huggingface.co/spaces/lucianosb/boto-7B) disponível. E cante junto:

[![Foi Boto Sinhá](https://markdown-videos-api.jorgenkh.no/url?url=https%3A%2F%2Fyoutu.be%2FxSyuWFvI9_8%3Fsi%3DSzIMawwQ6sF_xhZK)](https://youtu.be/xSyuWFvI9_8?si=SzIMawwQ6sF_xhZK)

Boto é um nome dado a vários tipos de golfinhos e botos nativos do Amazonas e dos afluentes do rio Orinoco. Alguns botos existem exclusivamente em água doce, e estes são frequentemente considerados golfinhos primitivos.

O “boto” das regiões do rio Amazonas no norte do Brasil é descrito de acordo com o folclore local como assumindo a forma de um humano, também conhecido como Boto cor-de-rosa, e com o hábito de seduzir mulheres humanas e engravidá-las.


## English description

Boto is a fine-tuning of Mistral 7B for portuguese language. Responses tend to be verbose.

Try the [demo](https://huggingface.co/spaces/lucianosb/boto-7B).

Boto is a Portuguese name given to several types of dolphins and river dolphins native to the Amazon and the Orinoco River tributaries. A few botos exist exclusively in fresh water, and these are often considered primitive dolphins.

The "boto" of the Amazon River regions of northern Brazil are described according to local lore as taking the form of a human or merman, also known as Boto cor-de-rosa ("Pink Boto" in Portuguese) and with the habit of seducing human women and impregnating them.

## How to Run on Colab T4

```python
from transformers import AutoTokenizer, pipeline
import torch

model_id = "lucianosb/boto-7B-v1.1"
tokenizer = AutoTokenizer.from_pretrained(model_id)

pipe = pipeline(
    "text-generation",
    model=model_id,
    torch_dtype=torch.float16,
    device_map="cuda:0"
)

def make_prompt(question):
  return f"""Abaixo está uma instrução que descreve uma tarefa, combinada com uma entrada que fornece contexto adicional.
Escreva uma resposta que complete adequadamente a solicitação.

### Instruction:
{question}

### Response:
"""

question = "Conte a história do boto"

prompt = make_prompt(question)
sequences = pipe(
   prompt,
   do_sample=True,
   num_return_sequences=1,
   eos_token_id=tokenizer.eos_token_id,
   max_length=2048,
   temperature=0.9,
   top_p=0.6,
   repetition_penalty=1.15
)

print(sequences[0]["generated_text"])
```


## Isenção de Responsabilidade

O modelo é uma ferramenta de geração de texto que utiliza dados de treinamento para produzir saídas. Ele não possui a capacidade de compreender ou interpretar o conteúdo de maneira semelhante a um humano. Não foram implementados mecanismos de moderação de conteúdo no modelo, portanto existe a possibilidade de reprodução de estereótipos sociais de cultura, gênero, etnia, raça ou idade, ele pode, inadvertidamente, gerar tais conteúdos devido às limitações e preconceitos presentes nos dados de treinamento.

O modelo não foi treinado com a intenção de reproduzir fatos reais e, portanto, pode gerar conteúdo inconsistente com a realidade. Os usuários são aconselhados a não confiar exclusivamente no modelo para tomar decisões importantes e devem sempre exercer seu próprio julgamento ao interpretar e usar o conteúdo gerado.

O uso do modelo é de inteira responsabilidade do usuário. O desenvolvedor do modelo não se responsabiliza por qualquer dano ou prejuízo resultante do uso ou mau uso do conteúdo gerado pelo modelo.

# Open Portuguese LLM Leaderboard Evaluation Results  

Detailed results can be found [here](https://huggingface.co/datasets/eduagarcia-temp/llm_pt_leaderboard_raw_results/tree/main/lucianosb/boto-7B-v1.1) and on the [🚀 Open Portuguese LLM Leaderboard](https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard)

|          Metric          |  Value  |
|--------------------------|---------|
|Average                   |**61.02**|
|ENEM Challenge (No Images)|    60.81|
|BLUEX (No Images)         |    49.37|
|OAB Exams                 |    42.28|
|Assin2 RTE                |    88.12|
|Assin2 STS                |    63.71|
|FaQuAD NLI                |    48.83|
|HateBR Binary             |    75.97|
|PT Hate Speech Binary     |    64.66|
|tweetSentBR               |    55.45|

# Uploaded  model

- **Developed by:** lucianosb
- **License:** apache-2.0
- **Finetuned from model :** unsloth/mistral-7b-bnb-4bit

This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.

[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)