1. Why a large model need not live entirely on the graphics card

What I enjoy most about running language models locally is working out where they really need the GPU to do some heavy lifting and where they just need somebody to fetch the right data. I tried using different precisions for the compute weights and the separate n-gram table. That got me tracing the division of labor from a window a few tokens wide all the way to the memory budget for my workstation.

A language model can take up hundreds of gigabytes on disk and use only a fraction of its parameters to generate a token. How does something that big run on a home workstation? I start with three questions. Which parts have to do arithmetic for every token, which parts do I just have to read, and which can I leave alone most of the time?

That changes how I look at the hardware. A graphics processing unit (GPU) is very good at doing dense matrix arithmetic in parallel. Its fast, expensive video memory (VRAM) need only hold the data that benefits from being there. The computer’s ordinary working memory (RAM) can hold less frequently used experts that run on the general-purpose processor (CPU). A solid-state drive (SSD) can store an enormous table of associations that we need only a few slices of at each step. Each of those places offers a different capacity, bandwidth and time to first access.

Projects such as Strata and Xolotl, which takes that idea further, organize inference, the business of running an already trained model, around the whole computer. How fast it goes depends on the network, the engine and the hardware working together. Let’s look at how they divide the work.

If a substantial part of a model behaves like an enormous notebook that I occasionally open for a hint, there’s an experiment I’d like to try. Keep the notebook legible on cheap disk and squeeze the weights that have to work in scarce VRAM a little harder. The cost of another bit depends on where it lives and how often I move it. Six things tend to blur together in discussions of this setup. Let’s take them in turn, starting with the n-gram and the embedding, then the expert, quantization, context and project memory.

2. N-grams and the big notebook

Start with the window. An n-gram is a sequence of nn adjacent elements, which might be characters, words or tokens. A token is one of the pieces a tokenizer cuts the input into. It might be a whole word, a syllable, an ending or a punctuation mark.

To keep the window easy to see, let’s split a short sentence into ordinary words.

“I visit New York.”

The unigrams (n=1n=1) are “I”, “visit”, “New” and “York”. The bigrams (n=2n=2) are “I visit”, “visit New” and “New York”. The trigrams (n=3n=3) are “I visit New” and “visit New York”. A real tokenizer might draw its boundaries elsewhere. The window still slides one position at a time.

Each outline encloses one n-gram: one word, two adjacent words or three adjacent words. Enlarge illustration ↗
01. Read the outlines, not entire rows: the top row contains four separate unigrams. The middle rows move a two-word window one position to the right. The bottom row shows a three-word window. Click an illustration to open it at full size.

A classical n-gram language model estimates the probability of the next word from just the tail end of the history. For a trigram the approximation looks like this.

P(xt∣x1,…,xt−1)≈P(xt∣xt−2,xt−1).P(x_t \mid x_1,\ldots,x_{t-1}) \approx P(x_t \mid x_{t-2},x_{t-1}).

Here xtx_t is the token at position tt, and the vertical bar | means “given that we know”. On the left we know the whole conversation so far. On the right we act as if only the previous two tokens mattered. The simplest estimate uses counts CC from a collection of texts.

P^(c∣a,b)=C(a,b,c)C(a,b).\widehat P(c \mid a,b)=\frac{C(a,b,c)}{C(a,b)}.

Suppose “visit New” occurs 100 times in our training data and “York” follows it 80 times. We get 80/100=0.880/100 = 0.8. The awkward case is a combination that never appeared in the data. Straight counting assigns it probability zero. Jurafsky and Martin explain how smoothing helps with that problem in their chapter on n-gram language models.

A modern n-gram memory module uses that short token sequence as an address. What it retrieves at that address is a learned vector of features. That’s quite a different job from counting words to estimate the probability of “York”.

In the notebook, what is the address and what is the page?

I find the notebook analogy handy for separating remembering from calculating. Deep layers could spend matrix multiplication after matrix multiplication reconstructing a familiar local association. Giving the model an index lets it look up something it has already learned about that little pattern.

NotebookCounterpart in the model
Method of finding a pageA function computing an index from tokens
Page numberAn integer index into a table
Writing on the pageA vector of learned numbers: an embedding
Reading the note in a particular situationTransforming and combining the vector with the model state
Less legible writingRepresentation error introduced by quantization

A page won’t literally say “The capital of France is Paris.” A row holds thousands of floating-point numbers or integers whose meaning emerged during training alongside the rest of the network. You can’t put your finger on column 12 and call it “France”, then call column 13 “capital”. The information is spread across many coordinates.

Here’s a lookup at step tt in two lines. The current input token xtx_t contributes to the state from which the network will predict xt+1x_{t+1}.

it=H(xt−n+1,…,xt) mod V,et=E[it].i_t=H(x_{t-n+1},\ldots,x_t)\bmod V, \qquad e_t=E[i_t].

