evilfreelancer
commited on
Commit
•
cca32e9
1
Parent(s):
cac6871
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,81 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: ai-forever/ruGPT-3.5-13B
|
3 |
+
library_name: peft
|
4 |
+
license: mit
|
5 |
+
datasets:
|
6 |
+
- evilfreelancer/ru-chain-of-thought-sharegpt
|
7 |
+
language:
|
8 |
+
- ru
|
9 |
+
tags:
|
10 |
+
- impruver
|
11 |
+
- russian
|
12 |
+
- cot
|
13 |
+
- chain of thought
|
14 |
+
- lora
|
15 |
+
pipeline_tag: text-generation
|
16 |
+
---
|
17 |
+
|
18 |
+
# ruGPT-3.5-13B / chain of thought
|
19 |
+
|
20 |
+
LoRA адаптер для ruGPT3.5-13B обученный на датасете [evilfreelancer/ru-chain-of-thought-sharegpt](https://huggingface.co/datasets/evilfreelancer/ru-chain-of-thought-sharegpt)
|
21 |
+
данный датасет представляет из себя перевод на русский
|
22 |
+
датасета [isaiahbjork/chain-of-thought-sharegpt](https://huggingface.co/datasets/isaiahbjork/chain-of-thought-sharegpt) при
|
23 |
+
помощи модели [utrobinmv/t5_translate_en_ru_zh_small_1024](https://huggingface.co/utrobinmv/t5_translate_en_ru_zh_small_1024)
|
24 |
+
прикладываю скрипт [перевода](https://gist.github.com/EvilFreelancer/230fb48329889506cf88c03b8893e4b9) на Gist.
|
25 |
+
|
26 |
+
Конфигурация: https://github.com/EvilFreelancer/impruver/blob/main/configs/ruGPT35_13B_cot_lora.yml
|
27 |
+
|
28 |
+
Адаптер обучался на 1x RTX 4090, для этого потребовалось примерно 20Gb VRAM и заняло 19m.
|
29 |
+
|
30 |
+
```yaml
|
31 |
+
output_dir: ./models/ruGPT35_13B_lora_cot
|
32 |
+
train_path: ./train.ruGPT35_13B_cot.jsonl
|
33 |
+
val_path: ./val.ruGPT35_13B_cot.jsonl
|
34 |
+
|
35 |
+
datasets:
|
36 |
+
- name: evilfreelancer/ru-chain-of-thought-sharegpt
|
37 |
+
converter: impruver.conversations_to_messages
|
38 |
+
|
39 |
+
model:
|
40 |
+
class: transformers.AutoModelForCausalLM
|
41 |
+
name: ai-forever/ruGPT-3.5-13B
|
42 |
+
load_in_4bit: true
|
43 |
+
load_in_8bit: false
|
44 |
+
dtype: bf16
|
45 |
+
|
46 |
+
lora:
|
47 |
+
r: 16
|
48 |
+
lora_alpha: 16
|
49 |
+
lora_dropout: 0.05
|
50 |
+
bias: none
|
51 |
+
target_modules: [ c_attn ]
|
52 |
+
task_type: CAUSAL_LM
|
53 |
+
|
54 |
+
tokenizer:
|
55 |
+
class: transformers.AutoTokenizer
|
56 |
+
name: ai-forever/ruGPT-3.5-13B
|
57 |
+
max_tokens_count: 1200
|
58 |
+
|
59 |
+
trainer:
|
60 |
+
eval_strategy: steps
|
61 |
+
save_strategy: steps
|
62 |
+
eval_steps: 100
|
63 |
+
save_steps: 100
|
64 |
+
per_device_train_batch_size: 1
|
65 |
+
per_device_eval_batch_size: 1
|
66 |
+
gradient_accumulation_steps: 5
|
67 |
+
logging_steps: 1
|
68 |
+
learning_rate: 0.0002
|
69 |
+
num_train_epochs: 2
|
70 |
+
lr_scheduler_type: cosine
|
71 |
+
warmup_steps: 16
|
72 |
+
optim: adamw_8bit
|
73 |
+
metric_for_best_model: eval_loss
|
74 |
+
load_best_model_at_end: true
|
75 |
+
save_total_limit: 2
|
76 |
+
seed: 42
|
77 |
+
remove_unused_columns: false
|
78 |
+
max_grad_norm: 1.0
|
79 |
+
weight_decay: 0.08
|
80 |
+
torch_compile: false
|
81 |
+
```
|