File size: 3,327 Bytes
8fa8ac4
b96e66f
 
8fa8ac4
b96e66f
 
5f031f7
8fa8ac4
b96e66f
8fa8ac4
b96e66f
8fa8ac4
 
b96e66f
8fa8ac4
b96e66f
 
8fa8ac4
 
b96e66f
8fa8ac4
b96e66f
8fa8ac4
b96e66f
8fa8ac4
b96e66f
8fa8ac4
b96e66f
8fa8ac4
b96e66f
 
 
 
 
 
 
8fa8ac4
b96e66f
 
8fa8ac4
b96e66f
 
 
 
 
 
 
 
 
 
8fa8ac4
 
 
 
 
b96e66f
 
8fa8ac4
b96e66f
8fa8ac4
b96e66f
 
 
 
 
8fa8ac4
 
 
 
 
b96e66f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
library_name: "trl"
tags:
- KTO
- WeniGPT
base_model: mistralai/Mixtral-8x7B-Instruct-v0.1
model-index:
- name: Weni/WeniGPT-QA-Mixstral-7B-5.0.0-KTO
  results: []
language: ['pt']
---

# Weni/WeniGPT-QA-Mixstral-7B-5.0.0-KTO

This model is a fine-tuned version of [mistralai/Mixtral-8x7B-Instruct-v0.1] on the dataset Weni/WeniGPT-QA-Binarized-1.2.0 with the KTO trainer. It is part of the WeniGPT project for [Weni](https://weni.ai/).
Description: WeniGPT Experiment using KTO trainer with no collator, Mixstral model and random system prompt.

It achieves the following results on the evaluation set:
{'eval_loss': 0.041092585772275925, 'eval_runtime': 962.9422, 'eval_samples_per_second': 0.494, 'eval_steps_per_second': 0.124, 'eval/rewards/chosen': 3.7070999145507812, 'eval/rewards/rejected': -19.991207122802734, 'eval/kl': 0.0, 'eval/logps/chosen': -122.67949676513672, 'eval/logps/rejected': -363.1288146972656, 'eval/rewards/margins': 23.698307037353516, 'epoch': 1.0}

## Intended uses & limitations

This model has not been trained to avoid specific intructions. 

## Training procedure

Finetuning was done on the model mistralai/Mixtral-8x7B-Instruct-v0.1 with the following prompt:

```
---------------------
Question:
<|system|>
Você é um médico tratando um paciente com amnésia. Para responder as perguntas do paciente, você irá ler um texto anteriormente para se contextualizar. Se você trouxer informações desconhecidas, fora do texto lido, poderá deixar o paciente confuso. Se o paciente fizer uma questão sobre informações não presentes no texto, você precisa responder de forma educada que você não tem informação suficiente para responder, pois se tentar responder, pode trazer informações que não ajudarão o paciente recuperar sua memória. Lembre, se não estiver no texto, você precisa responder de forma educada que você não tem informação suficiente para responder. Precisamos ajudar o paciente.
<|user|>
Contexto: {context}

Questão: {question}</s>
<|assistant|>



---------------------
Response:
{response}</s>


---------------------

```

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0002
- per_device_train_batch_size: 4
- per_device_eval_batch_size: 4
- gradient_accumulation_steps: 8
- num_gpus: 1
- total_train_batch_size: 32
- optimizer: AdamW
- lr_scheduler_type: cosine
- num_steps: 131
- quantization_type: bitsandbytes
- LoRA: ("\n  - bits: 4\n  - use_exllama: True\n  - device_map: auto\n  - use_cache: False\n  - lora_r: 16\n  - lora_alpha: 32\n  - lora_dropout: 0.05\n  - bias: none\n  - target_modules: ['q_proj', 'k_proj', 'v_proj', 'o_proj']\n  - task_type: CAUSAL_LM",)

### Training results

### Framework versions

- transformers==4.39.1
- datasets==2.18.0
- peft==0.10.0
- safetensors==0.4.2
- evaluate==0.4.1
- bitsandbytes==0.43
- huggingface_hub==0.20.3
- seqeval==1.2.2
- optimum==1.17.1
- auto-gptq==0.7.1
- gpustat==1.1.1
- deepspeed==0.14.0
- wandb==0.16.3
- # trl==0.8.1
- git+https://github.com/claralp/trl.git@fix_nans#egg=trl
- accelerate==0.28.0
- coloredlogs==15.0.1
- traitlets==5.14.1
- autoawq@https://github.com/casper-hansen/AutoAWQ/releases/download/v0.2.0/autoawq-0.2.0+cu118-cp310-cp310-linux_x86_64.whl

### Hardware
- Cloud provided: runpod.io