Inkling 2 Mini advertises a 1,000,000-token context window, and the number is real. But the weight file is a one-time cost; the context cache is a per-token cost that grows as the session grows. Understanding that second cost — and why it explodes at the top of the range — is the difference between a model that fits your hardware and one that out-of-memory-errors the moment you paste a long document. This post is about runtime memory, not the quantized weights covered in the quant ladder.
The headline: at the full 1M context, Inkling 2 Mini’s cache and buffers add up to roughly 138GB — on top of the weights. That is server-class memory, not a consumer GPU.
What the sliding window means for your prompts
The local/global split is not just a memory detail; it changes how the model uses a long context. Because five-sixths of the layers only attend within a 1,024-token window, tokens that are far apart in the prompt are only related to each other through the sixth of the layers that are global. For most tasks — reading a document, holding a conversation, working through a codebase section by section — that local structure is enough, because the relevant context is usually nearby.
But it means the model is not uniformly “seeing” your whole million-token prompt with full attention at every layer. Very long-range reasoning that requires connecting the start of a document to the end through a single attention head relies on the global layers doing more work. In practice this is the design tradeoff that makes 1M context affordable at all: you accept that long-range attention is sparser in exchange for a cache that does not explode. For the full architecture behind this — the 128 experts, the loop, the layer layout — the benchmarks post has the vendor’s model card details, and the multimodal vision post covers how image tokens enter the same context.
This is also worth knowing when you are deciding how much context to actually pay for. Filling a window you do not need is pure waste — memory and prefill time for tokens the local layers will ignore anyway. Staying near the size of your real working set is both cheaper and faster.
Why the cache grows slowly at first
Inkling 2 Mini’s attention is deliberately asymmetric, and that asymmetry is what keeps memory manageable for most of the range. The model has 24 layers. Five out of every six layers use a local attention window of 1,024 tokens — they only attend to the previous thousand tokens, so their key-value cache stops growing once you pass about a thousand tokens. Only every sixth layer is a global attention layer that sees the entire context, and only those layers keep accumulating cache as the conversation lengthens.
The practical effect: five-sixths of the model’s attention cache is capped at roughly 0.25GB total, regardless of whether your context is 8K or 1M. The remaining one-sixth — the global layers — cache about 32KB per token per layer, and that is the part that scales. So the cache does grow with context, but it grows on a leash held by the sliding-window design.
This is a large part of why Inkling 2 Mini can even advertise a million tokens. A model where every layer kept a full-context cache would need far more memory to reach the same window.
The compute buffer: the other per-token cost
Cache is not the only thing that grows. llama.cpp also allocates a compute buffer that scales with context and batch size. At the default -ub 512, that buffer runs about 96KB per token. Unlike the cache, the compute buffer is transient — it is scratch space used during the forward pass, not state kept between tokens — but it still has to fit in memory, and at long context it becomes one of the largest line items.
The mitigation is -ub 256, which roughly halves the compute buffer by processing fewer tokens per micro-batch. The tradeoff is prefill speed, since smaller batches make less use of the GPU. Alongside lowering -c, it is one of the two standard fixes when a load fails for out-of-memory reasons — both are covered in the local setup guide.
The overhead table, 8K to 1M
The table below shows the estimated memory for the context cache alone and for the total overhead including the compute buffer, at several context lengths. These are the numbers that determine whether a given context fits alongside your weights.
| Context | Cache (approx) | Total overhead (approx) |
|---|---|---|
| 8K | 0.5GB | 1.3GB |
| 32K | 1.3GB | 4.5GB |
| 128K | 4.5GB | 17GB |
| 256K | 8.8GB | 35GB |
| 1M | 35GB | 138GB |
Read the shape of that table. From 8K to 128K the total overhead goes from 1.3GB to 17GB — a thirteenfold context increase for a thirteenfold memory increase, which is the global layers scaling linearly as expected. The cache portion is modest because the sliding-window layers stay capped.
Then look at 256K and 1M. Cache goes from 4.5GB at 128K to 8.8GB at 256K to 35GB at 1M — still roughly linear. But total overhead goes from 17GB to 35GB to 138GB, because the compute buffer at long context is not a fixed add-on; it scales too, and at the top of the range it dominates. At 1M the compute buffer is the reason the number is 138GB rather than the 35GB the cache alone would suggest.
The 7.5K rule of thumb
There is a useful conversion hiding in these numbers: every gigabyte of memory you free up buys roughly 7,500 additional tokens of context. That follows from the linear scaling region — between 8K and 128K, adding context costs memory at a fairly steady rate, and inverting it gives you the tokens-per-GB figure.
The rule works in both directions and it is the fastest way to budget a card. Suppose you are running a 19.07GB AD-Q5_K build on a 24GB card. You have about 5GB free after weights. At 7.5K tokens per GB, that is roughly 37K tokens of headroom — which is why 24K context is the comfortable recommendation rather than the theoretical maximum. Deciding how much headroom you want to keep for safety, then reading off a context ceiling, is more reliable than picking a context number and hoping it fits.
Why 1M context needs server hardware
At 1M context, the roughly 138GB of total overhead sits on top of whatever you spent on weights. No consumer GPU has that much memory — a top-end RTX 5090 has 32GB. Serving the full window means either a multi-GPU node with high-memory cards or a datacenter accelerator, and it means paying that memory cost for the lifetime of the session.
This is also why hosted access is the realistic path to long context for most people. Our hosted pricing serves Inkling 2 Mini without you provisioning the memory, and the cost calculator prices a long-context workload before you commit. Self-hosting 1M context is genuinely possible — some operators run large-VRAM multi-GPU setups in the ~98GB class — but that is operator-reported territory and a serious infrastructure project, covered in the multi-GPU post.
Pairing weights with context
The weights and the overhead share one memory pool on a single GPU, so you have to budget both together. The pairing that falls out of the table:
- 16GB card, AD-IQ3_S (13.34GB weights) — about 2.6GB free, which supports roughly 8K context. This is exactly why 16GB is capped at 8K, and why you should never state that the model “runs on 16GB” without the context cap attached.
- 24GB card, AD-Q5_K (19.07GB weights) — about 5GB free, roughly 24K context comfortable.
- 32GB card, AD-Q6_K (23.79GB weights) — about 8GB free, roughly 48K context.
Past about 128K the overhead overtakes the weights as the binding constraint on consumer hardware, which is why the practical long-context ceiling for a single high-end card is 48K to 128K, not 1M.
How this differs from the quant question
It is easy to conflate the two memory costs, so it helps to separate them. The quant ladder answers “how big is the model in VRAM” — a fixed cost set by which GGUF you download. This post answers “how much extra does the context cost” — a variable cost set by how long your session runs. They interact in one important way: because both draw from the same memory pool on a single GPU, the quant you pick determines your context ceiling. A smaller quant frees memory for context; a larger one spends it on quality. There is no setting that gives you both a top-quality build and a long context on the same card. If you need AD-Q6_K quality and 128K context, you are on multi-GPU hardware. That is the core budgeting tension, and the honest way through it is to decide your context requirement first, then pick the largest quant that fits in what remains.
For multimodal use there is a third, smaller cost: the vision projector. Inkling 2 Mini accepts image input, and the mmproj file is about 0.35GB at Q8_0 — minor next to the cache at any real context, but not zero. The multimodal vision post covers how it fits.
The time cost of long context
Memory is only half the story; the other half is how long it takes to fill the context. Ingesting a long prompt — prefill — is compute-bound and gets slower as the prompt grows, while generating each new token afterward — decode — stays comparatively fast. Kingy’s Mac M4 Pro testing made this vivid: a 16K run took 290.1 seconds to first token and 292.1 seconds total, meaning almost the entire wall-clock time was prefill. A widely shared DGX Spark observation found the same split at the extreme — decode held at 18.4 tok/s near 950K tokens, but the first token waited a long time. Long context is a prefill problem, not a decode problem, as the local speed post covers in full.
So a 1M context is not something you wave at a problem. Filling it takes minutes even on strong hardware, and for most workloads staying under 128K — where total overhead is about 17GB — is the pragmatic choice.
Serving long context on rented hardware
Because the top of the range is out of reach for consumer cards, the practical way to run a genuinely long context is to rent a large-memory machine for the session. This is where the self-hosting guides fit. A single high-VRAM card or a multi-GPU pod lets you set a large -c without worrying that the cache will evict your weights, since the whole machine is yours for the run.
The tradeoff is that you are paying for idle memory between requests. Hosted access spreads that cost across many users, which is why a metered API is usually cheaper for occasional long-context work and self-hosting wins at sustained high volume. The local versus API economics post works through the crossover, and the 3090 monthly cost post prices the single-card case. For the very largest setups — the ~98GB class where operators report 300+ tok/s — the multi-GPU post covers the configuration, though those throughput figures are operator-reported rather than independently verified.
One practical note if you go the rental route: measure before you commit. Memory scaling is linear enough that the table above predicts it well, but prefill time is not, and a 256K request that fits comfortably can still take many minutes to first token on hardware you did not benchmark. Run a small probe at your target context before betting a long job on it. The Kaggle and RunPod guides are good low-commitment places to test.
Streaming and long sessions
Everything above assumes a single context that grows and then resets. Real usage is messier, and a few practical points follow from the memory model.
First, memory is not returned the moment a response ends. The KV cache for the tokens you processed stays allocated as long as the slot is live, so a long session holds its peak memory until you reset or the server evicts it. llama.cpp’s server manages slots, and the practical consequence is that a session’s memory high-water mark is set by the longest context you fed it, not the average.
Second, because the cache grows in the linear region up to about 128K, the cost of “a bit more context” is predictable in a way that prefill time is not. You can budget memory confidently; you cannot budget wall-clock the same way, because prefill is super-linear in practice once you leave the comfortable range. Kingy’s coding run timing out at 240 seconds on a Mac is the cautionary example — the memory was fine, the time was not.
Third, if your workload is many independent short requests rather than one long one, context memory is almost irrelevant and you should optimize for decode throughput instead. A chatbot with short turns, a classification pipeline, or a code-completion service all live in the 8K row of the table — about 1.3GB — where the context cost is negligible and the quant ladder choice dominates. The 1M window is a specialized capability, not the default operating point, and paying for it when you do not need it is the most common self-hosting mistake.
The honest summary: Inkling 2 Mini’s context window is genuinely large and its sliding-window design keeps the memory cost manageable through most of the range you will actually use. The top of the range is real but expensive in both memory and time, and for nearly all workloads the 8K-to-128K band is where the model is both affordable and fast. Match the window to your working set rather than to the headline number, and the memory question mostly takes care of itself.
Practical checklist
Before you set -c to a large number:
- Start from your quant’s size (the quant ladder has the table).
- Subtract your overhead using the table above for your target context.
- If it does not fit, lower
-cfirst. - If it still does not fit, add
-ub 256to halve the compute buffer. - Remember every 1GB freed buys about 7,500 more tokens.
For a concrete long-context run on rented hardware, the Kaggle, RunPod, and Vast.ai guides cover picking a high-VRAM card for a single session.
- Cache and compute buffer are separate costs from the weights.
- Five-sixths of layers use a 1,024-token sliding window — cache caps at ~0.25GB.
- Global layers cache 32KB/token and grow linearly to 1M.
- Compute buffer ~96KB/token at
-ub 512;-ub 256roughly halves it. - 1M context ≈ 138GB overhead — server hardware only.
Further reading
- Thinking Machines’ Inkling 2 Mini model card — the 1M context figure and the local/global attention split.
- AtomicChat’s local-run guide — the
-uband-cflags and the memory measurements. - Kingy.ai’s Inkling 2 Mini write-up — the M4 Pro long-context timing.
- Artificial Analysis on Inkling 2 Mini — independent testing of the hosted model.
- The Hacker News discussion — community long-context reports.