Model fits in VRAM ≠ runs: an 8B model really needs ~18.9 GiB, thread explains
techNmak · x · 2026-11-26
A detailed thread (with infographic) on why parameter count only tells you weight size, not peak GPU memory. FP32 Adam training costs 16 bytes/param (weights+grads+moments) before activations; inference swaps those for a KV cache that grows with tokens and concurrency. Worked example: an 8B BF16 model with 32 layers, 8 KV heads, head dim 128 needs 1 GiB KV per 8,192-token sequence — four concurrent sequences plus 16 GB weights ≈ 18.90 GiB raw payload. Also covers the allocated-vs-reserved distinction in PyTorch's caching allocator, why emptycache() can't free live tensors, and which optimization targets which cost (microbatches, activation checkpointing, ZeRO/FSDP, quantization, paged/prefix-shared KV). Bottom line: measure peak workload memory, not checkpoint size.
More from Infra
- Another OTel Node.js SDK PR lands: ~5% faster OTLP transforms via integer fast path — DanielLockyer · 2026-11-26
- Chutes TEE billed as the most battle-tested private inference in the world — const_reborn · 2026-11-26
- Polymarket launches 24/7 perpetual futures on H100 GPU hourly rental price — Polymarket · 2026-11-26
- Hardwood runs nightly Parquet benchmarks with Apache Otava change-point detection to catch regressions — blaizedsouza · 2026-11-26
- andashi turns one GrapheneOS Pixel into six isolated phones via declarative config — rschu · 2026-11-26
- Zhipu denies GLM-5.5 delay: December launch, pretraining on 10,000-card 950DT cluster — MagicZhang · 2026-11-26