The hash function HH takes the most recent token IDs and does ordinary integer arithmetic. Taking the remainder after division by the number of rows VV gives row number iti_t, and that’s where we read vector ete_t from table EE. There’s no search for the meaning of the sentence in that calculation. Try token IDs 17 and 42, a hash H(a,b)=31a+bH(a,b)=31a+b, and a table with V=101V=101 rows. We get H(17,42)=569H(17,42)=569. The remainder 569 mod 101569\bmod 101 is 64. You can change the precision of every weight in the network and still get 64, provided the token IDs and hash function stay the same.

IDs 17 and 42 produce address 64. The vector from row 64 enters further computation together with context. Enlarge illustration ↗
02. Three lookup steps: token IDs, address computation and retrieval of numbers from the selected row. The side arrow leaves row 64 specifically. The retrieved vector is then combined with context; the hash function itself does not interpret sentence meaning.

Two quite different phrases can land on the same row after that division. That’s a hash collision. Real architectures can use several independent hashes, separate tables and context-dependent gates to cope. One example is Engram, Conditional Memory via Scalable Lookup. Its demonstration code makes it easy to see where the address calculation ends and the network starts to use the retrieved vector. Think of ht′=ht+gt⊙vth'_t=h_t+g_t\odot v_t. The layer state hth_t gets a contribution vtv_t from memory, and the gate gtg_t turns that contribution up or down. The ⊙\odot means multiplication element by element.

“It picked the wrong answer” can mean three different things

You sometimes hear that the full model reads “New York” in its notebook, a lightly compressed one reads “new york”, and an aggressively quantized one comes out with “New Orleans”. I can picture the final mistake. To work out how it happened, though, I’d separate three steps.

  1. The row address is deterministic. Give the models exactly the same input tokens and even the most compressed one computes the same page number. It hasn’t lost the bookmark.
  2. Both the writing and the reader can lose accuracy. Quantizing the table rounds the numbers in ete_t. Quantizing the rest of the network affects projections, gates and the eventual token probabilities. Imagine slightly blurry writing and a reader who has to squint. Nobody has taken scissors to an individual fact.
  3. The first different token changes what happens next. Once a rounding difference makes the model choose another word and add it to the conversation, the hash has a different input on the next step. Now the model really can open a different page.

The order matters. A change in the computation can produce a different token, which changes the context, which changes subsequent lookups. For the same reason, if a heavily compressed model struggles with a piece of niche knowledge, you can’t point to the row from which a historical date evaporated. Retrieving that date depends on relationships spread across layers.

3. MoE experts and the idea of giving a third of the model to the notebook

Another way large models use their capacity is a Mixture of Experts (MoE). An “expert” sounds like a little model someone has given a badge saying “geography”, “tax law” or “C++”. In practice it’s one of several parallel subnetworks. Training determines which patterns of activation tend to go to each one.

A small network called the router sits in front of the experts. It looks at the input state hh, chooses a handful of experts S(h)S(h), and adds their outputs fj(h)f_j(h) using the weights pj(h)p_j(h). Shazeer and colleagues describe this kind of conditional computation in their sparsely gated MoE paper.

y=∑j∈S(h)pj(h) fj(h).y=\sum_{j\in S(h)}p_j(h)\,f_j(h).
The router selects experts E2 and E5 out of six. Their outputs are combined with illustrative weights of 0.6 and 0.4. Enlarge illustration ↗
03. Only the highlighted experts compute on input h in this example. Gray subnetworks still occupy memory but do not compute in this step. The expert counts and coefficients are illustrative, not Qwen configuration values.

Here quantization can change which path the token takes. Nudge hh or the router’s weights a little, and scores of 0.501 and 0.499 might swap places. A different expert gets the job. At 0.9 against 0.1 it takes a much bigger nudge. The average weight error tells only part of the story. How close was the call at each fork?

MoE lets us distinguish parameters present in the file from parameters active for one token. An expert sitting idle this millisecond might be just the one we want three words later or for another task. Both n-gram memory and MoE add capacity without making every step proportionally more expensive. One fetches a learned vector, the other selects a few subnetworks to do arithmetic. There’s a catch if you’re eyeing a dense model you already own. Its architecture has to learn to use an n-gram table during training. Slicing a third of the weights off onto an SSD won’t turn matrix multiplication into a sparse dictionary lookup.

In practice — catch the first different token

If two quantizations give different answers, stop at the first step where they produced different tokens. Both have seen the same context up to that point. Compare the computed row address, the vector each retrieved and the experts each router chose.

Must one third of the model be a notebook?

A similar fraction turns up in a few well-known models, and suddenly a third starts to sound like a law of LLM physics. Before buying that, I’d check the denominator.

The Qwen3.8-Flash-Next model card lists 125B language-model parameters, plus 51B n-gram embedding parameters and 4B for multi-token prediction (MTP). B stands for billion parameters. MTP proposes future tokens for speculative decoding and has its own parameters separate from the table. Leave MTP out and the table’s share is

