ArushBuilds commited on
Commit
507e1d8
Β·
1 Parent(s): d5630d3

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +45 -10
config.py CHANGED
@@ -7,7 +7,7 @@ xla_on_gpu=False
7
  CONTEXT = 1024
8
  max_gen_tokens = 1024
9
  gen_headroom = 128
10
- vocab_size = 16384+8192
11
 
12
  bias = False
13
  d_rope = None
@@ -23,7 +23,36 @@ sliding_window_size = 512
23
 
24
  tensor_parallel_size = 1
25
 
 
 
 
 
 
 
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  mod_capacity = 0.25
29
  use_mtp = False
@@ -35,15 +64,15 @@ int8_group_size = 128
35
  mod_budget_coeff = 0.05
36
  mod_gate_entropy_coeff = 0.0
37
  mod_hard_eval = False
38
-
39
  numberoflayers = 16
40
  numberofheads = 8
41
  D_MODEL = 384
42
- ALPHA_COMPILE_MODE="default"
43
- num_kv_heads = 4
44
  sliding_window_size = 512
45
  use_sdpa=False
46
- optimizer_8bit = False
47
  use_wsd = True
48
  wsd_decay_steps = 700
49
  ffn_mult = 8 // 3
@@ -52,21 +81,27 @@ n_experts = 8
52
  n_shared = 1
53
  # T4 path
54
 
55
- PRECISION = 'fp16'
56
  GLOBAL_DTYPE = PRECISION
57
  USE_ASYNC_LAYER_PREFETCH = True
58
  intra_op_threads = 2
59
  num_workers = 2
60
- GPU_SIDE_BATCHING = False
61
  DISABLE_MMAP = False
62
  use_flash_ops = False
63
- use_xsa = False
64
- batch_size = 32
65
  weight_decay = 0.01
66
  use_static_lr = False
67
  static_lr = 1e-3
68
  learning_rate = 1e-3
69
-
 
 
 
 
 
 
70
  max_steps = 4000
71
  data_parallel_only = True
72
  use_fsdp = False
 
7
  CONTEXT = 1024
8
  max_gen_tokens = 1024
9
  gen_headroom = 128
10
+ vocab_size = 16384
11
 
12
  bias = False
13
  d_rope = None
 
23
 
24
  tensor_parallel_size = 1
25
 
26
+ # ─────────────────────────────────────────────────────────────────────
27
+ # Curriculum learning (token-level mixing across sources)
28
+ # ─────────────────────────────────────────────────────────────────────
29
+ # Master switch. False = old behavior (uniform random over the whole
30
+ # flat token array). True = per-source anchor schedule below.
31
+ CURRICULUM_ENABLED = False
32
 
33
+ # Number of training steps the anchor schedule spans. Set equal to
34
+ # MAX_STEPS in train.py so the ramp completes at run end.
35
+ CURRICULUM_TOTAL_STEPS = 20000
36
+
37
+ # Sources, in curriculum order (easiest first). Each entry:
38
+ # (name, [glob_patterns], w@0, w@T/3, w@2T/3, w@T)
39
+ # Between anchors, weights interpolate linearly. Columns should sum
40
+ # to ~1.0 (the code renormalizes if not).
41
+ # Files matching none of the globs are EXCLUDED from training.
42
+ CURRICULUM_SOURCES = [
43
+ ("tinystories", ["tinystories*.txt", "tiny_*.txt"],
44
+ 0.70, 0.10, 0.03, 0.02),
45
+ ("simplewiki", ["simplewiki*.txt", "wiki_*.txt"],
46
+ 0.10, 0.70, 0.10, 0.03),
47
+ ("cosmopedia", ["cosmopedia*.txt", "cosmo_*.txt"],
48
+ 0.10, 0.10, 0.70, 0.10),
49
+ ("finephrase", ["finephrase*.txt", "fine_*.txt"],
50
+ 0.10, 0.10, 0.17, 0.85),
51
+ ]
52
+
53
+ # Hard floor: no source ever drops below this fraction at any step.
54
+ # 0.0 disables. 0.02 = 2% minimum, prevents catastrophic forgetting.
55
+ CURRICULUM_FLOOR = 0.02
56
 
57
  mod_capacity = 0.25
58
  use_mtp = False
 
64
  mod_budget_coeff = 0.05
65
  mod_gate_entropy_coeff = 0.0
66
  mod_hard_eval = False
67
+ use_flexattention = True
68
  numberoflayers = 16
69
  numberofheads = 8
70
  D_MODEL = 384
71
+ ALPHA_COMPILE_MODE="reduce-overhead"
72
+ num_kv_heads = 4
73
  sliding_window_size = 512
74
  use_sdpa=False
75
+ optimizer_8bit = True
76
  use_wsd = True
77
  wsd_decay_steps = 700
78
  ffn_mult = 8 // 3
 
81
  n_shared = 1
82
  # T4 path
83
 
84
+ PRECISION = 'bf16'
85
  GLOBAL_DTYPE = PRECISION
86
  USE_ASYNC_LAYER_PREFETCH = True
87
  intra_op_threads = 2
88
  num_workers = 2
89
+ GPU_SIDE_BATCHING = True
90
  DISABLE_MMAP = False
91
  use_flash_ops = False
92
+ use_xsa = True
93
+ batch_size = 256
94
  weight_decay = 0.01
95
  use_static_lr = False
96
  static_lr = 1e-3
97
  learning_rate = 1e-3
98
+ use_qk_norm = True
99
+ # Gated Attention (Qiu et al., NeurIPS 2025 Best Paper, arXiv:2505.06708)
100
+ # Per-head sigmoid gate on the SDPA output, before out_proj.
101
+ # Gate reads the first `attn_gate_window` dims of the post-norm block input.
102
+ # 0 = full n_embd (dense gate). 12-32 is the speedrun-recommended range.
103
+ use_attn_gate = True
104
+ attn_gate_window = 16
105
  max_steps = 4000
106
  data_parallel_only = True
107
  use_fsdp = False