aisamdasu commited on
Commit
7056f24
·
verified ·
1 Parent(s): 826610f

Update dense guide

Browse files
Files changed (2) hide show
  1. dense/README.md +16 -1
  2. dense/TRAINING_PLAN.md +29 -0
dense/README.md CHANGED
@@ -11,8 +11,23 @@ family as MoE so architecture changes can be compared cleanly.
11
  - RoPE positional encoding.
12
  - Grouped-query attention for lower KV-cache cost.
13
  - SwiGLU feed-forward blocks.
14
- - Tied embedding/head only after validation.
 
15
  - Native support for FIM tokens.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  ## Evaluation
18
 
 
11
  - RoPE positional encoding.
12
  - Grouped-query attention for lower KV-cache cost.
13
  - SwiGLU feed-forward blocks.
14
+ - Untied embedding/head for the first quality run; tie only if validation shows
15
+ no FIM regression.
16
  - Native support for FIM tokens.
17
+ - QK norm for attention stability at longer context.
18
+ - Residual branch init scaling so deeper runs do not spike early loss.
19
+
20
+ ## Baseline Shape
21
+
22
+ Use Dense as the clean control model, not as the final scaling target.
23
+
24
+ - Small smoke: 12-16 layers, 768-1024 hidden, 8-16 heads, context 2048.
25
+ - H100 baseline: 24-32 layers, 2048-3072 hidden, GQA, context 4096.
26
+ - Keep the tokenizer, file order, validation split, optimizer, and batch-token
27
+ target identical to MoE.
28
+
29
+ The first Dense run should answer one question: does the dataset/tokenizer learn
30
+ cleanly without router complexity? If not, do not scale MoE yet.
31
 
32
  ## Evaluation
33
 
dense/TRAINING_PLAN.md CHANGED
@@ -5,6 +5,15 @@
5
  Use the same JSONL checkpoint bundle as MoE. Keep random seed, batch token
6
  target, learning-rate schedule, and validation split aligned.
7
 
 
 
 
 
 
 
 
 
 
8
  ## Curriculum
9
 
10
  1. Start with short and medium records.
@@ -12,8 +21,28 @@ target, learning-rate schedule, and validation split aligned.
12
  3. Add continuation/code generation records.
13
  4. Evaluate FIM and next-token loss separately.
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ## Stop Conditions
16
 
17
  - Validation loss diverges twice after LR reduction.
18
  - FIM metrics regress while train loss improves.
19
  - Tokenizer round-trip or special-token audit fails.
 
 
5
  Use the same JSONL checkpoint bundle as MoE. Keep random seed, batch token
6
  target, learning-rate schedule, and validation split aligned.
7
 
8
+ Primary input:
9
+
10
+ ```text
11
+ dataset/<checkpoint>/dataset/*.jsonl
12
+ ```
13
+
14
+ Do not train from hidden staging folders unless rebuilding checkpoints. Hidden
15
+ `data/curated_upload` is a staging queue, not the training contract.
16
+
17
  ## Curriculum
18
 
19
  1. Start with short and medium records.
 
21
  3. Add continuation/code generation records.
22
  4. Evaluate FIM and next-token loss separately.
23
 
24
+ ## H100 Defaults
25
+
26
+ - Precision: bf16.
27
+ - Context: 2048 smoke, 4096 main run.
28
+ - Optimizer: AdamW or fused AdamW.
29
+ - LR schedule: warmup then cosine decay.
30
+ - Gradient clipping: enabled.
31
+ - Batch target: choose by total tokens, not examples, because FIM lengths vary.
32
+ - Validation: fixed files or fixed checksums from the checkpoint report.
33
+
34
+ ## Preprocessing
35
+
36
+ - Preserve whitespace exactly.
37
+ - Append `<|endoftext|>` between records during packing.
38
+ - Keep FIM markers visible; do not strip special tokens.
39
+ - Reject empty `text`, invalid JSONL, and records exceeding context unless
40
+ deterministic chunking is enabled.
41
+ - Bucket by token length to reduce padding waste.
42
+
43
  ## Stop Conditions
44
 
45
  - Validation loss diverges twice after LR reduction.
46
  - FIM metrics regress while train loss improves.
47
  - Tokenizer round-trip or special-token audit fails.
48
+ - Syntax parse rate drops while raw loss improves.