ViuAI commited on
Commit
d33c293
·
verified ·
1 Parent(s): da2ff29

Audit fix: Update model/configs/train_rtx4090.yaml for ViuMini-Dense-360M

Browse files
Files changed (1) hide show
  1. model/configs/train_rtx4090.yaml +26 -37
model/configs/train_rtx4090.yaml CHANGED
@@ -1,80 +1,70 @@
1
- # Pretraining config — VIU-1.5B MoE 48L (1.856B total / 300.5M active)
2
- # OPTIMIZED FOR SINGLE NVIDIA GEFORCE RTX 4090 (24GB GDDR6X, Ada Lovelace)
 
3
  seed: 42
4
  data_dir: ../../data/raw
5
  tokenizer_path: ../../tokenizer/outputs/tokenizer.json
 
6
  # Sequence Length Curriculum:
7
- # Stage 1: 0 to 50k steps (seq 512, ~2.5x higher throughput to rapidly master vocabulary & syntax)
8
- # Stage 2: 50k to 200k steps (seq 1024, mid-length reasoning & conversations)
9
- # Stage 3: 200k+ steps to completion (seq 2048, full long-context mastery)
10
- # Global effective batch is kept strictly constant at 262,144 tokens per step across all stages!
11
  curriculum: true
12
  curriculum_stages:
13
  - max_step: 50000
14
  seq_len: 512
15
- batch_size: 32
16
- grad_accum: 4 # 512 * 32 * 4 = 65,536 tokens/step
17
  - max_step: 200000
18
  seq_len: 1024
19
- batch_size: 16
20
- grad_accum: 4 # 1024 * 16 * 4 = 65,536 tokens/step
21
  - max_step: null
22
  seq_len: 2048
23
- batch_size: 8
24
- grad_accum: 4 # 2048 * 8 * 4 = 65,536 tokens/step
25
 
26
- seq_len: 512
27
  train_split: 0.95
28
 
29
- # RTX 4090 24GB (Ada Lovelace): micro-batch 32 with SDPA, PagedAdamW8bit, and Grad Checkpointing (~16 GB VRAM)
30
- batch_size: 32
31
- grad_accum: 4
32
  target_global_batch: 128
33
  auto_tune: false
34
 
35
- # FULL PRETRAINING: Dynamic Auto-Steps from 125B+ Tokens (2,109 Parquet files on Hub)
36
- total_tokens: 126500000000 # 126.5B authentic tokens
37
- max_steps: auto # Automatically computed: total_tokens // (batch_size * grad_accum * seq_len)
38
- lr: 3.0e-04
39
- min_lr: 3.0e-05
40
- warmup_steps: 15000
41
  weight_decay: 0.1
42
  betas: [0.9, 0.95]
43
  grad_clip: 1.0
44
 
45
- # Native Ada Lovelace BF16 precision + Muon + Grad Ckpt
46
  amp: bf16
47
- optimizer: muon
48
- muon_lr: 0.02
49
- muon_momentum: 0.95
50
- muon_weight_decay: 0.01
51
  grad_ckpt: true
52
 
53
- # 2026 speed stack (opt-in, default OFF for stability-first launch)
54
  compile: false
55
  compile_mode: reduce-overhead
56
- fp8: false # 4090 (sm_89) pe unsupported — sirf 5090/Blackwell
57
 
58
- eval_every: 500
59
- save_every: 500
60
- log_every: 1
61
  ckpt_dir: ../checkpoints
62
  log_dir: ../../logs
63
 
64
- # Checkpoint auto-push to Hugging Face Hub (background non-blocking thread)
65
  hf_push: true
66
  hf_repo: ViuAI/ViuMini-Dense-360M
67
  hf_push_every: 0
68
- hf_push_full_every: 500
69
  keep_local_full: 2
70
  keep_remote_full: 3
71
  resume: auto
72
  sample_every: 500
73
  sample_prompt: "bhai kal party me kya scene hai"
74
 
75
- # Streaming & Dataset settings
76
  hf_dataset: ViuAI/viu-mini-raw-pretrain
77
- hf_max_blocks: 5000
78
  hf_safety: full
79
  hf_max_rows: null
80
  enforce_mix: true
@@ -85,4 +75,3 @@ lang_mix:
85
  natural_shuffle_buffer: 50000
86
  hf_round: 0
87
  hf_round_rows: 200000
88
-
 
1
+ # Pretraining config — ViuMini-Dense-360M (32L Dense, 366.6M params)
2
+ # OPTIMIZED FOR SINGLE / MULTI NVIDIA GEFORCE RTX 4090 (24GB GDDR6X, Ada Lovelace)
3
+ model_config: ../configs/viu1_dense_config.yaml
4
  seed: 42
5
  data_dir: ../../data/raw
6
  tokenizer_path: ../../tokenizer/outputs/tokenizer.json
7
+
8
  # Sequence Length Curriculum:
9
+ # Constant effective batch: 131,072 tokens per step
 
 
 
10
  curriculum: true
11
  curriculum_stages:
12
  - max_step: 50000
13
  seq_len: 512
14
+ batch_size: 16
15
+ grad_accum: 16 # 512 * 16 * 16 = 131,072 tokens/step
16
  - max_step: 200000
17
  seq_len: 1024
18
+ batch_size: 8
19
+ grad_accum: 16 # 1024 * 8 * 16 = 131,072 tokens/step
20
  - max_step: null
21
  seq_len: 2048
22
+ batch_size: 4
23
+ grad_accum: 16 # 2048 * 4 * 16 = 131,072 tokens/step
24
 
25
+ seq_len: 1024
26
  train_split: 0.95
27
 
28
+ batch_size: 8
29
+ grad_accum: 16
 
30
  target_global_batch: 128
31
  auto_tune: false
32
 
33
+ total_tokens: 126500000000
34
+ max_steps: auto
35
+ optimizer: paged_adamw_8bit
36
+ lr: 2.5e-04
37
+ min_lr: 2.5e-05
38
+ warmup_steps: 1000
39
  weight_decay: 0.1
40
  betas: [0.9, 0.95]
41
  grad_clip: 1.0
42
 
 
43
  amp: bf16
 
 
 
 
44
  grad_ckpt: true
45
 
 
46
  compile: false
47
  compile_mode: reduce-overhead
48
+ fp8: false
49
 
50
+ eval_every: 1000
51
+ save_every: 1000
52
+ log_every: 25
53
  ckpt_dir: ../checkpoints
54
  log_dir: ../../logs
55
 
 
56
  hf_push: true
57
  hf_repo: ViuAI/ViuMini-Dense-360M
58
  hf_push_every: 0
59
+ hf_push_full_every: 1000
60
  keep_local_full: 2
61
  keep_remote_full: 3
62
  resume: auto
63
  sample_every: 500
64
  sample_prompt: "bhai kal party me kya scene hai"
65
 
 
66
  hf_dataset: ViuAI/viu-mini-raw-pretrain
67
+ hf_max_blocks: 50000
68
  hf_safety: full
69
  hf_max_rows: null
70
  enforce_mix: true
 
75
  natural_shuffle_buffer: 50000
76
  hf_round: 0
77
  hf_round_rows: 200000