51125+51≈29%.\frac{51}{125+51}\approx29\%.

That is in the neighborhood of a third. Notice that the 51B is in addition to the 125B. Now open section 3 and table 1 of the Engram paper. The optimum in those experiments was around 20–25% of the sparse parameter budget. That’s a different denominator again. Measured against the whole model, Engram-27B had 5.7/26.7B5.7/26.7\text{B} parameters in memory (about 21%) and Engram-40B had 18.5/39.5B18.5/39.5\text{B} (about 47%). Where to put the next parameter depends on how much the task gains from remembering local patterns or from conditional computation, on the training data and objective, and on the hardware budget.

Parameters and bytes tell two different stories

Try counting disk space once the parts have different precisions. Say the table contains NmN_m parameters stored at bmb_m bits each, while the remaining NcN_c parameters get bcb_c bits each. Ignoring a little metadata, the notebook’s fraction of the file size is

fm=NmbmNmbm+Ncbc.f_m=\frac{N_m b_m}{N_m b_m+N_c b_c}.

Take a 1-to-2 split by parameter count. Keep the table at 16 bits and squeeze the compute weights down to an idealized one bit each.

fm=1616+2≈88.9%.f_m=\frac{16}{16+2}\approx88.9\%.

The same notebook now accounts for a third of the parameters and nearly nine tenths of all the bytes on disk. The size of the download alone tells you remarkably little about how much VRAM your card needs or how quickly the model will write an answer.

The table accounts for 33.3 percent of parameters but 88.9 percent of bytes at 16 table bits and one backbone bit. Enlarge illustration ↗
04. The top bar counts parameters; the bottom bar counts bytes. Colors identify the same model components. No parameters were added to the table: its byte share grew because each backbone parameter now uses one sixteenth of the table parameter’s storage. This is a hypothetical 1:2 split without overhead.

4. A desk, a bookshelf and a storeroom for VRAM, RAM and SSD

I picture myself at a desk (VRAM), with a shelf within arm’s reach (RAM) and a much larger storeroom downstairs (SSD). A cache keeps the things I reach for all the time close by. In a computer the distance is only part of the price. There’s also the width of the bus, how many requests can run in parallel, and what it costs to hand data from one device to another.

ResourceWhat can live thereWhat determines whether it makes sense
VRAM + GPUConstantly used components, activations, attention cache, frequently needed expertsAvailable capacity, fast reads and efficient computation
RAM + CPUOther resident experts, buffers, possibly part of the cacheRAM bandwidth, CPU performance and cooperation with the GPU
SSDLarge lookup tables and possibly infrequently loaded weightsNumber and size of reads, locality and opportunities to prefetch

The Strata engine documentation describes just such a division. The GPU holds the shared layers and caches frequently used experts. The CPU runs other experts on weights held in RAM. The SSD supplies n-gram rows. Think about what crosses PCIe here. With simple weight offloading, entire matrices might travel from RAM to the graphics card at every step. A CPU expert in this setup leaves its matrix where it is and sends back a small vector with the result. The authors of LLM in a flash also designed inference around what flash storage does well. An SSD is many times slower than VRAM, yet sparse, well-organized reads can be manageable.

SSD supplies selected table rows. The CPU computes RAM-resident experts and transfers outputs. The GPU uses these data alongside VRAM-resident weights. Enlarge illustration ↗
05. The arrows show data supplied to further GPU computation: small table reads and outputs of CPU-computed experts. In this plan those experts’ matrices stay in RAM. Input transfers to the CPU, intermediate buffers and synchronization are omitted for clarity; other engines may transfer entire weights to the GPU.

Why 10 KiB and 20 KiB can feel alike in decode and very different in prefill

If we fetch just a handful of rows per token, doubling the table precision can make surprisingly little difference to how fast the answer appears. Which part of the I/O takes the time?

Suppose we need four rows of 2,560 numbers. At eight bits each that’s 10,240 bytes (10 KiB). At 16 bits it’s 20 KiB. A useful first estimate for the reads is

TI/O≈qL+DBeff.T_{\mathrm{I/O}}\approx qL+\frac{D}{B_{\mathrm{eff}}}.

Here LL is the fixed delay for a trip to storage, qq is the number of trips we couldn’t overlap, DD is the number of bytes, and BeffB_{\mathrm{eff}} is the bandwidth we actually get. Dividing a few kilobytes by the “7 GB/s” printed on an NVMe box misses the first term altogether. Try L=80 μsL=80\ \mu\text{s} and Beff=2 GB/sB_{\mathrm{eff}}=2\ \text{GB/s}. One 10 KiB read takes about 85 µs and 20 KiB takes about 90 µs. If a compute step takes 20 ms, both can disappear into the background.

