interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / docs / physics / gb10-training.md

382 lines · 31295 bytes Raw Blame History Source

Training on one GB10: what fits on the math cores, and how fast it can go (L279)

Drake's question (2026-10-20): can this Spark train our own language model if we cut the software out of the way, and can the training stay on the "math cores" (the GPU's compute units and the fast storage inside them) instead of streaming everything through the 128 GB main memory every step?

Short answer, details below:

Every number below says whether it is spec (the maker's or a reviewer's figure, cited), measured (our own code on this GB10, with the receipt path), or computed (arithmetic on measured numbers, with an aien-calc receipt id calc:xxxxxxxx).

Words used here:

1. What is on the chip, and what fits there (Q1)

1.1 Inventory

ItemValueKind and source
CUDA cores (FP32 lanes)6,144measured through our path: RM NV2080_CTRL_CMD_GR_GET_INFO index GPU_CORE_COUNT = 6144, physics evidence/m19r_gate4_forge_hwid_evidence.json (physics@e95e3ed, code forge/forge_descriptor.c); spec agrees: "CUDA Cores: 6,144" [1]
Max resident warps per SM48 (1,536 threads)measured through our path: same receipt, max_warps_per_sm 48; spec agrees: "Maximum number of resident warps per SM: 48" [2]
SMs per TPC2measured through our path: same receipt, sm_per_tpc 2
SM count48measured through our path: evidence/physics-gb10/gr_info.txt (tool streams/physics-gb10/gr_info.c, read-only RM GR_GET_INFO, 2026-10-20T18:09Z): LITTER_NUM_GPCS 4 x LITTER_NUM_TPC_PER_GPC 6 x LITTER_NUM_SM_PER_TPC 2 = 48, and GPU_CORE_COUNT 6144 = 48 x 128. The "LITTER" values are the chip layout; the enabled count is confirmed by the core count. Spec agrees: "The iGPU features 48 Streaming Multiprocessors running at up to 2.55 GHz" [3]. The driver returns 0 (not reported) for SM_REG_BANK_COUNT, so register-file size stays spec
Registers per SM64 K x 32-bit = 256 KiBspec: "Number of 32-bit registers per SM: 64 K" for compute capability 12.x [2]
Shared memory per SMup to 100 KB (99 KB per block)spec [2]. Our launcher today caps a block at 16 KiB (omega src/omega_blackwell_qmd.h:41, issue #560, noted by L272), so Omega kernels cannot yet use the full 100 KB
L1 + shared memory per SM128 KBspec: "Unified Data Cache Size (KB): 128" [2]; "has 128 KB of L1/Shared Memory" [3]
L2 cache24 MBoutside report, not an NVIDIA page: "GB10’s 24 MB L2" [3]; ServeTheHome reports the same, quoted in omega docs/MACHINE_CEILING.md (doc/machine-ceiling@3c8ce239). NVIDIA's hardware page [1] states no L2 size
Main memory128 GB LPDDR5x, 273 GB/sspec: "128 GB LPDDR5x unified system memory, 256-bit interface, 4266 MHz, 273 GB/s bandwidth" [1]
Main memory read, GPU245.1 GB/smeasured (L151): omega doc/machine-ceiling@3c8ce239, evidence/MACHINE-CEILING-20261020/raw/gpu-tc-peak.txt, window 20261020T030919Z-9d9d5a
Main memory write, GPU175.1 GB/smeasured (L151): same window, raw/gpu-ceiling.txt. Writes matter for training (gradients, optimizer state)
L2 read, all SMs5,110.8 GB/smeasured (L151): raw/gpu-pf-mem.txt
L2 write"just under 1 TB/s" (half rate)spec/outside measurement [3]; not measured by us: UNKNOWN row U1
Shared memory read, all SMs14.38 TB/s (16 KB blocks)measured (L151): raw/gpu-ceiling.txt
BF16 tensor rate (HMMA.16816.F32.BF16)118.81 TFLOPSmeasured (L151): raw/gpu-tc-peak.txt. NVIDIA publishes no dense BF16 figure
FP8 tensor rate (QMMA.16832.F32.E4M3)237.52 TFLOPSmeasured (L151): raw/gpu-qmma.txt. NVIDIA publishes "up to 1 PFLOP ... at FP4 precision with sparsity" [1], no dense FP8 figure
Best Omega tensor GEMM on a real shape30.6 TFLOPS (FP8, 4096 x 5120 x 6144, loaded box)measured: omega-mv cascade/prefill-kernels (commit 61274684), evidence/qgemm-q38-group4-1f37f9f6-20261019T1731Z/raw.log: "QGEMM-inplace group 4 q38o tokens 4096 M 4096 n 5120 k 6144 tiles 64: median 8.433 ms (min 8.121), 30.6 TFLOPS". A forward GEMM only; Omega has no backward GEMM yet (section 3.2). That is 0.129 of the FP8 rate (calc:fb7f5693, from MACHINE_CEILING)

These ceilings were measured by L151 (cc-machine-ceiling) in one quiet window with our own kernels. L272 (cc-speed-onchip) is re-measuring the on-chip walls for decode in docs/speed/GB10_CEILINGS.md on omega feat/decode-onchip-megakernel; it had not pushed when this was written (checked 2026-10-20 ~18Z). This stream ran no bandwidth or tensor-rate benchmark of its own, by rule.

1.2 The on-chip total

StoragePer SMx 48 SMsKind
Registers256 KiB12,582,912 B = 12 MiB (calc:aac73c4f)spec per SM [2], x 48 [3]
L1 + shared memory128 KiB6,291,456 B = 6 MiB (calc:9e88360f)spec per SM [2][3]
Inside the SMs18,874,368 B = 18 MiB (calc:b90d90eb)computed
L2 (shared by all SMs)25,165,824 B = 24 MiBoutside report [3] (taken as MiB; if the 24 MB is decimal the total drops by 1.2 MB)
Everything on the GPU die44,040,192 B = 42 MiB (calc:8bc2b7c3)computed

Main memory holds 128 GB. The chip holds about 1/3000 of that.

This total is a physical upper bound, and two of its parts are caches: our code cannot place a number in L1 or L2 and be sure it stays there (L2 is also shared with every other program on the box). What a kernel can address on purpose is registers plus shared memory:

On-chip storage a kernel can hold model numbers inBytesKind
Physical upper bound: registers + L1/shared + L244,040,192 (42 MiB, calc:8bc2b7c3)computed from spec
Addressable once the launcher allows the chip's 99 KB of shared memory per block (issue #560): registers + 48 x 99 KiB17,448,960 (about 16.6 MiB, calc:d1b858fa)computed from spec [2]
Addressable today through our launcher: registers + 48 x 16 KiB (src/omega_blackwell_qmd.h:41)13,369,344 (12.75 MiB, calc:5c1c408c)computed

A real kernel also needs registers for its own working values, so even the addressable figure is an upper bound; the Q3 probe uses 32 of its 68 registers per thread for weights (section 3).

1.3 The largest model that fits

Bytes per parameter for each training scheme:

SchemeWhat is kept per parameterBytes
A. Standard mixed precision with AdamBF16 weight 2 + BF16 gradient 2 + FP32 master weight 4 + FP32 Adam first moment 4 + FP32 second moment 416
B. BF16 with 8-bit optimizer stateBF16 weight 2 + BF16 gradient 2 + two 8-bit Adam moments 2. Assumption of this document: no FP32 master copy (common 8-bit optimizer setups keep one, which makes it 10 B)6
C. Muon-style (momentum only, no second moment)BF16 weight 2 + BF16 gradient 2 + BF16 momentum 2. Assumption of this document: applied to every parameter (in practice Muon covers the matrix weights and the rest stays on Adam)6
D. FP8 throughoutFP8 weight 1 + FP8 gradient 1 + two 8-bit moments 24
Weights only, BF16gradients and state streamed from main memory2
Weights only, FP8same1
SchemePhysical bound, 42 MiB (incl. L1 and L2 caches)Inside the SMs, 18 MiB (regs + all of L1/shared)Addressable after #560, 16.6 MiBAddressable today, 12.75 MiB
A (16 B)2,752,512 (calc:c630f624)1,179,648 (calc:c856b8ed)1,090,560 (calc:a9fca458)835,584 (calc:6140ea8a)
B or C (6 B)7,340,032 (calc:f4ec138e)3,145,728 (calc:a62edc13)2,908,160 (calc:0de0a5e2)2,228,224 (calc:8f899b5a)
D (4 B)11,010,048 (calc:9108596c)4,718,592 (calc:93fb98bb)4,362,240 (calc:ccfe1950)3,342,336 (calc:6d3d8afa)
Weights only, BF1622,020,096 (calc:45c96809)9,437,184 (calc:45b867e6)8,724,480 (calc:99d76e23)6,684,672 (calc:f0dfa1da)
Weights only, FP844,040,19218,874,36817,448,96013,369,344

None of these leave room for the activations (the intermediate values each layer computes in the forward pass and the backward pass needs again). Worked example with the addressable-after-#560 figure: a 4-layer model of width 96 has 12 x 4 x 96² = 442,368 parameters (calc:da55f631), 7,077,888 bytes at scheme A. Stored activations are 34 x 96 bytes per token per layer [6], 13,056 bytes per token for 4 layers, so the rest of the 17,448,960 bytes holds 794 tokens of activations at a time (calc:68a451c1). That is the largest micro-batch, and it makes every matrix multiply 794 x 96 x 96: small. How much of the tensor rate such small multiplies reach is not measured (UNKNOWN U3).

The honest size of a "math cores only" model on this chip is about 1 to 4 million parameters with full training state in storage our code can address (0.8 to 3.3 million today, 1.1 to 4.4 million after #560), and up to about 7 to 13 million if only the weights stay on chip and the gradients and optimizer state stream through main memory. Counting the caches as if they were storage stretches that to 11 million (full state) and 44 million (FP8 weights only), but nothing guarantees a number stays in a cache.

What a model that small is good for: narrow tasks with a small vocabulary of behaviour (a classifier, a router that picks which bigger model to call, a draft model that guesses the next few words for a big model to check, a controller for one device), research on training methods where many quick runs matter more than quality, and teaching. It will not hold general knowledge or carry a conversation. The L278 efficiency stream covers the literature on tiny models; it had not pushed when this was written (origin/study/efficiency was at the skeleton commit ed8b6ea, checked 2026-10-20 ~18Z).

1.4 Open items for Q1

2. The training roofline on this chip (Q2)

2.1 The ridge point

The ridge point is the number of arithmetic operations a kernel must do per byte it moves to or from main memory before the math, not the memory, sets its speed. Below it the tensor cores wait for data; above it they are the limit.

RateRidge (FLOPs per byte read)
BF16 tensor118.81 TFLOPS measured484.7 (calc:ac4723cb)
FP8 tensor237.52 TFLOPS measured969.1 (calc:05ef5299)

Both against the measured 245.1 GB/s read rate. Writes are slower (175.1 GB/s measured), which the step model below accounts for separately.

2.2 Work and bytes in one training step

Work: the standard count is 6 x N operations per token for a model with N parameters: 2N for the forward pass (one multiply and one add per weight) and about twice that for the backward pass. Kaplan et al.: "Accounting for the backwards pass (approximately twice the compute as the forwards pass), we then define the estimated non-embedding compute as C≈6N floating point operators per training token." [4] So a step that processes B tokens does 6NB operations. This leaves out attention's own work, which grows with context length; at short contexts it is small next to 6N.

Bytes, scheme A (16 B per parameter), three designs:

(a) The normal way. Each step: forward reads the BF16 weights (2N), backward reads them again (2N) and writes BF16 gradients (2N), the optimizer reads the FP32 master weights, both moments and the gradient (14N) and writes the master weights, both moments and the new BF16 weights (14N). That is 18N bytes read and 16N bytes written per step, whatever B is. Time on memory: N x (18 / 245.1 GB/s + 16 / 175.1 GB/s). This treats reads and writes as taking turns, which is a bound; the chip can overlap some of them. Time on math: 6NB / 118.81 TFLOPS. The weight-and-state traffic stops being the limit when

B ≥ 3,264 tokens per step (calc:1bcfc00a; N cancels out).

Large training runs carry far more than that per step (Chinchilla 70B used "1.5M → 3M" tokens per batch [5]), so in design (a) the weight and optimizer traffic is already a small share of the step. The bytes that grow with B are the activations: Korthikanti et al. count the stored activations of one transformer layer as "sbh(34 + 5as/h)" bytes (s sequence length, b batch, h hidden width, a attention heads) [6]. With attention done the fused way (scores never written to memory) the per-token, per-layer figure is 34h bytes, written in the forward pass and read back in the backward pass. With N ≈ 12 L h² for L layers, work per token is 72 L h²; memory time per token is 34 L h (1/245.1 GB/s + 1/175.1 GB/s). Activations stop being the limit when

hidden width h ≥ 549 (calc:743f74c8).

For scale, a 12-layer model of exactly that width has 12 x 12 x 549² = 43,401,744 parameters (calc:8becebee); the wider models in the table in 2.4 sit above the threshold. So, at the counted byte level, **a dense transformer training step on the GB10 is compute-bound, not memory-bound**, for every model size in the table in 2.4. The caveat is that 34h bytes counts only what is stored for the backward pass; a chain of separate kernels (matrix multiply, then normalise, then activation function, then add) also writes and rereads every intermediate in between. How many times over that multiplies the 34h figure in our own kernels is not measured: UNKNOWN row U2. Every factor k of extra traffic raises the width threshold to 549k.

(b) Layer-resident. A persistent kernel (one that stays running on the GPU instead of being launched again per operation) holds one layer's weights on chip for the whole micro-batch, so weights are read once per step per layer and the gradient for that layer is accumulated on chip; only activations stream. Bytes per step become 32N (the second weight read of (a) is gone: forward and backward use the copy already on chip) plus the activation traffic. The crossover batch is the same as (a), because (a) already reads weights only once per step; residency helps when a step is split into micro-batches that would otherwise reread weights and re-add gradients each time. The limit is the layer size: a whole layer (12h² parameters) fits in 42 MiB as BF16 weights only up to h = 1,354 (calc:2b49881b), and with its full scheme A state up to h = 478 (calc:13ecaa54). The real gain of (b) is fusion: keeping the intermediates between the matrix multiplies on chip removes the unmeasured factor k above.

(c) Fully on chip. Weights, gradients and optimizer state never leave the chip; only the token batch streams in (4 bytes per token id). Work per byte is 6N / 4 = 1.5N, which passes the BF16 ridge for any model above 323 parameters (calc:000271d5). It is always compute-bound. Its limit is size: 2,752,512 parameters at scheme A (section 1.3). At the measured BF16 rate that model would process up to 7.19 million tokens per second (calc:5513f69c) at 100% tensor use. That figure is not reachable: the full 42 MiB is taken by the state, leaving no room for activations, and the small matrices of a model this size are unlikely to keep the tensor cores busy (see the worked example in 1.3 and U3).

2.3 Time per token and tokens per second

Because designs (a) and (b) are compute-bound for real model widths, their speed is set by the tensor rate and how much of it the kernels use (called utilization: delivered operations divided by the chip's peak). Time per token = 6N / (utilization x rate).

ModelDesignTokens per second at 100% BF16at 50% BF16
2.75M, scheme A(c) fully on chip7,194,000 (calc:5513f69c)about 3.6 million
125M(a) or (b)158,410 (calc:234a6d6e)79,207 (calc:4856abbc)

Utilization assumptions, stated: today = our best measured tensor GEMM, 30.6 TFLOPS (FP8, real shape, loaded box; section 1.1); target BF16 = 50% of the measured 118.81 TFLOPS, about the level large training runs report (PaLM: "very high efficiency of 46.2% in model FLOPs utilization (observed throughput relative to theoretical max throughput)" [7]); target FP8 = 50% of the measured 237.52 TFLOPS, which assumes FP8 training works at our quality bar (not shown here).

2.4 Days to train compute-optimal models on one GB10

Compute-optimal (the "Chinchilla" rule): for a given compute budget, model size and training tokens should grow together, "for compute-optimal training, the model size and the number of training tokens should be scaled equally" [5]. Their Table 3 gives 20.2 billion tokens for a 1 billion parameter model [5], about 20 tokens per parameter. With D = 20N tokens, total work = 6N x 20N = 120N² operations.

ModelTokens (20N)Total workTokens per second, BF16 at 50%Days, today (30.6 TFLOPS)Days, BF16 at 50% (59.4 TFLOPS)Days, FP8 at 50% (118.8 TFLOPS)
50M1 billion3.0e17198,000 (calc:da5b68c9)0.11 (calc:e8e694cf)0.058 (calc:b21dcb17)0.029 (calc:246c83a8)
125M2.5 billion1.9e1879,207 (calc:4856abbc)0.71 (calc:6a08b864)0.37 (calc:fa2eb778)0.18 (calc:5ed28589)
350M7 billion1.5e1928,290 (calc:c7f54c42)5.6 (calc:32211650)2.9 (calc:a6986476)1.4 (calc:837a2552)
1B20 billion1.2e209,901 (calc:3643de66)45 (calc:96fd4990)23 (calc:d76d8642)12 (calc:53791ae6)
3B60 billion1.1e213,300 (calc:6d9c881f)409 (calc:31e78732)210 (calc:d9255171)105 (calc:b9679e62)

Read it as: **this one Spark can train a compute-optimal model of a few hundred million parameters in days, a 1 billion parameter model in two to six weeks, and a 3 billion parameter model only in months.** These are compute-bound numbers; they assume the data pipeline and memory keep up (2.2 says the memory does at the counted level), and they leave out attention's context-length work, evaluation and restarts.

Memory capacity is not the limit at these sizes: scheme A at 3B is 48 GB of weights and state, within the 128 GB, but not alongside today's 27B model server, which holds most of the unified memory. A training run needs the box, or most of it.

2.5 What Q2 means for Drake's idea

For decoding (answering one word at a time), every word reads all the weights from memory, so memory speed is the wall and keeping things on chip is the whole game; L272 owns that. For training, the same weights serve thousands of tokens per step, so the counted memory traffic is already below the tensor wall on this chip. The speed of training on the Spark is decided by how much of the tensor rate our kernels deliver (today 0.13 of FP8 peak on a real shape) and by the extra traffic between unfused kernels (U2). That is where "get the bloat out of the way" pays for training: fused, persistent kernels that keep each layer's intermediates on chip and keep the tensor cores fed.

3. The on-chip training experiment (Q3)

Built and run in this stream. The smallest honest test of "a training step can stay on the math cores" that Omega can express today, built from parts already in Omega (the Blackwell instruction encoder, the register allocator, the emitter helpers in src/omega_bw_em.h, the driver-free launcher and session, the warp simulator):

What this probe is and is not:

3.1 Result

Q3_RESULT

3.2 The next experiment: a tensor-core, multi-layer version (not built here)

The probe above uses FP32 multiply-adds. A probe that answers the transformer question needs these pieces; what Omega has and what it lacks (omega main a8ffd2b9):

PieceExistsMissing
BF16 tensor multiply (HMMA.16816.F32.BF16)BW_IR_HMMA_BF16, hmma() in src/omega_bw_em.h, measured 118.81 TFLOPS (src/omega_blackwell_codegen_tc.c)
FP8 tensor multiply (QMMA)src/omega_blackwell_codegen_qmma.c, measured 237.52 TFLOPS
Shared-memory tilesBW_IR_LDS128, BW_IR_STS32, BW_IR_BAR_SYNCQMD caps a block at 16 KiB of shared memory (src/omega_blackwell_qmd.h:41, issue #560); the chip allows 99 KB. A layer-resident kernel needs the full 99 KB
Grid-wide barrier between layers (all SMs finish layer k before k+1)atomics BW_IR_ATOMG_ADD_STRONG_SYS, BW_IR_MEMBAR_ALL_SYS, strong loads; L272 is building and costing a persistent grid barrier (gridbar probe, worktree omega-decode-onchip-megakernel, uncommitted at 18Z)a proven barrier primitive on main
Backward GEMMs (dX = dY Wᵀ, dW = Xᵀ dY)forward GEMM generators (src/omega_blackwell_codegen_gemm.c, _tc2.c)transposed-operand fragment loads for the two backward products
Reverse-mode gradients, CPU referencesrc/autodiff/omega_autodiff.c (M21, CPU tier)GPU tier
Optimizer step on chipSGD substrate src/train/tg_sgd.c (M22, host, FP32)an on-chip Adam or Muon update fused into the backward kernel

Experiment spec: a persistent kernel, one block per SM, each SM owning a slice of a 2-layer MLP (BF16 weights, FP32 accumulate) of about 1 million parameters in shared memory and registers; forward layer 1, grid barrier, forward layer 2, loss, backward layer 2 (dW2 and dX2), grid barrier, backward layer 1, fused SGD-with-momentum update, next batch; versus the same layers as separate launches reading weights from memory. Measure step time, tokens per second, fraction of the 118.81 TFLOPS BF16 rate, and bytes moved per step. Filed as ledger L286.

4. Verdict (Q4)

(In progress.)

UNKNOWN rows

IdWhat is not knownExperiment that resolves itOwner
U0closed: SM count 48 measured through our RM path; register-file size not reported by the driver (stays spec)evidence/physics-gb10/gr_info.txtL279
U1L2 write bandwidth on our pathL2 write stream probeL272 ceilings
U2Extra main-memory traffic per token from unfused kernels in a real Omega training step (factor k over the 34h stored-activation count)count bytes per kernel in one Omega forward+backward layer, then measurefirst training-side kernel (section 4)
U3Fraction of the tensor rate reached by the small matrix multiplies a fully on-chip model would run (for example 794 x 96 x 96, section 1.3)small-shape sweep of the BF16 GEMM generatorL286 / L288

Sources

[1] https://docs.nvidia.com/dgx/dgx-spark/hardware.html , NVIDIA DGX Spark User Guide, Hardware Overview, accessed 2026-10-20. "128 GB LPDDR5x unified system memory, 256-bit interface, 4266 MHz, 273 GB/s bandwidth"; "CUDA Cores: 6,144"; "up to 1 PFLOP (petaFLOP) at FP4 precision with sparsity".

[2] https://docs.nvidia.com/cuda/cuda-programming-guide/05-appendices/compute-capabilities.html , CUDA Programming Guide, Compute Capabilities, accessed 2026-10-20. Compute capability 12.x column: "Number of 32-bit registers per SM: 64 K"; "Maximum amount of shared memory per SM: 100 KB"; "Maximum amount of shared memory per thread block: 99 KB"; "Unified Data Cache Size (KB): 128"; "Maximum number of resident warps per SM: 48".

[3] https://chipsandcheese.com/p/analyzing-nvidia-gb10s-gpu , Chips and Cheese, "Analyzing Nvidia GB10's GPU", accessed 2026-10-20. "The iGPU features 48 Streaming Multiprocessors running at up to 2.55 GHz"; "GB10 behaves much like Nvidia's consumer Blackwell architecture and has 128 KB of L1/Shared Memory"; "GB10's 24 MB L2 is likely almost as effective"; "GB10's L2 handles writes at half rate, and provides just under 1 TB/s of write bandwidth."

[4] https://arxiv.org/html/2001.08361 , Kaplan et al., "Scaling Laws for Neural Language Models", 2020, accessed 2026-10-20. "Accounting for the backwards pass (approximately twice the compute as the forwards pass), we then define the estimated non-embedding compute as C≈6N floating point operators per training token."

[5] https://arxiv.org/pdf/2203.15556v1 , Hoffmann et al., "Training Compute-Optimal Large Language Models", 2022, accessed 2026-10-20. "we find that for compute-optimal training, the model size and the number of training tokens should be scaled equally"; Table 3: "1 Billion ... 1.21e+20 ... 20.2 Billion"; Table 4, Chinchilla 70B batch size: "1.5M → 3M" with caption "the training batch size (# tokens)"; "We verify this by training a more compute-optimal 70B model, called Chinchilla, on 1.4 trillion tokens."

[6] https://arxiv.org/pdf/2205.05198 , Korthikanti et al., "Reducing Activation Recomputation in Large Transformer Models", 2022, accessed 2026-10-20. "Summing the memory required for attention, MLP, and the layer-norms, the memory required to store the activations for a single layer of a transformer network is: Activations memory per layer = sbh(34 + 5as/h)".

[7] https://arxiv.org/pdf/2204.02311 , Chowdhery et al., "PaLM: Scaling Language Modeling with Pathways", 2022, accessed 2026-10-20. "we describe how we were able to scale pipeline-free training of PaLM 540B to 6144 chips across two TPU v4 Pods while achieving very high efficiency of 46.2% in model FLOPs utilization (observed throughput relative to theoretical max throughput) and 57.8% in hardware FLOPs utilization."