How DeepSeek cut the memory per token of context from 389,120 bytes to 890: compressed attention, stable wide residuals, FP4 weights and hashed n-gram memory.
A coding agent opens a large repository, reads every file, and keeps the result in its working memory: about one million tokens. With DeepSeek-V3's attention, the stored context for that one conversation takes 73.7 GB. That is almost all of an 80 GB GPU, for one user, before the model weights.
DeepSeek-V4.1-Flash, released in September 2026, stores the same million tokens in 0.93 GB. Per token, it keeps 890 bytes where DeepSeek's first big model kept 389,120. This part explains how each of those bytes went away. It also covers what else changed on the way: a new residual connection, 4-bit expert weights, a faster drafter and a hash-table memory.
Part 5 ended with V3.2, which made long-context attention cheap to compute but not cheap to store. This part starts there.
DeepSeek published two model generations in 2026, and several updates of each. The weights of all of them are open under the MIT license.
The 2026 releases. V4 came as a preview in April and as official releases in July and August. V4.1-Flash followed in September (dates from DeepSeek's release notes and Hugging Face).
Model
Released
Total parameters
Active per token
Context
Routed experts (top-k)
Layers
V3 / V3.2 (for comparison)
Dec 2024 / Dec 2025
671B
37B
128K
256 (8)
61
V4-Flash
Apr 2026
284B
13B
1M
256 (6)
43
V4-Pro
Apr 2026
1.6T
49B
1M
384 (6)
61
V4.1-Flash
Sep 2026
552B backbone + 196B Engram
8B in prefill, 16B in decode
1M
384 (6)
40
The totals and active counts are the papers' own numbers (V4 paper pages 1, 24 and 25; V4.1 paper pages 1 and 7). The layer and expert counts come from the config.json files on Hugging Face.
Three upgrades carry V4: a hybrid attention (CSA and HCA), a new residual connection (mHC), and a new optimizer, Muon. This part covers the first two; the optimizer changes training, not the model's shape.
When a model writes a token, attention compares the new token with every earlier token. The earlier tokens' keys and values never change, so the model stores them instead of computing them again.
We measure it in bytes per token: how much memory each token of context costs. The simplest case, a model where every layer stores a key and a value for each of its KV heads, gives:
bytes per token=2×L×Hkv×dh×b
Read it left to right. The 2 counts one key and one value. L is the number of layers. Hkv is the number of key-value heads per layer. dh is the length of each head's vector. b is the bytes per stored number: 2 for BF16, 1 for FP8, half a byte for FP4.
A tiny example first. A 2-layer model with 1 KV head of 4 numbers in BF16 stores 2×2×1×4×2=32 bytes per token. A 10-token prompt costs 320 bytes.
Now the real models. DeepSeek LLM 67B (2023) has 95 layers and 8 KV heads of 128 numbers in BF16:
2×95×8×128×2=389,120 bytes
DeepSeek-V3 uses multi-head latent attention (MLA). Each layer stores one 512-number latent plus one 64-number position key, in BF16 (Part 2; attention, Part 2):
Multiply by the length. At 128K tokens, V3's cache is 9.21 GB per conversation. At 1M tokens (1,048,576), it is 73.69 GB. That is one conversation filling a GPU.
Memory is only the first problem. To write each new token, the model must also read the cache, and reading memory is slow compared with arithmetic.
V3.2 attacked the reading cost with DeepSeek Sparse Attention (Part 5). A small "lightning indexer" scores every earlier token, and the main attention reads only the best 2,048. But V3.2 still stores every token, and the indexer adds its own key per token. In DeepSeek's serving format that is 656 bytes of FP8 latent plus 132 bytes of indexer key per layer:
61×(656+132)=48,068 bytes
So V3.2 at one million tokens would still need 50.4 GB (V3.2 itself only supports 128K). To make a million tokens routine, the model must store fewer entries, not only read fewer.
Think of minutes of a long meeting. You could keep a recording of every sentence. Or you could write one line for every four sentences, and one paragraph for every hour. To answer a question, you scan the hourly paragraphs for the right hour. Then you read the few one-line notes that matter, plus the last few sentences word for word.
V4 does exactly this with two kinds of attention layer.
What one query can read. In a CSA layer, groups of 4 tokens become entries and the indexer picks a few; in an HCA layer, 128 tokens become one entry and all entries are read. Both layers add a window of recent tokens. Drawn small; real sizes in the note.
How does the compressor turn 4 tokens into one entry? It computes two candidate KV vectors for every token, series a and series b, plus a score for each. Entry i mixes the 4 tokens of its own group from series a and the 4 tokens of the previous group from series b:
Here Cja and Cjb are the two candidate vectors of token j, each 512 numbers long. Sja and Sjb are weights from one softmax over all 2m=8 scores, with a learned bias for each slot. The symbol ⊙ means "multiply number by number", so each of the 512 channels gets its own weights.
A tiny example with m=2 and one channel. Own tokens have values 4 and 8 with scores 0 and ln3. The previous tokens have values 2 and 6 with scores 0 and 0. The softmax over the four scores turns e0,eln3,e0,e0=1,3,1,1 into weights 61,21,61,61. The entry is 61⋅4+21⋅8+61⋅2+61⋅6=6. The token with the highest score dominates, but every token contributes.
CSA builds entry i from its own 4 tokens and the 4 tokens before them. Neighbouring entries overlap, but there is still one entry per 4 tokens.
Why read 8 tokens to make an entry that replaces 4? A hard cut every 4 tokens would split phrases at random: "New" could land in one group and "York" in the next. With the overlap, a phrase that crosses a boundary still reaches one entry whole. The paper notes that CSA "in fact compresses the sequence length to 1/m times": the overlap costs compute, not memory.
Two more details make the stored entries small. First, CSA and HCA use one shared KV head, as in multi-query attention. All 64 or 128 query heads read the same entry.
V4 goes one step further than classic multi-query attention: the same 512-number entry serves as both the key and the value (attention, Part 2).
Second, V4 stores the entry in mixed precision. The 448 numbers that carry content go in FP8, and the 64 numbers that carry position (RoPE) stay in BF16. With 8 bytes of scale factors, one entry takes 448+64×2+8=584 bytes (FlashMLA's documented layout).
HCA: read everything, because there is little to read#
V4 adds two smaller tricks to the core attention. An attention sink is one learned score per head, added to the softmax's denominator. With it, a head can give almost no weight to anything when nothing is relevant. And the output of each head is rotated back by its own position, so the result carries relative, not absolute, position.
The layer plans, read from compress_ratios in the configs. V4-Flash starts with two window-only layers, V4-Pro with two HCA layers; then both alternate CSA and HCA. V4.1-Flash is covered further down.
Now we can write V4's bytes per token. Each layer stores entries of e bytes, one per m tokens, so it costs e/m bytes per token:
bytes per token=layers∑memain+eindexer
For a CSA layer, emain=584 bytes. The indexer key is 128 numbers in MXFP4: 64 bytes of 4-bit values plus one 1-byte scale per 32 values, so eindexer=68. For an HCA layer, eindexer=0. The window layers add nothing per token.
Worked by hand for V4-Flash: 21×(584+68)/4=3,423 bytes from the CSA layers, and 20×584/128=91.25 bytes from the HCA layers. The total is 3,514 bytes, and that is exactly the number DeepSeek prints for V4-Flash. The indexer layout of 68 bytes is our reading of the MXFP4 format. The exact match with the published total is good evidence that it is right.
Here is the part of our script that does this from the config:
DeepSeek-V4-Flash: 43 layers = 2 sliding-window only + 21 CSA (ratio 4) + 20 HCA (ratio 128) CSA: 21 x (584 + 68) B / 4 = 3,423.00 B HCA: 20 x 584 B / 128 = 91.25 B DeepSeek-V4-Pro: 61 layers = 0 sliding-window only + 30 CSA (ratio 4) + 31 HCA (ratio 128) CSA: 30 x (584 + 68) B / 4 = 4,890.00 B HCA: 31 x 584 B / 128 = 141.44 BV4-Pro (not in the chart): 5,031 B per token; V3.2 / V4-Pro = 9.55x, V3.2 / V4-Flash = 13.68x (V4 paper Figure 1: "9.5x smaller", "13.7x smaller")
Where the bytes come from. In V4 the CSA layers hold almost everything; twenty or more HCA layers add under 150 bytes per token together. V4.1-Flash stores KV in only four layers (explained below).
The ratios match the paper's Figure 1: 48,068 / 3,514 is 13.68, and 48,068 / 5,031 is 9.55. Notice what the split shows. The HCA layers are almost free, so the 128-token view of the whole context costs nearly nothing. The real budget is the CSA layers, and that is where V4.1 will cut next.
Every Transformer layer has a bypass around it. The layer's input skips past the layer and is added to its output.
That untouched path is the reason deep networks train at all. Unroll the rule over many layers and the first input is still there, unchanged, in the last layer: xL=xl+∑F(…). Gradients flow back the same way. The mHC paper calls this the identity mapping property.
In 2024, researchers proposed widening the stream: keep n copies of it, and let each layer mix them.
A residual connection adds the layer's output to an untouched input. Hyper-connections keep four copies of the stream; B mixes them on the bypass, A reads one input from them and C writes the output back.
Read the update rule symbol by symbol:
Xl+1=BlXl+ClFl(AlXl)
Xl is the residual state before layer l: n rows of d numbers. AlXl is one row of d numbers, the input that layer Fl sees. ClFl(⋅) copies the layer's output into the n streams with n weights. BlXl is the bypass, now a mix of streams instead of a plain copy. With n=1 and B=C=A=1, the rule is the ordinary residual connection.
The bypass is now a matrix. Unroll it over many layers and the first input reaches layer L multiplied by the productBL−1⋯Bl+1Bl. Products of matrices are dangerous.
A tiny example. Let every layer use B=(1.10.10.11.1). Each row sums to 1.2, so a signal [1,1] grows by 1.2 per layer. After 40 layers it is 1.240≈1,470:
plain text
1) A 2 x 2 matrix that is a little too big: H = [[1.1, 0.1], [0.1, 1.1]], every row sums to 1.2 after 1 layers the signal [1, 1] becomes [1.2, 1.2] after 10 layers the signal [1, 1] becomes [6.2, 6.2] after 20 layers the signal [1, 1] becomes [38.3, 38.3] after 40 layers the signal [1, 1] becomes [1,469.8, 1,469.8]
Each matrix looks harmless, yet 20% too much per layer becomes a factor of a thousand over depth. Learned matrices differ from layer to layer, so real growth is a random walk, but the danger is the same.
We reproduced the effect with random matrices: 4 streams, 120 mixing layers and 5 random seeds. A 60-block model has an attention and an MoE layer per block, so 120 mixing layers. HC uses I+0.2G, a matrix near the identity with random noise G. mHC uses the projected matrix described next.
plain text
3) n = 4 streams, 120 mixing layers (a 60-block model: attention + MoE per block), noise scale 0.2, 5 seeds layer HC gain (median / max of seeds) mHC gain (median / max) 1 1.8 / 2.3 1.000 / 1.000 10 4.9 / 8.8 1.000 / 1.000 30 7.1 / 14.1 1.000 / 1.000 60 50.1 / 98.1 1.000 / 1.000 90 165.3 / 330.5 1.000 / 1.000 120 439.0 / 661.7 1.000 / 1.000 largest single-layer spectral norm: HC 1.824, mHC 1.000104 NumPy Sinkhorn vs PyTorch log-domain Sinkhorn: largest difference 4.4e-16
Our toy, on a log scale. The gain of unconstrained mixing matrices grows to hundreds over 120 layers; the projected (mHC) matrices hold it at 1 in every seed.
Our toy is not a trained model: the noise is random, not learned. It shows only the mechanism: small errors per layer compound. The paper's 3,000 comes from a real 27B training run.
mHC keeps the four streams and the mixing, but restricts what Bl can be.
Here is the mean-keeping property on numbers from our script. Mix the streams [4,2] (mean 3) with the matrix above:
(0.3660.6340.6340.366)(42)=(2.7323.268)
The streams changed; their mean is still 3.000. Each output is a weighted average of the inputs, with weights that sum to 1, so no output can be bigger than the biggest input.
Getting a doubly stochastic matrix: Sinkhorn-Knopp#
The network produces a raw matrix of any numbers. A 1967 algorithm turns it into a doubly stochastic one.
Run it by hand on exp(raw)=(1131). The column sums are 2 and 4. Dividing gives (0.50.50.750.25), whose rows sum to 1.25 and 0.75. Dividing each row by its sum gives (0.40.6670.60.333). Now the columns are off a little: 1.067 and 0.933. Keep going:
python
def sinkhorn(raw, iters=20): """Method 1 (NumPy). exp() makes every entry positive; then alternate column and row normalisation. Same order as the paper's Eq. 8/9: M(t) = T_r(T_c(M(t-1))).""" M = np.exp(raw) for _ in range(iters): M = M / M.sum(axis=0, keepdims=True) # T_c: every column sums to 1 M = M / M.sum(axis=1, keepdims=True) # T_r: every row sums to 1 return M
Sinkhorn-Knopp on a 2 x 2 matrix. Three rounds already give sums within 0.001 of 1; V4 runs 20 rounds for every 4 x 4 matrix, at every layer, for every token.
The error falls about tenfold per round, so three rounds are already close. The script also checks this NumPy version against a PyTorch version written in log space, the safe form for large exponents: they agree to 4.4×10−16.
Most of a V4 model's parameters sit in its routed experts. In V4-Flash they are 43×256×3×4,096×2,048=277.0 billion of the 284 billion, by our count from the config. Shrinking the experts shrinks the model. V4 stores them in FP4. On today's chips an FP4 x FP8 product runs at FP8 speed, so the gain is memory, not speed (V4 paper, page 5).
Our script checks the size this gives:
plain text
V4-Flash routed experts: 43 layers x 256 x 3 x 4096 x 2048 = 277.0B parameters in FP4 with one 1-byte scale per 32 values: 147.2 GB; the other ~7B in FP8: ~7 GB; estimate 154 GB (published files: 159.6 GB) the same 284B in BF16 would be 568 GB
Our estimate of 154 GB is close to the 159.6 GB of the published V4-Flash files. We do not count the shared experts, norms, scales of the FP8 parts and file overhead, so the small gap is expected. The point is the other line: in BF16 the same model would be 568 GB. Part 7 turns these sizes into GPU counts.
DSpark is V4's new draft model for speculative decoding (Part 2 shows how V3 drafted with its MTP module). It replaces that one-token drafter.
DeepSeek first shipped DSpark checkpoints for the V4 preview in June. Then came the official releases. V4-Flash-0731 "is the official release of DeepSeek-V4-Flash, superseding the preview version", with "a speculative decoding module attached" (model card). V4-Pro-0813 is "built on the DeepSeek-V4-Pro (Preview) model structure, with a DSpark speculative decoding module attached". Its config adds DSpark fields such as dspark_block_size: 5. In V4.1-Flash, DSpark replaces MTP completely: the backbone trains without MTP, and the drafter trains afterwards with the backbone frozen.
In the causal encoder-decoder, the decoder layers project their long-range KV from the output of the last encoder layer. A long prompt mostly needs only the encoder half during prefill.
V4 stored a separate cache in every CSA and HCA layer. V4.1 asks a sharper question: do neighbouring layers need different caches at all?
The decoder adds one more trick, the Hierarchical Sparse Indexer. The first decoder layer scores every position, then keeps the 2,048 best blocks of 8 positions: a pool of 16,384 candidates. Later Reindex layers score only that pool. Their cost per query no longer grows with the length of the context.
The last cut is precision. V4 stored the main entry in FP8 with BF16 for the position part. V4.1 stores all of it in FP4.
Now count V4.1's bytes. Each Full layer stores a 288-byte entry plus a 68-byte indexer key, once per m tokens:
python
def v41(): c = cfg('DeepSeek-V4.1-Flash') L = c['num_hidden_layers'] ratios = c['compress_ratios'][:L] src = c['kv_source_layer_ids'] total = 0 for l in src: m = ratios[l] b = (V41_MAIN_FP4 + FP4_INDEX) / m total += b
plain text
V4.1-Flash: 40 layers, compress ratios [0, 1, 2], KV stored only in layers [2, 8, 14, 20] layer 2 (encoder, ratio 2): (288 + 68) B / 2 = 178.0 B layer 8 (encoder, ratio 2): (288 + 68) B / 2 = 178.0 B layer 14 (encoder, ratio 2): (288 + 68) B / 2 = 178.0 B layer 20 (decoder, ratio 1): (288 + 68) B / 1 = 356.0 B
Three encoder layers give 3×356/2=534 bytes, the decoder layer gives 356, and the total is 890 bytes: the paper's number exactly. Notice that the compression ratios went down, from 4 to 2 and even 1. V4.1 stores finer detail than V4's CSA layers. It still uses a quarter of the memory, because it stores it in 4 layers instead of 41.
Some knowledge is a fixed fact about a short phrase. After "Alexander the", "Great" is very likely. After "import numpy as", "np" is almost certain. A Transformer stores such facts in its weights, and finds them by running several layers of attention and MoE. Engram asks: why compute a lookup?
Here is the hash from our toy, written like the official Engram demo code. It multiplies each token ID by a fixed random odd number, combines with XOR, and takes the remainder modulo a prime.
python
def rows_for(seq, t, n): """The suffix n-gram ending at position t -> one row number per hash head.""" gram = seq[max(0, t - n + 1): t + 1] gram = [0] * (n - len(gram)) + gram # pad at the start of the text mix = 0 for k, tok in enumerate(reversed(gram)): # offset 0 = current token mix ^= int(tok) * int(mult[k]) return [mix % p for p in PRIMES[n]], gram
plain text
1) tokenizer compression raw IDs : [0, 1, 2, 3, 4, 5, 2, 6, 7, 8, 9, 6, 10, 1, 2, 3] (11 distinct) canonical IDs: [0, 1, 2, 3, 4, 5, 2, 6, 7, 8, 2, 6, 9, 1, 2, 3] (10 distinct; "The" and "the" now share one ID)2) lookups for the last tokens of "... obeyed Alexander the Great" 2-gram "the Great" -> canonical IDs [2, 3] -> rows [283, 142] in tables of size [1009, 1013] 3-gram "Alexander the Great" -> canonical IDs [1, 2, 3] -> rows [83, 847] in tables of size [1019, 1021] memory vector e_t = concatenation of 4 rows x 4 = 16 numbers "Alexander the Great" at position 3 and at the end give the same rows: [83, 847] and [83, 847]: same memory, both times3) 50,000 distinct 2-grams hashed into tables of 65,537 and 65,539 rows share a row with another 2-gram in head 1: 53.3% in head 2: 53.7% share BOTH rows with the same other 2-gram: 0.000%
Step 1 is the tokenizer compression from the paper. IDs that differ only in case or spacing map to one canonical ID, so "The" and "the" share their memory. Step 2 shows the key property: the same phrase always lands on the same rows, at any position, with no search. Step 3 shows why there are several heads. We packed 50,000 2-grams into tables of about 65,000 rows, much tighter than a real table. More than half share a row in one head, but none share both rows with the same partner.
Engram at one position. Hash the last two and three tokens with two heads each, read one row from each table, join the rows, gate the result with the hidden state, and add it to the stream.
The retrieved vector is a guess made without context, so Engram checks it against the hidden state before use. The gate is a scaled dot product passed through a sigmoid:
αt=σ(dRMSNorm(ht)⊤RMSNorm(kt))
ht is the hidden state at position t, which already carries the context. kt is a key projected from the retrieved memory. RMSNorm scales each vector so that its numbers have an average square of 1. σ squashes the result into the range 0 to 1. The output added to the stream is αt times a value projected from the memory. Our toy with d=16:
plain text
4) gate alpha = sigmoid(RMSNorm(h) . RMSNorm(k) / sqrt(16)) hidden state agrees with the memory (h = k) : alpha = 0.982 unrelated hidden state (random h) : alpha = 0.451 hidden state contradicts the memory (h = -k) : alpha = 0.018
When the memory fits the context, it passes almost whole. When it contradicts the context, for example "Great" in "the Great Barrier Reef", the gate closes. With h=k the dot product of the normalized vectors is exactly d=16, so the sigmoid sees 16/4=4 and gives 0.982.
Engram (V4.1-Flash): layers [1, 14], 3 n-gram orders x 8 hash heads per module table rows = 384,006,168 + 384,016,682 = 768,022,850 parameters = 768,022,850 rows x 256 dims = 196.6B (paper: "196B Engram parameters") per table = 16,000,476 rows on average (paper: "approximately 16M entries") read per token = 48 rows x 256 = 12,288 numbers = 12,288 bytes in FP8 (0.0000062% of the tables)
Here is why "active" is the wrong word. Per token, Engram reads 48 rows: 2 modules x 3 orders x 8 heads. That is 12,288 numbers, about 12 KB in FP8, out of 196.6B. A dense layer with 196.6B weights would need about 393 GFLOPs per token. So DeepSeek counts the 196B separately from both the 552B backbone and the 8B or 16B active.
Does a lookup really cost the same in a huge table? On our CPU, gathering 8,192 rows took the same time from a table of a thousand rows as from one of four million:
plain text
5) gather 8,192 rows of 64 FP16 numbers (CPU, best of 20 runs) table of 1,000 rows ( 0.1 MB): 0.113 ms table of 100,000 rows ( 12.8 MB): 0.118 ms table of 4,000,000 rows ( 512.0 MB): 0.080 ms
The small differences are timing noise on a laptop CPU, not a trend. The table's size costs memory, not time, and that memory can be cheap CPU memory. The Engram paper reports that a 100B-parameter table in host memory costs "negligible overhead (< 3%)". Its own test model, Engram-27B, swapped part of its experts for a 5.7B-parameter table at equal size and compute. It reports MMLU +3.4, BBH +5.0 and long-context retrieval (Multi-Query NIAH) from 84.2 to 97.0.
V4.1-Flash is DeepSeek's first main model trained on images from the start. A vision encoder trained from scratch, DeepSeek-ViT (32 layers, 14-pixel patches), turns an image into features. A 3 x 3 "pixel-unshuffle" folds each 3 x 3 neighbourhood into one token, so an image costs nine times fewer tokens. The pre-training corpus is 45T tokens, 7 parts text-only to 1 part multimodal. Image and text tokens also keep separate load-balancing biases for the experts (Part 2), because they prefer different experts.
Now every number in DeepSeek's own chart has an explanation, and a line of arithmetic behind it.
Our script's reconstruction of the chart, with V3 added. Every bar comes from config.json and the published cache layouts; four of the five match the paper's figure to the byte.
plain text
model date bytes/token paper Fig 1b x smaller GB at 128K GB at 1MDeepSeek LLM 67B 2023-11 389,120 389,120 51.00 408.02DeepSeek-V3 2024-12 70,272 - 5.5x 9.21 73.69DeepSeek-V3.2 2025-12 48,068 48,068 1.5x 6.30 50.40DeepSeek-V4-Flash 2026-04 3,514 3,514 13.7x 0.46 3.68DeepSeek-V4.1-Flash 2026-09 890 890 3.9x 0.12 0.93V4-Pro (not in the chart): 5,031 B per token; V3.2 / V4-Pro = 9.55x, V3.2 / V4-Flash = 13.68x (V4 paper Figure 1: "9.5x smaller", "13.7x smaller")67B / V3.2 = 8.1x (V4.1 paper Figure 1b: "8.1x smaller")67B / V4.1-Flash = 437.2x (V4.1 paper: "437-fold"); V4-Flash / V4.1-Flash = 3.95x ("approximately 4-fold")
V3 is not in DeepSeek's chart; we added it because it is the model most readers know. At one million tokens, 67B would need 408 GB per conversation, V3 73.7 GB, and V4.1-Flash 0.93 GB.
Research notes: assumptions and what we could not check
The main entry layouts (656 B for V3.2, 584 B for V4, 288 B for V4.1 FP4) are from the FlashMLA README at commit ba89a34. The 68-byte indexer key is our reading of MXFP4 (128 four-bit values plus one 8-bit scale per 32). The V4 reference code uses an FP4 block size of 32 (fp4_block_size = 32). This assumption reproduces the published 3,514 and 890 exactly, which is strong but indirect evidence.
V4-Pro's 5,031 bytes per token is our number; DeepSeek does not print it. It reproduces the paper's "9.5x smaller".
The sliding-window estimate (3.2 MB per request for V4-Flash) assumes the window uses the same 584-byte layout as the compressed entries.
The arXiv identifier of the V4 paper starts with 2606, but arXiv shows "Submitted on 26 Apr 2026".
DeepSeek-V4-Flash-Vision-Exp exists on Hugging Face; we did not read its config, and there is no paper for it.
The V4.1-Flash release note on the API site is dated 10 September 2026; the arXiv paper is dated 17 September 2026.
Our mHC toy uses random, not learned, matrices; our Engram toy uses tiny tables. Both show mechanisms, not model behaviour.
Part 7 turns all these numbers into hardware. It counts the GPUs each model needs, and what fits on one machine or on a CPU with lots of RAM. It also covers the quantized files, and how vLLM, SGLang, llama.cpp and DeepSeek's own serving system run them.