That picture changes on a miss in the operating system’s page cache, which fetches blocks rather than the precise length of our vector. It changes again when we go from decode, writing the answer one token at a time, to prefill, processing a whole prompt. At 100,000 input tokens, 20 KiB per position adds up to about 2 GB of logical reads before accounting for repeated rows and caching in RAM. A table twice the size is also harder to cache. Higher table precision can be nearly free in decode for as long as those reads stay off the critical path.

In practice — try the first read and the second

Time a fresh prompt after startup, when the file pages are cold. Then repeat the query while its pages are still in RAM. Write down time to first token (TTFT) and the rate at which the rest of the answer appears separately.

5. What do we lose when we take bits away? Counting the pigeonholes

A neural-network weight is a number that steers a calculation. Quantization narrows the list of values available to represent it. A bb-bit code has 2b2^b states. One bit gives us two, two bits give us four, four give us 16, and eight give us 256. Fortunately a 100-billion-parameter model needn’t share one global list of 16 numbers. Quantization formats can store a scale for each small group of weights, offsets, exceptions or codebooks. The same code 10 in two neighboring blocks can unpack to different numbers.

Take a weight of 0.46. Imagine two bits encode four equally spaced values over [−1,1][-1,1], namely −1, −1/3, +1/3 and +1. The closest is 1/3 ≈ 0.333. We store its code and accept an absolute error of about 0.127. With four bits we get 16 steps. The closest is 7/15 ≈ 0.467, so the error drops to about 0.007.

The weight 0.46 is stored as the two-bit code 10, assigned to the closest available value: one third. Reading it back introduces an error of about 0.127. A table compares 1, 2 and 4 bits. Enlarge illustration ↗
06. Read from the top: we want to store 0.46, but two bits provide only four codes. In this example, they represent four equally spaced numbers from −1 to +1. The highlighted code 10 represents one third, the closest available value to 0.46. Reading it back therefore returns an approximation of the original. The lower table compares the error for the same weight at 1, 2 and 4 bits. The number assignment is illustrative; real IQ formats have a more complex design.

On an evenly spaced grid over [−a,a][-a,a], the distance between adjacent steps is

Δ=2a2b−1.\Delta=\frac{2a}{2^b-1}.

Rounding to the nearest step misses by at most Δ/2\Delta/2 for values inside the range. In the textbook approximation the error is distributed uniformly from −Δ/2-\Delta/2 to +Δ/2+\Delta/2. Its mean is zero. Its variance, the average squared distance from that mean, is

Var⁡(ε)=Δ212.\operatorname{Var}(\varepsilon)=\frac{\Delta^2}{12}.

While the grid has plenty of levels, an extra bit roughly halves the spacing and cuts the noise variance by a factor of four. Down at one or two bits, the details this tidy formula leaves out start to matter a great deal. There may be outliers, values clipped at the ends, and errors that line up across many weights.

An error in one number versus an error in a calculation

Try a dot product with two weights and two inputs. We get 0.46⋅2−0.20⋅1=0.720.46\cdot2-0.20\cdot1=0.72. Round the weights to 0.50 and −0.25 and the result is 0.75, off by just 0.03. Now give exactly the same rounded weights the input (10,0)(10,0). Suddenly the answer is off by 0.40. What a weight error does depends on the activations it meets.

For a whole linear layer y=Wxy=Wx, the matrix WW holds the weights and the vector xx holds the incoming activations. Replace the weights with W^=W+ΔW\widehat W=W+\Delta W and the output error obeys this bound.

y^−y=ΔWx,∥y^−y∥2≤∥ΔW∥2∥x∥2.\widehat y-y=\Delta W x, \qquad \|\widehat y-y\|_2\leq\|\Delta W\|_2\|x\|_2.

The symbol ∥x∥2\|x\|_2 is the ordinary length of the vector. Square each coordinate, add the squares and take the square root. The operator norm ∥ΔW∥2\|\Delta W\|_2 is the largest factor by which the error matrix can stretch an input vector. Two matrices with similar average errors can line up quite differently with the directions of the largest activations xx. That’s why there’s more to quantization than rounding every number in isolation. GPTQ minimizes the error in reconstructing a layer’s output. AWQ protects weights that meet strong activations, limiting the distortion that carries into later layers.

What does “one bit” mean in PTQ, QAT and BitNet b1.58?

When someone writes about a “one-bit model”, I first check which experiment they mean.

  1. Post-training quantization (PTQ). Start with a model already trained at 16 or eight bits and compress it using a small calibration sample.
  2. Quantization-aware training (QAT) or a natively low-bit architecture. The network learns during training how to work with the limited grid of weights.
  3. Mixed precision. Different tensors get different bit counts. A tensor is an array of numbers, such as an attention matrix, router weights or embeddings. A filename like Q2 is a convenient label for the whole package.

