Arush kumar commited on
Commit
1052958
Β·
1 Parent(s): 1be73ef

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +8 -3
config.py CHANGED
@@ -7,9 +7,9 @@
7
 
8
  # ── Architecture ──────────────────────────────────────────────────────────────
9
  CONTEXT = 1024
10
- vocab_size = 8000
11
  D_MODEL = 256+128
12
- numberoflayers = 8
13
  numberofheads = 8
14
  d_Latent = 64
15
  ffn_mult = 3.5
@@ -24,13 +24,18 @@ moe_top_k = 2 # route to top 2 experts per token
24
  # ── Training ──────────────────────────────────────────────────────────────────
25
  EPOCHS = 20 # 10 full passes on 160MB β†’ quick baseline, then iterate
26
  batch_size = 16 # 16 per T4; 2 T4s in parallel = effective 32 (fits in 16GB)
27
- learning_rate = 3e-4 # warmup will auto-scale; works for BF16
28
  weight_decay = 0.01 # light L2, prevents drift
29
 
30
  # ── Data ──────────────────────────────────────────────────────────────────────
31
  data_path = './training_data' # where prepare_dataset.py outputs .txt files
32
  PRECISION = 'bf16' # BF16 for T4 (mixed_bfloat16 policy) β€” no loss scaling needed
33
  GLOBAL_DTYPE = PRECISION # global dtype for model weights, activations, and optimizer
 
 
 
 
 
34
  # ── Checkpointing & Inference ────────────────────────────────────────────────
35
  USE_REMAT = False # gradient checkpointing β€” saves ~30% VRAM
36
  MAX_GEN_TOKENS = 256 # RoPE headroom: context + this = table size
 
7
 
8
  # ── Architecture ──────────────────────────────────────────────────────────────
9
  CONTEXT = 1024
10
+ vocab_size = 5000
11
  D_MODEL = 256+128
12
+ numberoflayers = 10
13
  numberofheads = 8
14
  d_Latent = 64
15
  ffn_mult = 3.5
 
24
  # ── Training ──────────────────────────────────────────────────────────────────
25
  EPOCHS = 20 # 10 full passes on 160MB β†’ quick baseline, then iterate
26
  batch_size = 16 # 16 per T4; 2 T4s in parallel = effective 32 (fits in 16GB)
27
+ learning_rate = 1e-4 # warmup will auto-scale; works for BF16
28
  weight_decay = 0.01 # light L2, prevents drift
29
 
30
  # ── Data ──────────────────────────────────────────────────────────────────────
31
  data_path = './training_data' # where prepare_dataset.py outputs .txt files
32
  PRECISION = 'bf16' # BF16 for T4 (mixed_bfloat16 policy) β€” no loss scaling needed
33
  GLOBAL_DTYPE = PRECISION # global dtype for model weights, activations, and optimizer
34
+
35
+ # ── Data Shuffling ────────────────────────────────────────────────────────────
36
+ shuffle_samples = True # shuffle individual samples/lines before tokenization (avoid abrupt domain transitions)
37
+ shuffle_seed = 42 # seed for reproducible shuffling (set to different values for different shuffles)
38
+ shuffle_buffer_size = 10_000 # number of window indices to hold in shuffle buffer (larger = more randomness, higher memory)
39
  # ── Checkpointing & Inference ────────────────────────────────────────────────
40
  USE_REMAT = False # gradient checkpointing β€” saves ~30% VRAM
41
  MAX_GEN_TOKENS = 256 # RoPE headroom: context + this = table size