Upload tokenizer
Browse files- README.md +78 -35
- tokenizer.json +28 -6
- tokenizer_config.json +3 -1
README.md
CHANGED
@@ -1,66 +1,109 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
4 |
tags:
|
5 |
-
- trl
|
6 |
-
- sft
|
7 |
- SFT
|
8 |
- Zeroshot
|
9 |
-
- generated_from_trainer
|
10 |
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
11 |
model-index:
|
12 |
-
- name: model-card-test1
|
13 |
results: []
|
14 |
---
|
15 |
|
16 |
-
|
17 |
-
should probably proofread and complete it, then remove this comment. -->
|
18 |
|
19 |
-
|
20 |
|
21 |
-
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) on an unknown dataset.
|
22 |
It achieves the following results on the evaluation set:
|
23 |
-
- Loss:
|
24 |
|
25 |
-
##
|
26 |
|
27 |
-
|
28 |
|
29 |
-
##
|
30 |
|
31 |
-
|
32 |
|
33 |
-
|
|
|
|
|
|
|
34 |
|
35 |
-
|
|
|
|
|
|
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
### Training hyperparameters
|
40 |
|
41 |
The following hyperparameters were used during training:
|
42 |
- learning_rate: 0.0002
|
43 |
-
-
|
44 |
-
-
|
45 |
-
-
|
46 |
-
-
|
47 |
-
- num_devices: 2
|
48 |
- total_train_batch_size: 16
|
49 |
-
-
|
50 |
-
-
|
51 |
-
-
|
52 |
-
-
|
53 |
-
-
|
54 |
-
- mixed_precision_training: Native AMP
|
55 |
|
56 |
### Training results
|
57 |
|
58 |
-
|
59 |
|
60 |
### Framework versions
|
61 |
|
62 |
-
-
|
63 |
-
-
|
64 |
-
-
|
65 |
-
-
|
66 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- pt
|
4 |
+
- en
|
5 |
+
- es
|
6 |
+
license: mit
|
7 |
+
library_name: trl
|
8 |
tags:
|
|
|
|
|
9 |
- SFT
|
10 |
- Zeroshot
|
|
|
11 |
base_model: mistralai/Mistral-7B-Instruct-v0.2
|
12 |
model-index:
|
13 |
+
- name: Weni/model-card-test1
|
14 |
results: []
|
15 |
---
|
16 |
|
17 |
+
# Weni/model-card-test1
|
|
|
18 |
|
19 |
+
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.2] on the dataset Weni/zeroshot-3.2.0 with the SFT trainer. It is part of the Zeroshot project for [Weni](https://weni.ai/).
|
20 |
|
|
|
21 |
It achieves the following results on the evaluation set:
|
22 |
+
- Loss: 0
|
23 |
|
24 |
+
## Intended uses & limitations
|
25 |
|
26 |
+
This model has not been trained to avoid specific intructions.
|
27 |
|
28 |
+
## Training procedure
|
29 |
|
30 |
+
Finetuning was done on the model mistralai/Mistral-7B-Instruct-v0.2 with the following prompt:
|
31 |
|
32 |
+
```
|
33 |
+
Portuguese:
|
34 |
+
<s>[INST]Você é muito especialista em classificar a frase do usuário em um chatbot sobre: {context}
|
35 |
+
Pare, pense bem e responda com APENAS UM ÚNICO \`id\` da classe que melhor represente a intenção para a frase do usuário de acordo com a análise de seu contexto, responda APENAS com o \`id\` da classe só se você tiver muita certeza e não explique o motivo. Na ausência, falta de informações ou caso a frase do usuário não se enquadre em nenhuma classe, classifique como "-1".
|
36 |
|
37 |
+
# Essas são as Classes com seus Id e Contexto:
|
38 |
+
\`\`\`python
|
39 |
+
{all_classes}
|
40 |
+
\`\`\`
|
41 |
|
42 |
+
# Frase do usuário: {input}
|
43 |
+
# Id da Classe: [/INST] \n {output_id} </s>
|
44 |
+
|
45 |
+
|
46 |
+
Spanish:
|
47 |
+
<s>[INST]Eres muy experto en clasificar la frase del usuario en un chatbot sobre: {context}
|
48 |
+
Deténgase, piense bien y responda con SOLO UN ÚNICO \`id\` de la clase que mejor represente la intención para la frase del usuario de acuerdo con el análisis de su contexto, responda SOLO con el \`id\` de la clase si está muy seguro y no explique el motivo. En ausencia, falta de información o en caso de que la frase del usuario no se ajuste a ninguna clase, clasifique como "-1".
|
49 |
+
|
50 |
+
# Estas son las Clases con sus Id y Contexto:
|
51 |
+
{all_classes}
|
52 |
+
|
53 |
+
# Frase del usuario: {input}
|
54 |
+
# Id de la Clase: [/INST] \n {output_id} </s>
|
55 |
+
|
56 |
+
|
57 |
+
English:
|
58 |
+
<s>[INST]You are very expert in classifying the user sentence in a chatbot about: {context}
|
59 |
+
Stop, think carefully, and respond with ONLY ONE SINGLE \`id\` of the class that best represents the intention for the user's sentence according to the analysis of its context, respond ONLY with the \`id\` of the class if you are very sure and do not explain the reason. In the absence, lack of information, or if the user's sentence does not fit into any class, classify as "-1".
|
60 |
+
|
61 |
+
# These are the Classes and its Context:
|
62 |
+
{all_classes}
|
63 |
+
|
64 |
+
# User's sentence: {input}
|
65 |
+
# Class Id: [/INST] \n {output_id} </s>
|
66 |
+
```
|
67 |
|
68 |
### Training hyperparameters
|
69 |
|
70 |
The following hyperparameters were used during training:
|
71 |
- learning_rate: 0.0002
|
72 |
+
- per_device_train_batch_size: 8
|
73 |
+
- per_device_eval_batch_size: 2
|
74 |
+
- gradient_accumulation_steps: 1
|
75 |
+
- num_gpus: 2
|
|
|
76 |
- total_train_batch_size: 16
|
77 |
+
- optimizer: AdamW
|
78 |
+
- lr_scheduler_type: cosine
|
79 |
+
- num_steps: 1
|
80 |
+
- quantization_type: bitsandbytes
|
81 |
+
- LoRA: ("\n - bits: 4\n - use_exllama: True\n - device_map: auto\n - use_cache: False\n - lora_r: 8\n - lora_alpha: 16\n - lora_dropout: 0.1\n - bias: none\n - target_modules: ['q_proj', 'k_proj', 'v_proj', 'o_proj']\n - task_type: CAUSAL_LM",)
|
|
|
82 |
|
83 |
### Training results
|
84 |
|
85 |
+
{'eval_loss': 1.8359004259109497, 'eval_runtime': 399.3154, 'eval_samples_per_second': 7.18, 'eval_steps_per_second': 1.796, 'epoch': 0.0}
|
86 |
|
87 |
### Framework versions
|
88 |
|
89 |
+
- git+https://github.com/huggingface/transformers@main
|
90 |
+
- datasets==2.17.1
|
91 |
+
- peft==0.8.2
|
92 |
+
- safetensors==0.4.2
|
93 |
+
- evaluate==0.4.1
|
94 |
+
- bitsandbytes==0.42
|
95 |
+
- huggingface_hub==0.20.3
|
96 |
+
- seqeval==1.2.2
|
97 |
+
- optimum==1.17.1
|
98 |
+
- auto-gptq==0.7.0
|
99 |
+
- gpustat==1.1.1
|
100 |
+
- deepspeed==0.13.2
|
101 |
+
- wandb==0.16.3
|
102 |
+
- git+https://github.com/huggingface/trl.git@main
|
103 |
+
- git+https://github.com/huggingface/accelerate.git@main
|
104 |
+
- coloredlogs==15.0.1
|
105 |
+
- traitlets==5.14.1
|
106 |
+
- autoawq@https://github.com/casper-hansen/AutoAWQ/releases/download/v0.2.0/autoawq-0.2.0+cu118-cp310-cp310-linux_x86_64.whl
|
107 |
+
|
108 |
+
### Hardware
|
109 |
+
- Cloud provided: runpod.io
|
tokenizer.json
CHANGED
@@ -1,11 +1,6 @@
|
|
1 |
{
|
2 |
"version": "1.0",
|
3 |
-
"truncation":
|
4 |
-
"direction": "Right",
|
5 |
-
"max_length": 2048,
|
6 |
-
"strategy": "LongestFirst",
|
7 |
-
"stride": 0
|
8 |
-
},
|
9 |
"padding": null,
|
10 |
"added_tokens": [
|
11 |
{
|
@@ -67,6 +62,12 @@
|
|
67 |
"id": "A",
|
68 |
"type_id": 0
|
69 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
],
|
72 |
"pair": [
|
@@ -82,6 +83,12 @@
|
|
82 |
"type_id": 0
|
83 |
}
|
84 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
{
|
86 |
"SpecialToken": {
|
87 |
"id": "<s>",
|
@@ -93,9 +100,24 @@
|
|
93 |
"id": "B",
|
94 |
"type_id": 1
|
95 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
],
|
98 |
"special_tokens": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
"<s>": {
|
100 |
"id": "<s>",
|
101 |
"ids": [
|
|
|
1 |
{
|
2 |
"version": "1.0",
|
3 |
+
"truncation": null,
|
|
|
|
|
|
|
|
|
|
|
4 |
"padding": null,
|
5 |
"added_tokens": [
|
6 |
{
|
|
|
62 |
"id": "A",
|
63 |
"type_id": 0
|
64 |
}
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"SpecialToken": {
|
68 |
+
"id": "</s>",
|
69 |
+
"type_id": 0
|
70 |
+
}
|
71 |
}
|
72 |
],
|
73 |
"pair": [
|
|
|
83 |
"type_id": 0
|
84 |
}
|
85 |
},
|
86 |
+
{
|
87 |
+
"SpecialToken": {
|
88 |
+
"id": "</s>",
|
89 |
+
"type_id": 0
|
90 |
+
}
|
91 |
+
},
|
92 |
{
|
93 |
"SpecialToken": {
|
94 |
"id": "<s>",
|
|
|
100 |
"id": "B",
|
101 |
"type_id": 1
|
102 |
}
|
103 |
+
},
|
104 |
+
{
|
105 |
+
"SpecialToken": {
|
106 |
+
"id": "</s>",
|
107 |
+
"type_id": 1
|
108 |
+
}
|
109 |
}
|
110 |
],
|
111 |
"special_tokens": {
|
112 |
+
"</s>": {
|
113 |
+
"id": "</s>",
|
114 |
+
"ids": [
|
115 |
+
2
|
116 |
+
],
|
117 |
+
"tokens": [
|
118 |
+
"</s>"
|
119 |
+
]
|
120 |
+
},
|
121 |
"<s>": {
|
122 |
"id": "<s>",
|
123 |
"ids": [
|
tokenizer_config.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"add_bos_token": true,
|
3 |
-
"add_eos_token":
|
4 |
"added_tokens_decoder": {
|
5 |
"0": {
|
6 |
"content": "<unk>",
|
@@ -33,8 +33,10 @@
|
|
33 |
"clean_up_tokenization_spaces": false,
|
34 |
"eos_token": "</s>",
|
35 |
"legacy": true,
|
|
|
36 |
"model_max_length": 1000000000000000019884624838656,
|
37 |
"pad_token": "</s>",
|
|
|
38 |
"sp_model_kwargs": {},
|
39 |
"spaces_between_special_tokens": false,
|
40 |
"tokenizer_class": "LlamaTokenizer",
|
|
|
1 |
{
|
2 |
"add_bos_token": true,
|
3 |
+
"add_eos_token": true,
|
4 |
"added_tokens_decoder": {
|
5 |
"0": {
|
6 |
"content": "<unk>",
|
|
|
33 |
"clean_up_tokenization_spaces": false,
|
34 |
"eos_token": "</s>",
|
35 |
"legacy": true,
|
36 |
+
"max_lenght": 2048,
|
37 |
"model_max_length": 1000000000000000019884624838656,
|
38 |
"pad_token": "</s>",
|
39 |
+
"padding": true,
|
40 |
"sp_model_kwargs": {},
|
41 |
"spaces_between_special_tokens": false,
|
42 |
"tokenizer_class": "LlamaTokenizer",
|