Storage precision can also differ from arithmetic precision. An engine may unpack weights into a wider format before accumulating results. A smaller file buys speed only if the hardware and its kernels handle the encoding efficiently. BitNet b1.58 belongs in the second group. Its ternary weights take values {−1,0,+1}\{-1,0,+1\}, hence log⁡23≈1.585\log_2 3\approx1.585 bits of information per weight. Activations, scales and KV cache have their own wider formats. The BitNet b1.58 2B4T report describes a working two-billion-parameter model trained from scratch on four trillion tokens. Taking a large, finished model down to “Q1” after training is a different experiment. For PTQ, weight transformations and codebooks can make an enormous difference. See QuIP# and the earlier study of the tradeoff between parameter count and bit count, The case for 4-bit precision.

More simple parameters or fewer precise ones?

For a fixed amount of memory, we can buy a smaller number of precise weights or a larger number of coarse ones. Why might the bigger, more heavily compressed model win? Let’s count the pigeonholes first. A single number with 64 possible states carries

log⁡264=6 bits\log_2 64=6\ \text{bits}

of information, exactly as much as six independent binary switches (26=642^6=64). Likewise, a billion one-bit parameters and half a billion two-bit parameters have the same raw bit budget. There are 2109=45⋅1082^{10^9}=4^{5\cdot10^8} ways to set either one.

Does that give both systems the same choice of functions to compute? Here’s a tiny counterexample. Give two separate bits b1,b2∈{0,1}b_1,b_2\in\{0,1\} control of f(x1,x2)=b1x1+b2x2f(x_1,x_2)=b_1x_1+b_2x_2. Give a single two-bit number q∈{0,1,2,3}q\in\{0,1,2,3\} control of g(x1,x2)=q(x1+x2)g(x_1,x_2)=q(x_1+x_2). Four configurations each. Set the first system to return x1x_1 for every pair of inputs. What would you set qq to in the second? You need q=1q=1 in front of x1x_1 and q=0q=0 in front of x2x_2, both at once.

Two separate bits can keep x1 and zero x2. One shared two-bit multiplier cannot do both for arbitrary inputs. Enlarge illustration ↗
07. Both systems multiply the inputs and then add the results. The two-bit system controls each input independently. The shared-multiplier system demands two conflicting values of the same q. Four configurations in each system do not imply the same set of functions.

That’s the intuition behind large low-bit models. Wider layers, more independent features and more specialized MoE experts can buy more than polishing the tenth decimal place of each weight. Eventually the rounding noise starts breaking up the structure the model learned. As a sketch, we can split the loss into two terms,

L(N,b)≈Lcapacity(N)+Equant(N,b),\mathcal L(N,b)\approx \mathcal L_{\mathrm{capacity}}(N) +\mathcal E_{\mathrm{quant}}(N,b),

where the first shrinks as the parameter count NN grows and the second rises as we take bits bb away. At a fixed product NbNb, adding parameters helps until the quantization term takes over. A small dense model will often hit that wall sooner than a large MoE that leaves most of its experts idle on a given step.

Reading IQ2_XS, IQ3_XXS and bpw

Names like IQ2_XS and IQ3_XXS on GGUF files identify an encoding family and variant. How many bits does one weight actually cost? Just adding a group scale shifts the average. A block of 32 four-bit weights with one shared 16-bit scale needs 32⋅4+16=14432\cdot4+16=144 bits, which works out to

beff=32⋅4+1632=4.5 bpw.b_{\mathrm{eff}}=\frac{32\cdot4+16}{32}=4.5\ \text{bpw}.

That’s why I look up the actual bpw (bits per weight) for the part I care about. In the packages below, the IQ2_XS variant averages 2.50 bpw for its Transformer backbone. Its separate n-gram table uses IQ4_NL at 4.5 bpw. The file label, the backbone average and the table precision give you three different numbers.

6. Benchmarks at two to three bits, the butterfly effect and the notebook’s own precision

When I hear that a compressed model “loses almost nothing”, my next question is on which task, and how did you measure it? A few good chat answers show that the model can solve a problem. A longer test tells me how often it gets there.

Take the measurements published by the authors of the GSQ-RCO quantizations of Qwen3.8-Flash-Next. All four compressed variants have the same n-gram table (IQ4_NL at 4.5 bpw). Its 28.8 GB is included in the release’s total file sizes. What changes between those four is the compression of the Transformer backbone.

VariantbpwFiles, GBAIME25GPQA-DiamondLiveCodeBench v6
BF1616.00354100.0091.9287.43
Q2_02.4066.496.6789.3981.14
IQ2_XS2.5068.096.6787.3783.43
IQ3_XXS3.0075.8100.0091.4186.29
IQ3_S3.5083.6100.0092.9386.86

AIME asks competition math questions. GPQA asks difficult science questions. LiveCodeBench asks the model to write code that passes automated tests. These are three different thermometers. There’s no single temperature called “intelligence” that all three measure.

