Dims & Sums

DEEPSEEK-V4.1-FLASH

890 Bytes

chapter 4 of 7 · about 6 minutes

V4.1-Flash stores its main cache in FP4. Four-bit values nearly halve the storage of FP8, but each value must land on a much smaller set of representable numbers.

The report uses E2M1 FP4 codes with one E4M3 scale per 16 channels. That shared scale lets one compact code range cover groups with different magnitudes.

The layout is a derived 4.5 bits per value: 64 data bits plus one 8-bit scale for 16 channels. DeepSeek follows NVFP4's shape but omits its second, global scale.

Where the four bits are, and where they are not

The sliding-window cache stays in FP8. It is read on every decode step, so its local accuracy is worth the larger footprint. FP4 is reserved for the main compressed cache.

The authors introduce quantization-aware training for main-KV storage during post-training. They quantize after rotary position embedding, so the stored format matches the serving path.

The report publishes a combined global-KV footprint of 890 bytes per token. It does not provide a component ledger for main KV versus indexer keys. A 512-channel illustrative entry would occupy 288 bytes under this toy packing, but that is not a reported partition of 890.

relative global-KV footprint per token (log scale)100 B1 KB10 KB100 KB1 MBV4.1-Flash890 BV4-Flash≈4× V4.1DeepSeek-V1≈437× V4.1≈1/4 of V4-Flash437x V4.1one cache entry: 16 values per scale, four bits each16 values, 4 bits each1 scale4.5 bits per value in the end, against 8 for FP8 and 16 for BF16.
Global-KV footprint, with predecessor bars shown as report-level relative reductions rather than invented absolute byte counts. The second panel shows the reported FP4 grouping: sixteen E2M1 codes plus one E4M3 scale.
DeepSeek says alternative four-bit layouts scored better in its experiments. It chose the OCP-standard MXFP4 layout for hardware compatibility. The reported result is a format trade, not a claim that every four-bit scheme behaves the same.

Pack one word's cache row

Choose a word from the incident trace, pack its 16 toy values, then click a cell to inspect the rounding.

word whose state is stored:
storage format:

toy state for cache. Real cache vectors have 512 channels; this panel shows one 16-channel group. Its ladder and real-valued scale are illustrative, not the report's complete E2M1/E4M3 encoding.

stored for this 16-value group

72 bits

64 data bits + 8-bit scale

shared scale

0.270

maps the small ladder to this group's range

mean rounding distance

waiting

toy values only

channel v1: raw 1.620

Press “pack this row” to watch the storage representation replace the raw toy values.

The released model applies FP4 to the main compressed KV cache and keeps SWA KV in FP8. The report publishes their combined global-KV footprint as 890 bytes per token; this toy does not split that total into components.

What this buys, in sessions per machine

At 890 bytes per token, four million-token global-KV footprints total about 3.6 GB. The report says that global-KV figure is roughly four times smaller than V4-Flash, but it does not turn that ratio into a full per-session HBM budget.

More global cache can fit in a fixed memory pool. That changes how much agent context stays warm while a server waits for the next turn.

receipts, every claim in this chapter, checked 2026-08-31