ViuAI commited on
Commit
6d3d867
·
verified ·
1 Parent(s): e79975e

Optimize train_kaggle_t4.yaml: micro-batch 8 / accum 16 (8 passes/GPU on Dual T4), log_every 1

Browse files
Files changed (1) hide show
  1. model/configs/train_kaggle_t4.yaml +15 -15
model/configs/train_kaggle_t4.yaml CHANGED
@@ -13,23 +13,23 @@ curriculum: true
13
  curriculum_stages:
14
  - max_step: 50000
15
  seq_len: 512
16
- batch_size: 1
17
- grad_accum: 128 # 512 * 1 * 128 = 65,536 tokens/step per GPU (x2 GPUs = 131,072 tok/step)
18
  - max_step: 200000
19
  seq_len: 1024
20
- batch_size: 1
21
- grad_accum: 64 # 1024 * 1 * 64 = 65,536 tokens/step per GPU (x2 GPUs = 131,072 tok/step)
22
  - max_step: null
23
  seq_len: 2048
24
- batch_size: 1
25
- grad_accum: 32 # 2048 * 1 * 32 = 65,536 tokens/step per GPU (x2 GPUs = 131,072 tok/step)
26
 
27
- seq_len: 1024
28
  train_split: 0.95
29
 
30
- # Kaggle T4 16GB VRAM: micro-batch 1 with SDPA and Gradient Checkpointing (<11GB peak VRAM)
31
- batch_size: 1
32
- grad_accum: 64
33
  target_global_batch: 128
34
  auto_tune: false
35
 
@@ -55,17 +55,17 @@ compile: false
55
  fp8: false
56
 
57
  eval_every: 500
58
- save_every: 1000
59
- log_every: 10
60
  ckpt_dir: ../checkpoints
61
  log_dir: ../../logs
62
 
63
  # Checkpoint auto-push to Hugging Face Hub (background non-blocking thread)
64
  # Safeguard: Even if Kaggle session terminates at 12 hours, latest checkpoint is safe on HF!
65
  hf_push: true
66
- hf_repo: ViuAI/Viu-1.5B-MoE
67
  hf_push_every: 0
68
- hf_push_full_every: 1000
69
  keep_local_full: 2
70
  keep_remote_full: 3
71
  resume: auto
@@ -74,7 +74,7 @@ sample_prompt: "bhai kal party me kya scene hai"
74
 
75
  # Zero-Disk Streaming from Hub (pure PyArrow memory-mapped buffer, ~300MB RAM)
76
  hf_dataset: ViuAI/viu-mini-raw-pretrain
77
- hf_max_blocks: 50000
78
  hf_safety: full
79
  hf_max_rows: null
80
  enforce_mix: true
 
13
  curriculum_stages:
14
  - max_step: 50000
15
  seq_len: 512
16
+ batch_size: 8
17
+ grad_accum: 16 # 512 * 8 * 16 = 65,536 tokens/step (On Dual T4: 8 passes per GPU!)
18
  - max_step: 200000
19
  seq_len: 1024
20
+ batch_size: 4
21
+ grad_accum: 16 # 1024 * 4 * 16 = 65,536 tokens/step
22
  - max_step: null
23
  seq_len: 2048
24
+ batch_size: 2
25
+ grad_accum: 16 # 2048 * 2 * 16 = 65,536 tokens/step
26
 
27
+ seq_len: 512
28
  train_split: 0.95
29
 
30
+ # Kaggle Dual T4 (2x 16GB VRAM): micro-batch 8 with SDPA, PagedAdamW8bit, and Grad Checkpointing (~10.5 GB VRAM)
31
+ batch_size: 8
32
+ grad_accum: 16
33
  target_global_batch: 128
34
  auto_tune: false
35
 
 
55
  fp8: false
56
 
57
  eval_every: 500
58
+ save_every: 500
59
+ log_every: 1
60
  ckpt_dir: ../checkpoints
61
  log_dir: ../../logs
62
 
63
  # Checkpoint auto-push to Hugging Face Hub (background non-blocking thread)
64
  # Safeguard: Even if Kaggle session terminates at 12 hours, latest checkpoint is safe on HF!
65
  hf_push: true
66
+ hf_repo: ViuAI/ViuMini-MoE-242M
67
  hf_push_every: 0
68
+ hf_push_full_every: 500
69
  keep_local_full: 2
70
  keep_remote_full: 3
71
  resume: auto
 
74
 
75
  # Zero-Disk Streaming from Hub (pure PyArrow memory-mapped buffer, ~300MB RAM)
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