aisamdasu commited on
Commit
9f3ece2
·
verified ·
1 Parent(s): ddfe382

Add MoE architecture docs

Browse files
Files changed (2) hide show
  1. moe/README.md +34 -0
  2. moe/TRAINING_PLAN.md +22 -0
moe/README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MoE Architecture
2
+
3
+ The MoE model is the main scaling direction for code completion. The strongest
4
+ current structure is sparse FFN experts with shared attention and optional
5
+ multi-token prediction heads.
6
+
7
+ ## Recommended Structure
8
+
9
+ - Decoder-only Transformer.
10
+ - RMSNorm before attention and FFN.
11
+ - RoPE positional encoding.
12
+ - Grouped-query attention.
13
+ - SwiGLU experts.
14
+ - Top-2 routing during training.
15
+ - Shared expert for common syntax and indentation.
16
+ - Router z-loss and auxiliary load-balancing loss.
17
+
18
+ ## Routing Metrics
19
+
20
+ Log:
21
+
22
+ - Per-layer expert load.
23
+ - Per-expert token fraction.
24
+ - Dropped-token count.
25
+ - Router entropy.
26
+ - Auxiliary loss.
27
+ - Domain-to-expert correlation.
28
+
29
+ ## Failure Modes
30
+
31
+ - Expert collapse.
32
+ - Router churn.
33
+ - Synthetic Python overfitting.
34
+ - MTP loss overpowering next-token loss.
moe/TRAINING_PLAN.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MoE Training Plan
2
+
3
+ ## Data Mix
4
+
5
+ Train only on manifest-verified JSONL checkpoints. Do not point the trainer at
6
+ raw source directories.
7
+
8
+ ## Curriculum
9
+
10
+ 1. Warm up on short and medium FIM examples.
11
+ 2. Add long repository-context examples.
12
+ 3. Add code generation as an auxiliary continuation task.
13
+ 4. Fine-tune with real-code FIM weighted higher than synthetic continuation.
14
+
15
+ ## Defaults
16
+
17
+ - Context: start at 2048, then ablate 4096.
18
+ - Precision: bf16 on H100.
19
+ - Optimizer: AdamW.
20
+ - Grad clipping: enabled.
21
+ - MoE aux loss: start small and tune from expert load.
22
+ - Top-k: top-2 for training, top-1 as inference ablation only.