| # MoE Training Plan |
|
|
| ## Data Mix |
|
|
| Train only on manifest-verified JSONL checkpoints. Do not point the trainer at |
| raw source directories. |
|
|
| Primary input: |
|
|
| ```text |
| dataset/<checkpoint>/dataset/*.jsonl |
| ``` |
|
|
| Each 20 GiB checkpoint should be treated as an atomic training unit. Keep the |
| checkpoint report beside the run metadata so loss curves can be traced back to |
| the exact JSONL files. |
|
|
| ## Curriculum |
|
|
| 1. Warm up on short and medium FIM examples. |
| 2. Add long repository-context examples. |
| 3. Add code generation as an auxiliary continuation task. |
| 4. Fine-tune with real-code FIM weighted higher than synthetic continuation. |
|
|
| ## H100 Defaults |
|
|
| - Context: start at 2048, then ablate 4096. |
| - Precision: bf16 on H100. |
| - Optimizer: AdamW. |
| - Grad clipping: enabled. |
| - MoE aux loss: start small and tune from expert load. |
| - Top-k: top-2 for training, top-1 as inference ablation only. |
| - Capacity factor: 1.25 for training. |
| - Router z-loss: enabled from step 0. |
| - Router jitter: small nonzero value during early training. |
| - MTP loss: optional, low coefficient, disabled if next-token validation |
| worsens. |
|
|
| ## Preprocessing |
|
|
| - Preserve whitespace and FIM markers exactly. |
| - Append `<|endoftext|>` between packed records. |
| - Bucket by token length before batching. |
| - Track domain and language metadata for router analysis. |
| - Do not rebalance by duplicating JSONL files. Rebalance in the dataloader or |
| sampler to avoid SSD growth. |
|
|
| ## Router Guardrails |
|
|
| - If one expert holds more than 35% sustained load, raise aux loss or increase |
| shared capacity. |
| - If dropped tokens exceed 1%, reduce batch tokens or increase capacity. |
| - If router entropy collapses early, lower LR or increase warmup. |
| - If domain-to-expert correlation is too strong, improve data mix before adding |
| experts. |
|
|