Document H200 Titan pretraining golden formula and benchmarks
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283# 📌 ViuAI Sarus-500M — Permanent Engineering Rules & Memory Bank
**Last Updated:** September 12, 2026 **Status:** Permanent Reference — STRICTLY ENFORCED
---
## 🚫 1. THE GOLDEN RULE: 100% PURE ENGLISH ONLY- **NO DEVANAGARI HINDI IN SFT OR DPO**: - In SFT v1 (288,000 samples across 21 domains), all Devanagari characters (`\u0900` to `\u097f`) were **100% strictly filtered out** (`is_clean_english`). - DPO v1 preference alignment was **100% Pure English**. - **NEVER prompt or test this model with Devanagari Hindi text** (e.g. "सौरमंडल का सबसे बड़ा ग्रह..."). - All questions, prompts, and evaluations must be strictly in **English**.
---
## 🚫 2. ZERO `<think>` TAGS (Direct Response Mode)- The model must **NEVER** output `<think>` or `</think>` tags.- Direct response mode only: immediate, clean, conversational answers.
---
## 🧠 3. ARCHITECTURE & HARDWARE BOUNDS- **Architecture:** Dense Autoregressive Transformer (LLaMA-3 style, SwiGLU, RMSNorm, RoPE).- **Parameters:** ~495 Million (~500M SLM).- **Context Length:** 2,048 tokens.- **Vocabulary:** 64,003 tokens.- **Special Tokens:** `<|user|>` (64000), `<|assistant|>` (64001), `<|endofturn|>` (64002).- **SLM Reality:** - 500M models have limited parameter capacity. - For factual / STEM / reasoning questions, **always use `temp=0.2`** to prevent token collision and hallucinations.
---
## 🎯 4. WHAT THE MODEL ACTUALLY KNOWS (TRAINING MAPPING)1. **Pre-training (~13.3B tokens):** - FineWeb-Edu (English STEM, Science, Geography, History, Math). - NCERT Textbooks (Class 6th–12th complete 32 subjects in English). - Indian History & Freedom Struggle (English).2. **SFT v1 (288k samples, 21 domains, 100% English):** - D0: Identity & Persona (ViuAI Sarus, independent). - D1: NCERT STEM & Social Sciences (English). - D2: Indian History, Constitution & Polity (English). - D3-D5: Instruction Following, Constraints, Multi-turn. - D6-D8: Corporate writing, TL;DR, Typo robustness. - D9: Indian Cooking & Kitchen science (English). - D10-D20: Scam safety, tech troubleshooting, comparisons.3. **DPO v1 Alignment:** - Joint SFT+DPO loss (`LR=1.5e-5`). - Strong on exact negative constraints, identity, and basic Python.
---
## ⚡ 5. HARDWARE BENCHMARKS & PEAK PRETRAINING SETTINGS (GOLDEN FORMULA)
### 👑 The NVIDIA H200 140GB Titan Formula (Record Speed: 123,558 tokens/sec)- **Hardware Profile:** 1x NVIDIA H200 NVL (140GB HBM3e, 3,873 GB/s memory bandwidth), AMD EPYC 9755 (128 Cores, 290GB Host RAM), PCIe 5.0 (54 GB/s).- **Golden Hyperparameters (Strict Standard: 524,288 tokens/step):** - `USE_CHECKPOINT = "0"` — Zero activation checkpointing! Keeps all 24 layer activations in VRAM, eliminating ~30% recomputation overhead. - `MICRO_BATCH = "32"` — 32 parallel sequences saturated on Hopper Tensor Cores. - `GRAD_ACCUM = "8"` — 32 micro * 8 accum * 1 GPU * 2048 ctx = exactly 524,288 tokens/step. - `POOL_SIZE = "8"` — Pre-buffers 8 full shards (~400M tokens) in 290GB host RAM, completely eliminating internet I/O jitter.- **VRAM Saturation:** `mem alloc = 7.99 GB`, `reserved = 104.09 GB` (~74% golden ratio, 35 GB headroom prevents fragmentation).- **Measured Performance:** - **Peak Throughput:** **`123,558 tokens/sec`** flat! - **1 Step Time:** **`4.26 seconds`**! - **1,000 Steps (~524M tokens):** **`1 Hour 11 Minutes`**! - **Full 20,000 Steps (10B tokens):** **`~23.6 Hours`** at **`$1.492/hr`** (~$35 total / ₹3,000)!
### 🥈 Dual RTX 5090 Blackwell Benchmark (70,350 tokens/sec)- **Hardware Profile:** 2x RTX 5090 (32GB GDDR7 each, PCIe 5.0 x16, AMD Threadripper PRO).- **Configuration:** `MICRO_BATCH = 32`, `GRAD_ACCUM = 4`, `WORLD_SIZE = 2` (524,288 tokens/step).- **Requirement:** PyTorch cu128 nightly required for Blackwell `sm_120`.- **Measured Throughput:** **`70,350 tokens/sec`** (~7.45s per step).
### 🥉 2x H100 PCIe vs 1x H200 NVL Reality Check- 2x H100 PCIe (350W TDP, 1.76 TB/s HBM3) scores **376.0 DLPerf** (~95k tok/s) due to PCIe DDP sync and thermal throttling.- 1x H200 NVL (452.4 DLPerf, 3.88 TB/s HBM3e) is **~30% FASTER** as a single GPU with zero DDP communication latency.
### 🛡️ Universal Process Launcher (Rule for All Containers)- Always launch single-GPU or multi-GPU training via: `!{sys.executable} -m torch.distributed.run --nproc_per_node=X code/train.py` *(Never use raw `!torchrun` which fails with `command not found` in containerized Jupyter environments).*SARUS_PERMANENT_RULES.mdAdded+83