VRAM GB → GiB / MiB

An 80 GB A100 reports 81,920 MiB in nvidia-smi — about 7% more bytes than the label implies, because GPU vendors have always meant GiB when they print GB. The capacity that disappears before your first tensor is not a unit trick: it is ECC rows, the CUDA context, library workspace and allocator fragmentation. Get that arithmetic right and the 3 AM OOM stops being a mystery.

Bidirectional GB and GiB Converter

Converts a decimal-GB capacity into the binary GiB and MiB that filesystems, allocators and nvidia-smi report. Mind the direction: drive and RAM labels are decimal, but GPU VRAM labels are already binary — an 80 GB card is 80 GiB, not 74.5 GiB. The reference table below shows which is which.

Common GPU Reference Table

What the vendor prints, what nvidia-smi actually reports, and the same capacity expressed in decimal GB. Note the direction of the gap: every one of these delivers more bytes than the label implies, because the label is binary.

GPU Label nvidia-smi Actual (GiB) In decimal GB
T416 GB15,360 MiB15.0016.11
A1024 GB23,028 MiB22.4924.15
L424 GB23,034 MiB22.4924.15
RTX 409024 GB24,564 MiB23.9925.76
A100 SXM440 GB40,960 MiB40.0042.95
L40S48 GB46,068 MiB44.9948.31
H100 SXM80 GB81,559 MiB79.6585.52
A100 SXM480 GB81,920 MiB80.0085.90
H200 SXM141 GB143,771 MiB140.40150.75

Why GB ≠ GiB Still Matters — Just Not Where You Expect

The decimal-versus-binary gap is real: 1 GB is 10⁹ bytes, 1 GiB is 2³⁰ bytes (1,073,741,824), and the difference is 6.87%. It wrecks capacity plans for drives and system RAM on a weekly basis. But the version of this story that circulates in ML circles — "your 80 GB GPU only gives you 74.5 GiB" — is backwards, and it is worth knowing why before you size a cluster against it.

GPU vendors print GB and mean GiB

nvidia-smi is the ground truth, and it reports in MiB. An A100 80GB reports exactly 81,920 MiB, which is 80 GiB — not 74.5. A T4 labelled 16 GB reports 15,360 MiB, exactly 15 GiB. An H200 labelled 141 GB reports 143,771 MiB, or 140.40 GiB. In every case the label is the binary figure, and in several cases the card physically carries more bytes than the decimal reading of its own label.

So the 0.9313 multiplier is the wrong tool here. Applied to a GPU label it understates capacity by about 7%, which is not a harmless rounding error at fleet scale: 64 cards at 80 GiB hold 5,120 GiB of real memory, and the same fleet written off as "64 × 74.5 = 4,768 GiB" understates it by 352 GiB — more than four cards' worth. Use the multiplier on drives, RAM sticks and data-sheet figures; read the GPU number straight off nvidia-smi.

Where the memory actually goes before your first tensor

Capacity is not the same as allocatable memory, and the distance between them has nothing to do with units. Four things take a cut:

On a single-process job the first three are noise against 80 GiB. On a node running four MPS processes they are not: 4 × 500 MiB of context plus a gigabyte of workspace is roughly 3 GiB gone before any weights are loaded. The planning rule that survives contact with all of this is to design against 90% of the nvidia-smi total — 72 GiB on an 80 GiB card — and treat the remainder as the buffer that stops fragmentation from killing an overnight run.

Worked example: does 7B fine-tuning fit in 80 GiB?

Mixed-precision fine-tuning with Adam holds five things in memory at once. For a 7B model: bf16 weights 14 GB, bf16 gradients 14 GB, fp32 master weights 28 GB, and the two Adam moments at 28 GB each — 112 GB in total, which does not fit 80 GiB by a wide margin. That arithmetic decides the question, and no unit conversion changes it.

Swap in 8-bit Adam and the optimizer state falls to 7 GB per moment: 14 + 14 + 28 + 7 + 7 = 70 GB, or 65 GiB. Against the 72 GiB design ceiling that leaves roughly 7 GiB for activations — workable for short sequences and modest batch sizes, and not workable for long-context training, where the KV cache alone claims several gigabytes per sequence. When it does not fit, the answer is a sharded optimizer (ZeRO stage 2 or FSDP), which partitions exactly the three components that dominate that 112 GB — not a bigger card.