Views
No views yet
0.16.11# ─── Model ────────────────────────────────────────────────────────────────────
2# base_model: allenai/OLMoE-1B-7B-0924
3base_model: nlp-projects/almo-OLMoE-1B-7B-0924-wglobalcopy-b3-layerbalancing
4model_type: AutoModelForCausalLM
5tokenizer_type: AutoTokenizer
6trust_remote_code: true
7output_dir: /data2/mohsenfayyaz/projects/ALMo/ALMo/src/sft/artifacts/outputs/almo-olmoe-wglobalcopy-b3-layerbalancing-ftgatewb-nopeft
8hub_model_id: nlp-projects/almo-OLMoE-1B-7B-0924-wglobalcopy-b3-layerbalancing-nopeft
9push_to_hub: false
10hub_private_repo: false
11# resume_from_checkpoint: /data2/mohsenfayyaz/projects/ALMo/ALMo/src/sft/outputs/almo-olmoe-router-only-5k/checkpoint-1000
12
13# Limit tokenization/training data for smoke test
14# max_samples: 100
15
16# ─── Logging ──────────────────────────────────────────────────────────────────
17###### WandB
18wandb_project: almo
19wandb_entity: mohsenfayyaz
20wandb_name: almo-olmoe-wglobalcopy-b3-layerbalancing-ftgatewb-nopeft
21
22# ─── Training mode / Frozen Parameters ────────────────────────────────────────────────────────────
23# adapter: lora # find sth lora for auto adjusting alpha
24# peft_use_rslora: true
25# lora_r: 64 # 16 --> 64
26# lora_alpha: 64 # Change Accordingly
27# lora_dropout: 0.05 # 0.05
28
29# lora_target_modules:
30 # - q_proj
31 # - k_proj
32 # - v_proj
33 # - o_proj
34 # - gate_down_proj
35 # - gate_up_proj
36 # - lm_head
37
38# lora_target_parameters: # experts (fused nn.Parameter) via parameter-LoRA --> lora_dropout: 0
39# - expert_pool.gate_up_proj
40# - expert_pool.down_proj
41# ddp_find_unused_parameters: true
42
43# lora_modules_to_save:
44 # - gate # matches every layer's mlp.gate (weight + bias), full-trainable router
45 # - model.layers.*.mlp.gate.weight
46 # - model.layers.*.mlp.gate.bias
47 # - model.expert_pool.gate_up_proj
48 # - model.expert_pool.down_proj
49
50# Router-only training.
51# Your custom model uses names like:
52# model.layers.0.mlp.gate.weight
53# model.layers.1.mlp.gate.weight
54# This freezes everything except router/gate weights.
55
56unfrozen_parameters:
57 - "^model.layers.[0-9]+.mlp.gate.weight$"
58 - "^model.layers.[0-9]+.mlp.gate.bias$"
59
60
61# ─── Training ─────────────────────────────────────────────────────────────────
62# Training
63bf16: true
64fp16: false
65tf32: true
66
67# gpu * micro_batch_size * gradient_accumulation_steps = 4*2*16 = 128
68# 4*2*16 = 128
69# 2*2*32 = 128
70# 1*2*64 = 128
71# 4*1*32 = 128
72# last run: 4gpus*8*8=256
73micro_batch_size: 8 # 8 for 1 gpu
74gradient_accumulation_steps: 8 # 16 for 1 gpu
75num_epochs: 1
76
77# Required when streaming pretraining datasets
78max_steps: 3000
79
80learning_rate: 1.0e-4 # 1.0e-4
81lr_scheduler: cosine
82warmup_steps: 100
83
84# optimizer: adamw_torch
85optimizer: adamw_torch_fused # fastest; switch to paged_adamw_8bit if OOM
86gradient_checkpointing: false
87gradient_checkpointing_kwargs:
88 use_reentrant: false
89
90# Useful because almost all params are frozen
91layer_offloading: false
92
93# dataloader_num_workers: 8
94# dataloader_prefetch_factor: 8
95
96logging_steps: 10
97save_steps: 500
98save_total_limit: 2
99save_strategy: steps
100eval_strategy: steps
101load_best_model_at_end: true
102metric_for_best_model: eval_loss
103greater_is_better: false
104
105# Keep this false unless you know your custom model supports cache during training
106use_cache: false
107
108# Common downstream evals, close to OLMoE/OLMES set
109# plugins:
110# - axolotl.integrations.lm_eval.LMEvalPlugin
111
112# lm_eval_tasks:
113# - mmlu
114# - hellaswag
115# - arc_easy
116# - arc_challenge
117# - boolq
118# - openbookqa
119# - piqa
120# - sciq
121# - winogrande
122# - social_iqa
123
124# lm_eval_batch_size: 8
125# lm_eval_model: hf
126# lm_eval_model_args:
127# pretrained: ./outputs/almo-olmoe-router-only
128# trust_remote_code: true
129
130# ─── Dataset ──────────────────────────────────────────────────────────────────
131# Raw LM continued pretraining
132
133dataset_prepared_path: /data2/mohsenfayyaz/projects/ALMo/ALMo/src/sft/artifacts/prepared_datasets/dolma-v1_7-3B
134datasets:
135 - path: emozilla/dolma-v1_7-3B
136 type: completion
137 text_column: text
138 split: train
139
140# pretraining_dataset:
141# - path: emozilla/dolma-v1_7-3B
142# type: pretrain
143# text_column: text
144# split: train
145# streaming: false
146
147###### Eval during training: LM loss / perplexity proxy
148# Not "exact OLMoE Paloma" unless you convert OLMo .npy eval files.
149eval_sample_packing: false
150eval_batch_size: 8
151eval_steps: 50
152
153test_datasets:
154 - path: allenai/paloma
155 type: completion
156 name: wikitext_103
157 text_column: text
158 split: val
159 streaming: false
160
161# ─── Sequence ─────────────────────────────────────────────────────────────────
162sequence_len: 2048 # 2048, 4096
163sample_packing: true
164pad_to_sequence_len: true
165
166# ─── Liger kernels: ~25% speedup on Qwen ─────────────────────────────────────
167plugins:
168 - axolotl.integrations.liger.LigerPlugin
169# Keep liger for the speedy ops:
170liger_rope: true
171liger_rms_norm: true
172liger_glu_activation: true
173
174# But disable this — the fused linear CE is the one that doesn't apply during eval anyway,
175# and chunked_cross_entropy is the more reliable replacement
176liger_fused_linear_cross_entropy: false
177
178chunked_cross_entropy: true
179chunked_cross_entropy_num_chunks: 8
180
181
182# ─── Attention: FA3 via HF kernels (no compile) ──────────────────────────────
183flash_attention: true
184attn_implementation: kernels-community/vllm-flash-attn3
185
186# ─── DeepSpeed ────────────────────────────────────────────────────────────────
187# deepspeed: ./deepspeed_configs/zero2_bf16.json
188
189| Training Loss | Epoch | Step | Validation Loss | Ppl | Active (gib) | Allocated (gib) | Reserved (gib) |
|---|---|---|---|---|---|---|---|
| No log | 0 | 0 | 3.9875 | 53.9181 | 21.2 | 21.2 | 21.58 |
| 2.8675 | 0.0057 | 50 | 2.6445 | 14.0758 | 18.06 | 18.06 | 63.41 |
| 2.4690 | 0.0115 | 100 | 2.2957 | 9.9311 | 18.06 | 18.06 | 63.85 |
| 2.4391 | 0.0172 | 150 | 2.2377 | 9.3719 | 18.06 | 18.06 | 63.87 |
| 2.4281 | 0.0229 | 200 | 2.2106 | 9.1210 | 18.06 | 18.06 | 64.44 |
| 2.4412 | 0.0286 | 250 | 2.1946 | 8.9766 | 18.06 | 18.06 | 64.49 |
| 2.3958 | 0.0344 | 300 | 2.1837 | 8.8792 | 18.06 | 18.06 | 64.33 |
| 2.3976 | 0.0401 | 350 | 2.1765 | 8.8155 | 18.06 | 18.06 | 64.22 |
| 2.3725 | 0.0458 | 400 | 2.1708 | 8.7653 | 18.06 | 18.06 | 61.49 |
| 2.3945 | 0.0515 | 450 | 2.1665 | 8.7274 | 18.06 | 18.06 | 64.44 |
| 2.3884 | 0.0573 | 500 | 2.1634 | 8.7009 | 18.06 | 18.06 | 64.31 |
| 2.3758 | 0.0630 | 550 | 2.1601 | 8.6724 | 18.06 | 18.06 | 61.39 |
| 2.3772 | 0.0687 | 600 | 2.1574 | 8.6487 | 18.06 | 18.06 | 64.49 |
| 2.3425 | 0.0745 | 650 | 2.1550 | 8.6276 | 18.06 | 18.06 | 64.51 |
| 2.3803 | 0.0802 | 700 | 2.1529 | 8.6094 | 18.06 | 18.06 | 64.37 |
| 2.3562 | 0.0859 | 750 | 2.1514 | 8.5970 | 18.06 | 18.06 | 63.98 |
| 2.3742 | 0.0916 | 800 | 2.1504 | 8.5884 | 18.06 | 18.06 | 61.55 |
| 2.3716 | 0.0974 | 850 | 2.1494 | 8.5798 | 18.06 | 18.06 | 61.46 |
| 2.3665 | 0.1031 | 900 | 2.1486 | 8.5725 | 18.06 | 18.06 | 64.1 |
| 2.3704 | 0.1088 | 950 | 2.1473 | 8.5620 | 18.06 | 18.06 | 64.42 |
| 2.3440 | 0.1145 | 1000 | 2.1463 | 8.5529 | 18.06 | 18.06 | 64.43 |
| 2.3731 | 0.1203 | 1050 | 2.1458 | 8.5486 | 18.06 | 18.06 | 64.44 |
| 2.3819 | 0.1260 | 1100 | 2.1455 | 8.5459 | 18.06 | 18.06 | 64.47 |
| 2.3528 | 0.1317 | 1150 | 2.1446 | 8.5387 | 18.06 | 18.06 | 61.46 |
| 2.3939 | 0.1375 | 1200 | 2.1441 | 8.5346 | 18.06 | 18.06 | 64.33 |
| 2.3764 | 0.1432 | 1250 | 2.1441 | 8.5343 | 18.06 | 18.06 | 61.45 |
| 2.3747 | 0.1489 | 1300 | 2.1434 | 8.5287 | 18.06 | 18.06 | 64.3 |
| 2.3307 | 0.1546 | 1350 | 2.1432 | 8.5266 | 18.06 | 18.06 | 64.49 |
| 2.3664 | 0.1604 | 1400 | 2.1430 | 8.5246 | 18.06 | 18.06 | 64.42 |
| 2.3397 | 0.1661 | 1450 | 2.1430 | 8.5247 | 18.06 | 18.06 | 61.53 |
| 2.3429 | 0.1718 | 1500 | 2.1422 | 8.5183 | 18.06 | 18.06 | 64.36 |
| 2.3954 | 0.1775 | 1550 | 2.1418 | 8.5151 | 18.06 | 18.06 | 61.44 |
| 2.3647 | 0.1833 | 1600 | 2.1421 | 8.5172 | 18.06 | 18.06 | 64.32 |
| 2.3349 | 0.1890 | 1650 | 2.1415 | 8.5126 | 18.06 | 18.06 | 64.39 |
| 2.3590 | 0.1947 | 1700 | 2.1412 | 8.5096 | 18.06 | 18.06 | 64.39 |
| 2.4027 | 0.2005 | 1750 | 2.1415 | 8.5123 | 18.06 | 18.06 | 64.42 |
| 2.3454 | 0.2062 | 1800 | 2.1415 | 8.5118 | 18.06 | 18.06 | 61.42 |
| 2.3464 | 0.2119 | 1850 | 2.1409 | 8.5075 | 18.06 | 18.06 | 61.43 |
| 2.3420 | 0.2176 | 1900 | 2.1411 | 8.5086 | 18.06 | 18.06 | 64.39 |
| 2.3378 | 0.2234 | 1950 | 2.1406 | 8.5044 | 18.06 | 18.06 | 64.4 |
| 2.3958 | 0.2291 | 2000 | 2.1413 | 8.5102 | 18.06 | 18.06 | 64.36 |
| 2.3613 | 0.2348 | 2050 | 2.1413 | 8.5103 | 18.06 | 18.06 | 61.39 |
| 2.3783 | 0.2405 | 2100 | 2.1413 | 8.5101 | 18.06 | 18.06 | 61.44 |
| 2.3737 | 0.2463 | 2150 | 2.1410 | 8.5080 | 18.06 | 18.06 | 61.37 |
| 2.3738 | 0.2520 | 2200 | 2.1409 | 8.5068 | 18.06 | 18.06 | 64.43 |
| 2.3226 | 0.2577 | 2250 | 2.1407 | 8.5056 | 18.06 | 18.06 | 61.45 |
| 2.3531 | 0.2635 | 2300 | 2.1406 | 8.5048 | 18.06 | 18.06 | 64.41 |
| 2.3689 | 0.2692 | 2350 | 2.1404 | 8.5030 | 18.06 | 18.06 | 61.4 |
| 2.3607 | 0.2749 | 2400 | 2.1403 | 8.5019 | 18.06 | 18.06 | 61.4 |
| 2.3431 | 0.2806 | 2450 | 2.1404 | 8.5026 | 18.06 | 18.06 | 64.46 |
| 2.3787 | 0.2864 | 2500 | 2.1403 | 8.5018 | 18.06 | 18.06 | 64.5 |
| 2.3668 | 0.2921 | 2550 | 2.1405 | 8.5035 | 18.06 | 18.06 | 61.45 |
| 2.3700 | 0.2978 | 2600 | 2.1402 | 8.5015 | 18.06 | 18.06 | 64.56 |
| 2.3793 | 0.3036 | 2650 | 2.1401 | 8.5005 | 18.06 | 18.06 | 64.38 |
| 2.3652 | 0.3093 | 2700 | 2.1404 | 8.5025 | 18.06 | 18.06 | 61.48 |
| 2.3724 | 0.3150 | 2750 | 2.1403 | 8.5017 | 18.06 | 18.06 | 64.46 |
| 2.3623 | 0.3207 | 2800 | 2.1403 | 8.5021 | 18.06 | 18.06 | 64.4 |
| 2.3474 | 0.3265 | 2850 | 2.1403 | 8.5019 | 18.06 | 18.06 | 61.41 |
| 2.3491 | 0.3322 | 2900 | 2.1400 | 8.4993 | 18.06 | 18.06 | 64.41 |
| 2.3488 | 0.3379 | 2950 | 2.1403 | 8.5021 | 18.06 | 18.06 | 64.4 |
| 2.3765 | 0.3436 | 3000 | 2.1404 | 8.5027 | 18.06 | 18.06 | 64.43 |