Views
No views yet
0.13.0.dev01# !pip install transformers==4.55.4
2# !pip install --no-deps trl==0.22.2
3# !pip install --no-build-isolation mamba_ssm==2.2.5
4# !pip install --no-build-isolation causal_conv1d==1.5.2
5# === Model Configuration ===
6base_model: apertus/trained-instruct-attn
7load_in_8bit: false
8load_in_4bit: false
9
10# === HF Configuration ===
11#hub_model_id: ToastyPigeon/muse-marvin-32k-lora-2
12#hub_strategy: "every_save"
13output_dir: apertus/trained-again-instruct-o-down
14
15# === Wandb Tracking ===
16wandb_project: ApertusTests
17# wandb_entity: [WANDB_ENTITY]
18wandb_name: trained-again-instruct-o-down
19
20# === Training Setup ===
21num_epochs: 1
22micro_batch_size: 1
23gradient_accumulation_steps: 4
24sequence_len: 4096
25#sequence_parallel_degree: 2
26#heads_k_stride: 1
27sample_packing: true
28#pad_to_sequence_len: true
29#temperature: 0.7
30#max_steps: 10
31# === Evaluation ===
32val_set_size: 0.025
33evals_per_epoch: 10
34#eval_steps: 20
35#max_steps: 60
36#eval_table_size:
37eval_max_new_tokens: 128
38#eval_sample_packing: true
39#eval_strategy: "no"
40
41# === LoRA Configuration ===
42adapter:
43lora_model_dir:
44lora_r:
45lora_alpha:
46lora_dropout:
47lora_target_linear:
48lora_target_modules:
49# - up_proj
50# - down_proj
51# - gate_proj
52# - q_proj
53# - v_proj
54# - k_proj
55# - o_proj
56# - input_layernorm
57# - post_attention_layernorm
58# - embed_tokens
59# - lm_head
60
61lora_fan_in_fan_out:
62#peft_use_rslora: true
63lora_modules_to_save:
64# - embed_tokens
65# - lm_head
66#fix_untrained_tokens: true
67#lora_mlp_kernel: true
68#lora_qkv_kernel: true
69#lora_o_kernel: true
70unfrozen_parameters:
71 - model.layers.[0-9]+.self_attn.o_proj
72 - model.layers.[0-9]+.mlp.down_proj
73# === Hyperparameter Configuration ===
74#optimizer: apollo_adamw_layerwise
75#warmup_steps: 0
76warmup_ratio: 0.025
77optimizer: adamw_torch_fused
78#optimizer: paged_adamw_8bit
79#optim_args:
80# enable_stochastic_rounding: true
81# enable_cautious: true
82# enable_8bit: true
83# Apollo-mini configuration:
84#optim_args: "proj=random,rank=128,scale=128.0,scale_type=tensor,update_proj_gap=100"
85# Regular Apollo configuration:
86# optim_args:
87#optim_target_modules: all_linear
88learning_rate: 1e-5
89lr_scheduler: cosine
90#cosine_min_lr_ratio: 0.2
91#lr_scheduler: cosine_with_min_lr
92#lr_scheduler_kwargs:
93# cosine_min_lr: 1e-6
94weight_decay: 0.01
95max_grad_norm: 1.0
96#warmup_steps: 0
97#warmup_ratio: 0.025
98
99
100# === Data Configuration ===
101#
102#chat_template: jinja
103chat_template: chatml
104special_tokens:
105# eos_token: "<|im_end|>"
106# eos_token: "</s>"
107#tokenizer_use_mistral_common: true
108shuffle_merged_datasets: true
109datasets:
110# - path: grimulkan/LimaRP-augmented
111# type: chat_template
112# field_messages: conversations
113# message_property_mappings:
114# role: from
115# content: value
116# - path: allenai/tulu-3-sft-personas-instruction-following
117# type: chat_template
118# split: train[:10%]
119# - path: ToastyPigeon/mixed-medical-reasoning-formatted
120# type: chat_template
121# data_files: mixed-medical-thinking.json
122# split: train[:10%]
123# - path: ToastyPigeon/steve-and-marvin
124# type: completion
125# data_files: marvin.json
126# - path: ToastyPigeon/kimi-stories-completion
127# type: completion
128# - path: ToastyPigeon/new-story-dataset
129 # type: customcompletion-regex
130# type: completion
131# data_files: new-story-dataset-v2.json
132# - path: allura-org/fujin-instruct-v2
133# type: customchatml-regex
134# type: chat_template
135# field_messages: conversations
136# message_property_mappings:
137# role: from
138# content: value
139# - path: ToastyPigeon/some-rp-extended
140 # type: customchatml-regex
141# type: chat_template
142# field_messages: conversations
143# message_property_mappings:
144# role: from
145# content: value
146# roles_to_train: ["user","assistant"]
147 - path: allura-forge/koto-instruct-sft
148# type: customchatml-regex
149 type: chat_template
150 split: train[50%:]
151 field_messages: conversations
152 message_property_mappings:
153 role: from
154 content: value
155# - path: ToastyPigeon/SpringDragon
156# type: customcompletion-regex
157# type: completion
158# split: train
159# - path: ToastyPigeon/some-erotica
160# type: customcompletion-regex
161# type: completion
162# split: train[:10%]
163# - path: ToastyPigeon/tulu-mini
164# type: chat_template
165dataset_prepared_path: last_run_prepared
166
167
168# === Plugins ===
169plugins:
170 - axolotl.integrations.liger.LigerPlugin
171 - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
172
173# === Hardware Optimization ===
174#gradient_checkpointing: true
175liger_rope: true
176liger_rms_norm: true
177liger_layer_norm: true
178liger_glu_activation: true
179#liger_fused_linear_cross_entropy: true
180cut_cross_entropy: true
181
182#deepspeed: ../axolotl/deepspeed_configs/zero2.json
183
184# === FSDP Config ===
185fsdp:
186 - full_shard
187 - auto_wrap
188fsdp_config:
189 fsdp_limit_all_gathers: true
190 fsdp_sync_module_states: true
191 fsdp_offload_params: true
192 fsdp_activation_checkpointing: true
193 fsdp_use_orig_params: true
194 fsdp_cpu_ram_efficient_loading: true
195 fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
196 fsdp_transformer_layer_cls_to_wrap: ApertusDecoderLayer
197 fsdp_state_dict_type: FULL_STATE_DICT
198 fsdp_sharding_strategy: FULL_SHARD
199
200# === Checkpointing ===
201#save_steps: 10
202saves_per_epoch: 1
203save_total_limit: 1
204
205# === Advanced Settings ===
206bf16: auto
207flash_attention: true
208train_on_inputs: false
209group_by_length: false
210save_safetensors: true
211logging_steps: 1
212gc_steps: 10
213seed: 69
214
215
216
217| Training Loss | Epoch | Step | Validation Loss | Active (gib) | Allocated (gib) | Reserved (gib) |
|---|---|---|---|---|---|---|
| No log | 0 | 0 | 1.0191 | 6.25 | 5.19 | 6.43 |
| 0.8751 | 0.1008 | 52 | 0.9954 | 5.15 | 5.15 | 6.41 |
| 1.0313 | 0.2016 | 104 | 0.9796 | 5.15 | 5.15 | 6.41 |
| 1.0144 | 0.3023 | 156 | 0.9677 | 5.15 | 5.15 | 6.41 |
| 1.0103 | 0.4031 | 208 | 0.9606 | 5.15 | 5.15 | 6.41 |
| 0.862 | 0.5039 | 260 | 0.9553 | 5.15 | 5.15 | 6.41 |
| 0.9892 | 0.6047 | 312 | 0.9512 | 5.15 | 5.15 | 6.41 |
| 1.0593 | 0.7054 | 364 | 0.9488 | 5.15 | 5.15 | 6.41 |
| 0.9527 | 0.8062 | 416 | 0.9474 | 5.15 | 5.15 | 6.41 |
| 0.8602 | 0.9070 | 468 | 0.9467 | 5.15 | 5.15 | 6.41 |