pasha commited on
Commit
8009b99
·
1 Parent(s): f57b007

Readme updated

Browse files
Files changed (2) hide show
  1. .gitignore +1 -0
  2. README.md +115 -199
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ /.idea/
README.md CHANGED
@@ -1,216 +1,132 @@
1
  ---
2
  license: mit
3
  datasets:
4
- - mizinovmv/ru_example_DeepSeek-R1-Distill-Qwen-32B
 
 
 
 
 
5
  language:
6
- - ru
 
7
  base_model:
8
- - yandex/YandexGPT-5-Lite-8B-pretrain
9
  pipeline_tag: text-generation
10
  library_name: peft
11
  tags:
12
- - r1
13
- - reasoning
14
- - think
15
- - thinking
16
- - russian
17
- - general
 
18
  ---
19
 
20
- # Model Card for Model ID
21
 
22
- <!-- Provide a quick summary of what the model is/does. -->
 
23
 
 
 
24
 
 
25
 
26
- ## Model Details
 
27
 
28
- ### Model Description
29
 
30
- <!-- Provide a longer summary of what this model is. -->
 
 
 
31
 
32
-
33
-
34
- - **Developed by:** [More Information Needed]
35
- - **Funded by [optional]:** [More Information Needed]
36
- - **Shared by [optional]:** [More Information Needed]
37
- - **Model type:** [More Information Needed]
38
- - **Language(s) (NLP):** [More Information Needed]
39
- - **License:** [More Information Needed]
40
- - **Finetuned from model [optional]:** [More Information Needed]
41
-
42
- ### Model Sources [optional]
43
-
44
- <!-- Provide the basic links for the model. -->
45
-
46
- - **Repository:** [More Information Needed]
47
- - **Paper [optional]:** [More Information Needed]
48
- - **Demo [optional]:** [More Information Needed]
49
-
50
- ## Uses
51
-
52
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
53
-
54
- ### Direct Use
55
-
56
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
57
-
58
- [More Information Needed]
59
-
60
- ### Downstream Use [optional]
61
-
62
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
63
-
64
- [More Information Needed]
65
-
66
- ### Out-of-Scope Use
67
-
68
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
69
-
70
- [More Information Needed]
71
-
72
- ## Bias, Risks, and Limitations
73
-
74
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
75
-
76
- [More Information Needed]
77
-
78
- ### Recommendations
79
-
80
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
81
-
82
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
83
-
84
- ## How to Get Started with the Model
85
-
86
- Use the code below to get started with the model.
87
-
88
- [More Information Needed]
89
-
90
- ## Training Details
91
-
92
- ### Training Data
93
-
94
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
95
-
96
- [More Information Needed]
97
-
98
- ### Training Procedure
99
-
100
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
101
-
102
- #### Preprocessing [optional]
103
-
104
- [More Information Needed]
105
-
106
-
107
- #### Training Hyperparameters
108
-
109
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
110
-
111
- #### Speeds, Sizes, Times [optional]
112
-
113
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
114
-
115
- [More Information Needed]
116
-
117
- ## Evaluation
118
-
119
- <!-- This section describes the evaluation protocols and provides the results. -->
120
-
121
- ### Testing Data, Factors & Metrics
122
-
123
- #### Testing Data
124
-
125
- <!-- This should link to a Dataset Card if possible. -->
126
-
127
- [More Information Needed]
128
-
129
- #### Factors
130
-
131
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
132
-
133
- [More Information Needed]
134
-
135
- #### Metrics
136
-
137
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
138
-
139
- [More Information Needed]
140
-
141
- ### Results
142
-
143
- [More Information Needed]
144
-
145
- #### Summary
146
-
147
-
148
-
149
- ## Model Examination [optional]
150
-
151
- <!-- Relevant interpretability work for the model goes here -->
152
-
153
- [More Information Needed]
154
-
155
- ## Environmental Impact
156
-
157
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
158
-
159
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
160
-
161
- - **Hardware Type:** [More Information Needed]
162
- - **Hours used:** [More Information Needed]
163
- - **Cloud Provider:** [More Information Needed]
164
- - **Compute Region:** [More Information Needed]
165
- - **Carbon Emitted:** [More Information Needed]
166
-
167
- ## Technical Specifications [optional]
168
-
169
- ### Model Architecture and Objective
170
-
171
- [More Information Needed]
172
-
173
- ### Compute Infrastructure
174
-
175
- [More Information Needed]
176
-
177
- #### Hardware
178
-
179
- [More Information Needed]
180
-
181
- #### Software
182
-
183
- [More Information Needed]
184
-
185
- ## Citation [optional]
186
-
187
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
188
-
189
- **BibTeX:**
190
-
191
- [More Information Needed]
192
-
193
- **APA:**
194
-
195
- [More Information Needed]
196
-
197
- ## Glossary [optional]
198
-
199
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
200
-
201
- [More Information Needed]
202
-
203
- ## More Information [optional]
204
-
205
- [More Information Needed]
206
-
207
- ## Model Card Authors [optional]
208
-
209
- [More Information Needed]
210
-
211
- ## Model Card Contact
212
-
213
- [More Information Needed]
214
- ### Framework versions
215
-
216
- - PEFT 0.14.0
 
1
  ---
2
  license: mit
3
  datasets:
4
+ - mizinovmv/ru_example_DeepSeek-R1-Distill-Qwen-32B
5
+ - lightblue/reasoning-multilingual-R1-Llama-70B-train
6
+ - Pinkstack/thinking-multilingual-30-23-small-690
7
+ - Vikhrmodels/reasoning-0.01-ru
8
+ - Vikhrmodels/russian_math
9
+ - kristaller486/Nebo-T1-Russian
10
  language:
11
+ - ru
12
+ - en
13
  base_model:
14
+ - yandex/YandexGPT-5-Lite-8B-pretrain
15
  pipeline_tag: text-generation
16
  library_name: peft
17
  tags:
18
+ - r1
19
+ - reasoning
20
+ - think
21
+ - thinking
22
+ - reflection
23
+ - russian
24
+ - general
25
  ---
26
 
27
+ # Russian r1 / YandexGPT-5-Lite-8B-pretrain
28
 
29
+ LoRA-адаптер для модели [YandexGPT-5-Lite-8B-pretrain](https://huggingface.co/yandex/YandexGPT-5-Lite-8B-pretrain)
30
+ обученный на миксе из датасетов реализующих r1 (ризонинг) подход.
31
 
32
+ Обученная модель способна имитировать логические размышлению на русском языке по аналогии с тем, как
33
+ это делает `r1` от `DeepSeek` или `o1` от `OpenAI` .
34
 
35
+ W&B отчёт: https://api.wandb.ai/links/evilfreelancer/zj6s02v4
36
 
37
+ Обучение производилось при помощи утилиты [impruver](https://github.com/EvilFreelancer/impruver) используя конфигурацию
38
+ [YandexGPT/8B_lora_r1](https://github.com/EvilFreelancer/impruver/blob/main/recipes/configs/YandexGPT/8B_lora_r1.yaml).
39
 
40
+ На всё про всё ушло примерно 18 часов на RTX 4090, при этом понадобилось 23.5Гб видеопамяти.
41
 
42
+ ```yaml
43
+ output_dir: ./models/YandexGPT-5-Lite_7B_lora_thinking
44
+ train_path: ./train.YandexGPT-5-Lite_7B_lora_thinking.jsonl
45
+ val_path: ./val.YandexGPT-5-Lite_7B_lora_thinking.jsonl
46
 
47
+ datasets:
48
+ - name: mizinovmv/ru_example_DeepSeek-R1-Distill-Qwen-32B
49
+ converter: impruver.instruction_to_messages
50
+ add_global_bos: false
51
+ add_global_eos: false
52
+ mapping:
53
+ instruction: ru_query
54
+ output: response
55
+ - name: lightblue/reasoning-multilingual-R1-Llama-70B-train
56
+ converter: impruver.instruction_to_messages
57
+ add_global_bos: false
58
+ add_global_eos: false
59
+ mapping:
60
+ instruction: translated_prompt
61
+ output: response
62
+ - name: Pinkstack/thinking-multilingual-30-23-full-690
63
+ converter: impruver.instruction_to_messages
64
+ add_global_bos: false
65
+ add_global_eos: false
66
+ - name: Vikhrmodels/reasoning-0.01-ru
67
+ converter: impruver.reasoning_to_messages
68
+ add_global_bos: false
69
+ add_global_eos: false
70
+ - name: Vikhrmodels/russian_math
71
+ converter: impruver.reasoning_to_messages
72
+ add_global_bos: false
73
+ add_global_eos: false
74
+ mapping:
75
+ instruction: task
76
+ reasoning: solution
77
+ output: short answer
78
+ - name: kristaller486/Nebo-T1-Russian
79
+ converter: impruver.reasoning_to_messages
80
+ add_global_bos: false
81
+ add_global_eos: false
82
+ mapping:
83
+ instruction: prompt
84
+ reasoning: think
85
+ output: answer
86
+
87
+ model:
88
+ class: transformers.AutoModelForCausalLM
89
+ name: yandex/YandexGPT-5-Lite-8B-pretrain
90
+ load_in_4bit: true
91
+ load_in_8bit: false
92
+ dtype: bf16
93
+
94
+ lora:
95
+ r: 8 # higher increases accuracy and memory
96
+ lora_alpha: 16 # usually alpha=2*rank
97
+ lora_dropout: 0
98
+ bias: none
99
+ target_modules: [ 'q_proj', 'v_proj', 'output_proj' ]
100
+ task_type: CAUSAL_LM
101
+
102
+ tokenizer:
103
+ class: transformers.AutoTokenizer
104
+ name: yandex/YandexGPT-5-Lite-8B-pretrain
105
+ max_tokens_count: 1400
106
+ special_tokens:
107
+ pad_token_id: 1
108
+ pad_token: <s>
109
+
110
+ trainer:
111
+ eval_strategy: steps
112
+ save_strategy: steps
113
+ eval_steps: 1000
114
+ save_steps: 1000
115
+ per_device_train_batch_size: 1
116
+ per_device_eval_batch_size: 1
117
+ gradient_accumulation_steps: 8
118
+ logging_steps: 10
119
+ learning_rate: 0.000005
120
+ num_train_epochs: 2
121
+ lr_scheduler_type: cosine
122
+ warmup_steps: 100
123
+ optim: adamw_torch_4bit
124
+ metric_for_best_model: eval_loss
125
+ load_best_model_at_end: true
126
+ save_total_limit: 2
127
+ seed: 42
128
+ remove_unused_columns: false
129
+ max_grad_norm: 1.0
130
+ weight_decay: 0.01
131
+ torch_compile: false
132
+ ```