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 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 () are “I”, “visit”, “New” and “York”. The bigrams () are “I visit”, “visit New” and “New York”. The trigrams () 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.
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.
Here is the token at position , 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 from a collection of texts.
Suppose “visit New” occurs 100 times in our training data and “York” follows it 80 times. We get . 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.
| Notebook | Counterpart in the model |
|---|---|
| Method of finding a page | A function computing an index from tokens |
| Page number | An integer index into a table |
| Writing on the page | A vector of learned numbers: an embedding |
| Reading the note in a particular situation | Transforming and combining the vector with the model state |
| Less legible writing | Representation 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 in two lines. The current input token contributes to the state from which the network will predict .
The hash function takes the most recent token IDs and does ordinary integer arithmetic. Taking the remainder after division by the number of rows gives row number , and that’s where we read vector from table . There’s no search for the meaning of the sentence in that calculation. Try token IDs 17 and 42, a hash , and a table with rows. We get . The remainder 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.
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 . The layer state gets a contribution from memory, and the gate turns that contribution up or down. The 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.
- 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.
- Both the writing and the reader can lose accuracy. Quantizing the table rounds the numbers in . 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.
- 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 , chooses a handful of experts , and adds their outputs using the weights . Shazeer and colleagues describe this kind of conditional computation in their sparsely gated MoE paper.
Here quantization can change which path the token takes. Nudge 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
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 parameters in memory (about 21%) and Engram-40B had (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 parameters stored at bits each, while the remaining parameters get bits each. Ignoring a little metadata, the notebook’s fraction of the file size is
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.
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.
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.
| Resource | What can live there | What determines whether it makes sense |
|---|---|---|
| VRAM + GPU | Constantly used components, activations, attention cache, frequently needed experts | Available capacity, fast reads and efficient computation |
| RAM + CPU | Other resident experts, buffers, possibly part of the cache | RAM bandwidth, CPU performance and cooperation with the GPU |
| SSD | Large lookup tables and possibly infrequently loaded weights | Number 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.
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
Here is the fixed delay for a trip to storage, is the number of trips we couldn’t overlap, is the number of bytes, and 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 and . 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 -bit code has 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 , 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.
On an evenly spaced grid over , the distance between adjacent steps is
Rounding to the nearest step misses by at most for values inside the range. In the textbook approximation the error is distributed uniformly from to . Its mean is zero. Its variance, the average squared distance from that mean, is
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 . 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 . Suddenly the answer is off by 0.40. What a weight error does depends on the activations it meets.
For a whole linear layer , the matrix holds the weights and the vector holds the incoming activations. Replace the weights with and the output error obeys this bound.
The symbol is the ordinary length of the vector. Square each coordinate, add the squares and take the square root. The operator norm 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 . 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.
- Post-training quantization (PTQ). Start with a model already trained at 16 or eight bits and compress it using a small calibration sample.
- Quantization-aware training (QAT) or a natively low-bit architecture. The network learns during training how to work with the limited grid of weights.
- 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
Q2is 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 , hence 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
of information, exactly as much as six independent binary switches (). Likewise, a billion one-bit parameters and half a billion two-bit parameters have the same raw bit budget. There are 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 control of . Give a single two-bit number control of . Four configurations each. Set the first system to return for every pair of inputs. What would you set to in the second? You need in front of and in front of , both at once.
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,
where the first shrinks as the parameter count grows and the second rises as we take bits away. At a fixed product , 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 bits, which works out to
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.
| Variant | bpw | Files, GB | AIME25 | GPQA-Diamond | LiveCodeBench v6 |
|---|---|---|---|---|---|
| BF16 | 16.00 | 354 | 100.00 | 91.92 | 87.43 |
| Q2_0 | 2.40 | 66.4 | 96.67 | 89.39 | 81.14 |
| IQ2_XS | 2.50 | 68.0 | 96.67 | 87.37 | 83.43 |
| IQ3_XXS | 3.00 | 75.8 | 100.00 | 91.41 | 86.29 |
| IQ3_S | 3.50 | 83.6 | 100.00 | 92.93 | 86.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.
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 , the raw scores assigned to candidate tokens before we turn them into probabilities. Suppose the winning token beats the runner-up by , and each logit changes by at most . If we always pick the highest-scoring token, the winner is safe whenever
The proof fits in one sentence. The leader can fall by at most and the runner-up can gain at most , so the gap can shrink by at most . 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 per step, the chance of finishing is . At it’s already . 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,
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.
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 table | Remaining weights at an ideal 1 bit |
|---|---|---|
| 1.2 TB of original 16-bit weights | 400 GB | 50 GB |
| 1.2 trillion parameters | 800 GB | 100 GB |
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 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
The slower branch sets the pace, plus whatever synchronization and read time 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 () and value () vectors. Its size grows linearly with the number of tokens .
The factor of two counts and . counts full-attention layers, parallel conversations, KV heads, the dimension of a head and 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.
| Location | Component | Budget |
|---|---|---|
| SSD | Complete weight files: 40 + 80 GiB | 120 GiB |
| VRAM | Frequently used weights and selected experts | 14 GiB |
| VRAM | KV cache for 32,768 tokens | 4 GiB |
| VRAM | Activations, workspace and engine overhead | 3 GiB |
| VRAM | Free headroom | 3 GiB |
| RAM | Remaining computation weights | 26 GiB |
| RAM | Budget for cached table pages | 12 GiB |
| RAM | CPU workspace, transfer buffers and process overhead | 6 GiB |
| RAM | Operating system and other applications | 8 GiB |
| RAM | Free headroom | 12 GiB |
Every GiB has a home. On the GPU, . In RAM, , 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 memory | Contents | When it is created |
|---|---|---|
| Learned n-gram table | Parameters belonging to the model | During training |
| KV cache | Representations of processed context | During inference |
| Project memory | Text describing requirements, decisions and work state | During 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.
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 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 , subject to a quality threshold and a hardware budget that covers the whole running process.
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
- Jurafsky and Martin, N-gram Language Models explain classical language models and smoothing.
- Cheng et al., Conditional Memory via Scalable Lookup (2026) describe Engram and the budget split between memory and computation.
- Shazeer et al., Outrageously Large Neural Networks (2017) introduce conditional computation in sparsely gated MoE layers.
- Frantar et al., GPTQ (2022) and Lin et al., AWQ (2023) study calibrated post-training quantization.
- Tseng et al., QuIP# (2024) study high-quality quantization at very low bit counts.
- Ma et al., The Era of 1-bit LLMs (2024) and the BitNet b1.58 2B4T Technical Report (2025) describe models trained for ternary weights from the outset.
- Dettmers and Zettlemoyer, The case for 4-bit precision (2022) examine the tradeoff between parameter count and bit count.
- GSQ (2026) and Model Compression with Exact Budget Constraints via Riemannian Manifolds (2026) describe methods behind the low-bit packages compared above.
- Han et al., N-Gram Memories at Two Bits (2026) study compression of the lookup table itself in this preprint.
- Alizadeh et al., LLM in a flash (2023/2024) design inference around the characteristics of flash memory.
- Leviathan et al., Fast Inference from Transformers via Speculative Decoding (2023) accelerate generation by verifying proposed tokens together.
- Liu et al., Lost in the Middle (2023/2024) and Lewis et al., Retrieval-Augmented Generation (2020) cover practical limits of long contexts and retrieval of external information.
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.