r/ROCm • u/NiftyOracleIndia • 8d ago
Trained a 1.18B code model from scratch on 8× MI325X: 151B tokens at ~35% MFU (numbers, lessons, and a tokenizer whitespace hack)
Quick progress report on CodeSymb-1B, a 1.18B-parameter code model trained from scratch on a Supermicro H14 8U with 8× AMD Instinct MI325X (JumpStart program). All numbers below come from the run's own logs (9,933 metric records, one every 20 steps).
Results
- 151.28B tokens trained from scratch (loss 5.33 → 1.065)
- 488–508K tokens/s median by phase, 34.6% median MFU (35.5% best), BF16
- 89.7 h of training inside a ~111 h window (81%)
- Stack: Ubuntu 24.04, ROCm/HIP 6.3, PyTorch 2.9.1+rocm6.3, DDP + torch.compile — PyTorch's built-in kernels, tuned with TunableOp
What mattered most on MI325X
- TunableOp is the single biggest lever. Without it: 300–408K tok/s. With tuned GEMMs: ~505K. First tuning took ~26 min; saving the per-GPU result files and reusing them cut startup to ~20 s. Save these files next to your checkpoints.
- 256 GB HBM3e changes the batch math. 48 sequences × 2,048 tokens per GPU fit with no gradient accumulation (786K tokens per step).
- The host CPUs can run your whole data pipeline beside training. On 2× EPYC 9575F we pretokenized 260B tokens (30.8 h), deduplicated 247M documents (14 min) and built a 22.5B-token SFT set (6.2 h) while training stayed at 488–496K tok/s.
- Make stops lossless. A stop file triggers a full save (weights, optimizer, data position); full checkpoints every 30 min, milestones every 10B tokens. Every restart was cheap, including a clean stop 54 min before the Nov 20 maintenance cutoff.
A data fix worth sharing: our SentencePiece tokenizer (NFKC, no byte fallback) silently deleted newlines and indentation — fatal for Python. Instead of retraining the tokenizer, we mapped 7 token IDs that never occurred in the data to newline/tab/space runs. Same vocabulary, same model; at 130.7B tokens we switched to 189.5B never-seen, deduplicated tokens with formatting kept.
Honest notes: median throughput after one mid-run restart was 2–4% lower than before it, and we haven't isolated why (GPUs were running near their ~1,000 W limit). The base model is not instruction-tuned or evaluated yet.
What's next: pretraining to 300B, then SFT (22.48B tokens, 4,096 context, reasoning + grounded RAG answers with citations), GRPO + DPO, and HumanEval/MBPP evals — about 5 days of compute once access resumes.
Full benchmark report (PDF):
CodeSymb_MI325X_Benchmark_Report.pdf
Model card and checkpoints:
NiftyOracleAI/CodeSymb-1B-MI325X
Thanks to Supermicro and the JumpStart team for the access, and to AMD for the MI325X stack. Happy to answer questions on the ROCm setup — ask away.
1
u/[deleted] 6d ago
[removed] — view removed comment