Two charts compare file sizes and LiveCodeBench v6 scores for the same five variants. BF16 takes 354 GB and scores 87.43%; IQ3_XXS takes 75.8 GB and scores 86.29%. Enlarge illustration ↗
08. The two panels show storage in GB and the LiveCodeBench score. Variants appear in the same order and both axes start at zero. On phones, the panels are stacked vertically. The Q/IQ variants share the IQ4_NL table and differ in backbone quantization. The source is ISTA-DASLab’s measurements.

Going from 354 GB to 75.8 GB with IQ3_XXS makes the files 4.67 times smaller, a 78.6% saving, at a cost of just 1.14 percentage points on LiveCodeBench against BF16. At Q2_0 the gap is 6.29 points. That can mean quite a few extra fixes when you write code with it every day. On GPQA-Diamond, IQ3_S even edges above BF16, 92.93 to 91.92. Remember sampling noise and the finite set of questions before reading much into that difference. I’d also keep scores obtained under different test protocols out of the same comparison. The methods behind this allocation of bits to more and less sensitive tensors are described in GSQ and the paper on compression under an exact budget.

A butterfly effect without mysticism

How can a tiny change in precision derail a long task? Start with the logits ziz_i, the raw scores assigned to candidate tokens before we turn them into probabilities. Suppose the winning token beats the runner-up by m=z1−z2m=z_1-z_2, and each logit changes by at most ε\varepsilon. If we always pick the highest-scoring token, the winner is safe whenever

m>2ε.m>2\varepsilon.

The proof fits in one sentence. The leader can fall by at most ε\varepsilon and the runner-up can gain at most ε\varepsilon, so the gap can shrink by at most 2ε2\varepsilon. In a close race, or when we sample with temperature, a small perturbation can change the word we pick. That word then goes into the context and sets the course for the rest of the answer.

There’s also plain old compounding in a long agent run. Imagine 100 independent steps, all of which have to succeed. At p=0.99p=0.99 per step, the chance of finishing is 0.99100≈36.6%0.99^{100}\approx36.6\%. At p=0.995p=0.995 it’s already 60.6%60.6\%. A real agent’s steps depend on one another, and it can fix its own mistake after the compiler complains. Even so, the toy calculation helps explain why a small quality difference can hurt so much over a long session.

When is it worth keeping the notebook at Q8 or 16 bits?

When I ran a Q2 backbone with a Q8 n-gram table on my own machine, I didn’t notice a drop in generation speed. Seeing that combination work is what got me interested in the precision of the notebook itself. I’d still like to measure what it did for the answers in a longer, controlled benchmark. I didn’t run one at the time.

My working hypothesis is that it’s worth testing higher n-gram table precision separately from the precision of the other weights, especially if lookups are sparse and there’s plenty of room on the SSD.

On a tighter machine there are good reasons to shrink the table too. A smaller file can mean fewer physical reads, more hits in the RAM page cache and a quicker prefill. Version 3 of the N-Gram Memories at Two Bits preprint, dated October 21, 2026, takes that route. The authors reduced a DeepSeek table from 203 GB to 51 GB, reconstructing rows from short codes, local scales and a shared basis. They report less distortion of the output distribution than straightforward two-bit rounding. Their table lived on the GPU. I’d still want to know how that reconstruction cost compares with a read from a consumer SSD.

To keep a more accurate notebook, take it from a higher-precision copy of exactly the same checkpoint. The tokenizer, indexing, tensor shapes and weight revision all have to agree. BF16 and FP16 also divide their bits differently between range and precision. Converting a table that’s already Q4 to FP16 makes the file bigger without recovering the missing information. For a clean experiment I’d keep the Q2 backbone fixed and compare Q4, Q8 and the original 16-bit tables, then repeat for Q3 and Q4 backbones. First I’d measure the local difference between the distributions on identical prefixes using Kullback–Leibler divergence,

DKL(P∥Q)=∑vP(v)log⁡P(v)Q(v),D_{\mathrm{KL}}(P\|Q) =\sum_v P(v)\log\frac{P(v)}{Q(v)},

so each model sees the same history and we can isolate the error in a single step. Then I’d try tasks with outcomes I can check, including code, factual questions, Polish-language work and long agent instructions, with both cold and warm caches.

In practice — does a Q8 table improve the result?

Build both tables from the same base checkpoint. Keep the backbone weights and sampling parameters fixed. On a fixed set of tasks, count how many times each setup reaches a correct solution.

7. Budgeting the whole computer, from the 1.2 TB puzzle to my 262K context window

A 1.2 TB model or 1.2 trillion parameters?

It’s easy to slide from 1.2 trillion parameters (1.2T) to 1.2 terabytes of files (1.2 TB) in conversation. The conversion in decimal GB or TB, before adding scales and buffers, is just division by the eight bits in a byte.

M=Nb8.M=\frac{Nb}{8}.

