Skip to content
RustingBrainGitHub

Training throughput baseline

RustingBrain pages

Measured with examples/sweep_arch.rs, one configuration per process, on an otherwise idle RTX 3060 12 GB (desktop applications holding 1258 MiB).

Regression check

scripts/bench_check.sh compares the best tokens/s of five runs against these rows and fails below 97%. Measured on the idle RTX 3060 (train step) and the Ryzen 5 7600X (decode, CPU). One run spreads about 3.5% on both. bench_decode is sensitive to anything else on the CPU: with one parallel rustc it measured 1464-2088 tokens/s, so run it on a quiet machine. Re-record with scripts/bench_check.sh --record after a change that is meant to move these numbers.

BenchmarkBest tokens/s
bench_train_step 4 1024 cuda52890
bench_decode 512 1282434

Throughput

FLOPs per token counts the parameter term and the attention term:

text
FLOPs/token = 6 * active_params + 12 * n_layers * seq_len * d_model
MFU         = tok/s * FLOPs/token / 25e12     (RTX 3060 bf16 peak, fp32 accumulate)
ConfigurationTotalActivetok/sTFLOPSMFUDays for 50B
v32000 d512 L8 16x512 moe55.2M35.7M363028.6934.8%15.9
v16384 d512 L8 16x512 moe47.2M27.7M401157.6830.7%14.4
v16384 d512 L8 16x512 dense30.9M30.9M437049.2136.8%13.2
v16384 d512 L8 32x512 dense30.9M30.9M439529.2637.0%13.2
v16384 d512 L8 16x1024 dense30.9M30.9M340898.0332.1%17.0
v16384 d512 L12 16x512 dense42.2M42.2M291898.4934.0%19.8
v16384 d768 L12 16x512 dense88.7M88.7M156209.2036.8%37.0
v32000 d512 L8 128x128 moe55.2M35.7M399887.8731.5%14.5

Contended figures for the same configurations ran at 16989, 18651, 21295 and 14453 tok/s: the clean card is 2.14x faster, and nothing else in this repository changed between the two sets.

Peak VRAM

ConfigurationPeak (including 1258 MiB desktop)
v16384 d512 L8 32x512 dense6779 MiB
v16384 d512 L8 16x1024 dense7355 MiB

No configuration in the sweep ran out of memory, including the three that did under contention (batch 24, 12 layers, seq 1024 at batch 16). The 12 GB card has roughly 4.5 GB of headroom at the largest shape measured.

The dated measurements behind each change are in measurements.md.