Let’s work it out both ways.

  • The 16-bit files take up 1.2 TB. At two bytes each, that’s 600 billion parameters. Put a third in the table and you get 200B parameters (400 GB) there. The other 400B parameters go from 800 GB to 50 GB at an idealized one bit.
  • The model has 1.2 trillion parameters. It starts at 2.4 TB in 16-bit form. The table’s 400B parameters now take 800 GB. The other 800B compute parameters would take 100 GB at an ideal one bit.
Meaning of “1.2”16-bit tableRemaining weights at an ideal 1 bit
1.2 TB of original 16-bit weights400 GB50 GB
1.2 trillion parameters800 GB100 GB
Two unit conventions: 1.2 TB of 16-bit weights yields a 400 GB table and a 50 GB one-bit backbone; 1.2 trillion parameters yields 800 GB and 100 GB. Enlarge illustration ↗
09. Each arrow shows storage before and after changing precision. The table remains at 16 bits, so its size is unchanged; the backbone moves from 16 bits to an ideal one bit. Both examples assume one third of parameters in the table. These are storage calculations, not guarantees of retained quality.

So the familiar picture of “an 800 GB notebook on SSD and 100 GB of weights in RAM and VRAM” adds up for 1.2 trillion parameters. Starting with 1.2 TB of 16-bit weights gives the first row instead. A running engine also needs quantization scales, layers retained at higher precision and working buffers.

Does 20 GB of VRAM plus 80 GB of RAM behave like 100 GB of VRAM?

A hybrid like that can put a home workstation to good use. Adding capacities, though, tells us little about speed. Suppose a fraction hh of the active expert work hits the GPU cache and the CPU runs the rest from RAM in parallel. A first estimate for one stage is

Tstage≈Tshared+max⁡(TGPU(h),TCPU(1−h))+Tsync.T_{\mathrm{stage}}\approx T_{\mathrm{shared}} +\max(T_{\mathrm{GPU}}(h),T_{\mathrm{CPU}}(1-h)) +T_{\mathrm{sync}}.

The slower branch sets the pace, plus whatever synchronization and read time TsyncT_{\mathrm{sync}} we couldn’t hide. Say the hottest 20% of the expert weights handle 80% of the work and fit in VRAM. That can feel surprisingly quick. If the CPU branch takes longer, the fast GPU sits waiting. And those same 20 GB of VRAM must also hold shared layers, activations and context. Some engines add speculative decoding. A small, fast mechanism proposes several tokens and the large model checks them together. Done correctly, verification preserves the target distribution. It can speed up our Q2 model while preserving precisely the quality that Q2 already had.

My IQ3_XXS compromise, the KV cache and a complete budget

On my own machine, moving from Q4 to IQ3_XXS sped up generation and freed enough memory for the full 262K-token context. That mattered more in daily work than either a benchmark score or a token rate by itself. Going down again to IQ2_XS just left me with memory I wasn’t using on my tasks and a greater risk of mistakes in code. On a card with less VRAM, that same IQ2_XS might be the only way to get a long context running at all.

Quantizing the weights doesn’t automatically shrink the context memory, the KV cache. That’s the difference between “the model fits” and “the model fits with the context my task needs.” With conventional Transformer attention, the cache holds previously computed key (KK) and value (VV) vectors. Its size grows linearly with the number of tokens TT.

MKV=2LattnTSHKVd s,M_{\mathrm{KV}} =2L_{\mathrm{attn}}TSH_{\mathrm{KV}}d\,s,

The factor of two counts KK and VV. LattnL_{\mathrm{attn}} counts full-attention layers, SS parallel conversations, HKVH_{\mathrm{KV}} KV heads, dd the dimension of a head and ss the bytes per element. With 32 layers, one sequence, eight KV heads, dimension 128 and two bytes per element, that’s 128 KiB per token, or 16 GiB at 131,072 tokens. This example uses conventional attention. The hybrid Flash-Next has a different architecture. It’s just as easy to confuse writing speed with the wait for the answer to start. A 32,000-token prompt takes about 46 seconds at 700 input tokens/s and about 27 seconds at 1,200. A decode speed of 40 tokens/s tells you nothing about that wait. Quality, waiting time and hardware cost give us the three axes of a Pareto frontier.

Let’s put it all in one budget for a hypothetical model. Allow 40 GiB for compute weights and 80 GiB for the n-gram table, both including format overhead, and use the 128 KiB/token KV cache from above. The workstation has 24 GiB of VRAM and 64 GiB of RAM. The engine runs some experts on the CPU and maps the table from SSD with mmap.

LocationComponentBudget
SSDComplete weight files: 40 + 80 GiB120 GiB
VRAMFrequently used weights and selected experts14 GiB
VRAMKV cache for 32,768 tokens4 GiB
VRAMActivations, workspace and engine overhead3 GiB
VRAMFree headroom3 GiB
RAMRemaining computation weights26 GiB
RAMBudget for cached table pages12 GiB
RAMCPU workspace, transfer buffers and process overhead6 GiB
RAMOperating system and other applications8 GiB
RAMFree headroom12 GiB

Every GiB has a home. On the GPU, 14+4+3+3=24 GiB14+4+3+3=24\ \text{GiB}. In RAM, 26+12+6+8+12=64 GiB26+12+6+8+12=64\ \text{GiB}, assuming the engine doesn’t also require a RAM copy of the 14 GiB of weights on the GPU. On disk, 120 GiB is about 128.85 decimal GB. Now stretch the context from 32,768 tokens (4 GiB) to 131,072 (16 GiB). We need another 12 GiB and have only 3 GiB free on the GPU. We’ll have to lower the KV precision, move weights or change hardware. The same arithmetic needs some care with mmap. Mapping an 80 GiB file doesn’t immediately consume 80 GiB of physical RAM. During prefill the operating system fetches file pages, so I’d watch that 12 GiB page-cache allowance while the model is running.

8. Another notebook for the project, used cards with ECC and the cost of finishing the task

When I work with coding agents, a third thing enters the conversation under the same name. An n-gram table, a KV cache and a project memory file each remember something different.

Kind of memoryContentsWhen it is created
Learned n-gram tableParameters belonging to the modelDuring training
KV cacheRepresentations of processed contextDuring inference
Project memoryText describing requirements, decisions and work stateDuring human and agent work

For the third row, imagine stopping a stranger in the street. Even if you happen to stop a very good electronics engineer, one sentence about a protocol frame won’t tell them which assumptions went into your board. A language model likewise brings general patterns from training to a new session. Your local design decisions only enter the picture once you put them into its context.

A short file of architectural decisions and current work can do more here than adding another bit to the weights. Think of pruning a 1,000–1,500-line work log down to 300–500 lines of specifics, perhaps 4,000 well-chosen tokens. Calling the file PROJECT_MEMORY.txt doesn’t make anything remember it. A startup rule or an explicit instruction has to load the contents into the conversation. The model weights stay frozen.

An n-gram table holds trained parameters, KV cache holds processed-token representations, and project memory is text loaded into context. Enlarge illustration ↗
10. The same word names three different things. The top row belongs to the trained model. The middle row stores computations over the current context. The bottom row is an external file: it affects an answer only when a tool loads its contents.

Good context works like a valley in the landscape of possible solutions. It conditions the next-token distributions and narrows the search. Dumping half the disk into the window would be taking the idea a bit far. Lost in the Middle found that models struggled to retrieve facts buried in the middle of a long input. The same common sense applies to online documentation. Adding a wish to the prompt doesn’t turn the weights into a web browser. Fetching a fresh datasheet takes an external tool, for example as part of a retrieval-augmented generation system.

The other cost of cheap hardware, and what ECC counters can tell us

Once you can spread a large model across a whole computer, used server accelerators offering lots of memory for the money start to look tempting. An increase in worldwide chip production doesn’t guarantee falling prices if demand grows even faster. On an older card I’d look at low-bit format support, cooling, power draw and the health of the memory alongside the VRAM capacity.

An error-correcting code (ECC) adds redundant bits that let hardware detect errors and correct some of them. An “industrial” badge alone tells you little about which buffers have ECC coverage. Plain parity can detect an error without correcting it. Before buying a card or while testing one, I’d look at its nvidia-smi reports and page retirement. Which counter am I reading, over what period, and does it keep climbing under load? There’s no percentage bar here for the card’s remaining life. But a bargain stops looking cheap when silent memory errors ruin an agent session that took hours.

Optimize for the whole task

Different parts of the same model do different jobs. They can benefit from different precisions and different places to live. So what I choose is a configuration θ\theta that includes the model, notebook and backbone precisions, placement across VRAM, RAM and SSD, context length, and the way the agent loads project memory. I want to minimize time to a correct solution Ttask(θ)T_{\mathrm{task}}(\theta), subject to a quality threshold Qmin⁡Q_{\min} and a hardware budget Cmax⁡C_{\max} that covers the whole running process.

min⁡θ Ttask(θ)subject toQ(θ)≥Qmin⁡,C(θ)≤Cmax⁡.\min_{\theta}\ T_{\mathrm{task}}(\theta) \quad\text{subject to}\quad Q(\theta)\geq Q_{\min}, \quad C(\theta)\leq C_{\max}.

A pencil and a little arithmetic are enough to check the budget and spot where an appealing analogy breaks down. Low-bit weights and n-gram memory can bring a large model within reach of a home workstation. Whether the next improvement is another bit for the experts, a more legible notebook on the SSD, or half an hour spent putting PROJECT_MEMORY.txt in order is something I’d measure on the task I actually need to finish.

9. Papers and sources for further reading

The examples use the documentation for Qwen3.8-Flash-Next, the ISTA-DASLab quantizations, Strata and Xolotl. I’d compare the reported results with independent measurements on the tasks I run.