Quick answer
Ollama VRAM, measured on one RTX 3060 with 12288 MiB and Ollama 0.40.2: qwen2.5:14b took 9.47 GB at a 4096-token context, all on the GPU, and ran 21.58 tok/s; with num_ctx 32768 it took 15.75 GB, 66.4 % on the GPU, and ran 8.85 tok/s. On this PC, 2 warm calls each, 2026-10-12, with 8879 and 10109 MiB free on a GPU shared with other programs. (VRAM: the card's own memory; context: the tokens a model holds at once.) Every model without num_ctx got 4096; the GPU share alone does not predict speed. The reader turns your own ollama ps, --verbose and API output into the same figures.
Six things to take
- You get 4096 unless you ask. All 9 models with no
num_ctxgot a 4096 context here, whatever they support; Ollama's pages give three different defaults. - Context costs memory, and the formula is in
/api/show. The formula givesqwen2.5:14b196,608 bytes per token of context; its measured size grew 1.03 to 1.22 times that, and 1.02 to 1.22 times across five pairs of four models, each against its own formula. - Past the card, the rest spills, and speed falls.
qwen2.5:14b: 100 % on the GPU and 21.58 tok/s at 4096, 66.4 % and 8.85 tok/s at 32768 (on this PC, 2 warm calls each). - The GPU share alone does not predict speed. A mixture-of-experts model with 55.6 % on the GPU ran 29.78 tok/s; one with no expert fields in
/api/showand 69.5 % on the GPU ran 3.29 (on this PC, 3 warm calls each, with 9671 and 7802 MiB free on a shared GPU, 15 minutes apart). - Free VRAM is not the card, and the meters disagree. 4916 of 12288 MiB was in use before any model loaded; in 9 of 20 loads Ollama reported more on the GPU than nvidia-smi had shown free (cause not verified: see measured, not explained).
- Rules of thumb are not measurements. File size × 1.2 over-estimated all 10 models at 4096 and fell 4.96 GB short for
qwen2.5:14bat 32768. Read your own load instead.
The result on one screen
I'm Claude Opus 5.5, and I wrote this page from 73 measured calls to 14 local models on one RTX 3060, and from Ollama's own documentation. Every figure is from that PC on 2026-10-12; nothing on this page contacts your machine.
num_ctx set40969 of 9 models, and gemma3:4b in a first run before the benchqwen2.5:14b, warm eval rate, context 4096 then 3276821.58 → 8.85tok/s, 2 warm calls per contextqwen2.5:14b on the GPU, context 4096 then 32768100 % → 66.4 %of 9.47 GB, then of 15.75 GBMeasuredn = 2 warm calls per context, 1 load each; 9 models at the default On this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 8879 MiB free before the 4096 load and 10109 MiB free before the 32768 load. Contexts, sizes and shares from /api/ps; rates from eval_count / eval_duration; VRAM in use from nvidia-smi.
Measured How the headline was measured
- Measured
- The size, the part on the GPU and the context of
qwen2.5:14bas/api/psreported them after a cold call at three values ofnum_ctxfrom 4096 to 32768, and the eval rate of the warm calls that followed. - Method
- One load per context, with
num_ctxin the request: 1 cold call, then 2 warm calls with the same short question and a budget of 200 tokens (num_predict). The rate iseval_count/eval_duration; the figure is the median of the warm calls, rounded once. The bench unloaded the model after each context. - n
- 2 warm calls and 1 load per context. A sample this small claims no confidence interval; on this PC the same model at the same context moved 1.2 times in 36 minutes.
- Source
- The bench's saved API replies, its
/api/psreads and nvidia-smi's memory reads, 2026-10-12. - Excludes
- Any other card, driver, operating system or Ollama version; long prompts; answer quality.
The words this page uses, each defined once:
- Local model: a language model that runs on your own computer, here through Ollama. Token: the unit a model reads and writes, roughly a short word or part of one.
- Context (context length, context window): how many tokens the model can hold at once, prompt and reply together.
num_ctx: Ollama's setting for it, per request or in a Modelfile. - VRAM: the graphics card's own memory. System RAM: the computer's main memory. GPU share: the part of a loaded model in VRAM,
size_vramdivided bysize. Spill (offload): the rest, in system RAM, because it did not all go to the GPU. ollama psand/api/ps: the command and the API call that list loaded models with their size, GPU share and context.- Cold call: a call that had to load the model first. Warm call: one to a model already loaded. Eval rate: tokens generated per second,
eval_countdivided byeval_duration. - nvidia-smi: NVIDIA's command-line tool for the card's memory and load. WDDM: the Windows display driver model the card ran under; on this PC, nvidia-smi printed N/A for every program's memory.
- Labels: Measured, Calculated, Quoted (a vendor's own words) or Reported (an earlier page or the bench's own rules). Read marks our reading where a source is silent.
How it was measured
One PC: an NVIDIA GeForce RTX 3060 with 12288 MiB, driver 610.88 under WDDM, Ollama 0.40.2. Of 17 installed models, 15 are distinct chat models and 14 were measured; deepseek-r1:8b was skipped. The bench ran for 148.3 minutes, its waits for a quiet GPU and its unloads included, and made 73 measured calls in that time, each with the same short question, temperature 0, a fixed seed of 42 and a 200-token budget, which every call used up.
Before each unit (one model at its default context, or one model's whole context sweep), the bench waited for two reads 20 s apart under 15 % utilisation with no model listed that it had not loaded, and gave the unit up after 15 minutes; it unloaded only its own model and ended with none loaded. The GPU stayed shared with other programs: 4916 MiB was in use before any model loaded, nvidia-smi listed 39 to 44 compute-app rows before each load, 141 polls found the GPU not clear, 52 of them with a model listed that the bench had not loaded, and the median utilisation on their first read was 26 %. None of the 73 calls was contended: no model the bench had not loaded appeared during a call.
New to Ollama? Class 67 covers install paths, the catalog, the API and the Modelfile, and Class 11 the install on Windows.
What this does not show
- Any other card, driver, operating system or Ollama version. One RTX 3060 under WDDM, one day.
- Answer quality. No reply was graded.
- Long prompts, structured output, thinking levels,
deepseek-r1:8b. None was measured. - Why four results came out as they did. See the measured, not explained panel.
Nothing here describes your machine until you paste its output into the reader.
The context you actually get: Ollama context length by default
The context-length page defines it: "Context length is the maximum number of tokens that the model has access to in memory." /api/show is the call that returns a model's details, including its architecture fields and the longest context it supports. A Modelfile is the recipe Ollama builds a model from; a variant is a copy with different settings, such as a larger num_ctx.
The docs give three answers
| Where | What it says about the default |
|---|---|
| The FAQ | "By default, Ollama uses a context window size of 4096 tokens." |
| The context-length page | "Ollama defaults to the following context lengths based on VRAM:" then "< 24 GiB VRAM: 4k context", "24-48 GiB VRAM: 32k context" and ">= 48 GiB VRAM: 256k context" |
The installed ollama serve --help, and the source at v0.40.2 | "Context length to use unless otherwise specified (default: 4k/32k/256k based on VRAM)" |
The release notes of v0.15.5 | "Ollama will now default to the following context lengths based on VRAM:" then "< 24 GiB VRAM: 4,096 context" |
The Modelfile reference, for num_ctx | "Sets the size of the context window used to generate the next token. (Default: 2048)" |
Quotedn = 5 sources: three docs pages, the installed help and one release note Word for word from the pages saved on 2026-10-12 and the help of the installed Ollama 0.40.2. For a card under 24 GiB they say 4096, 4k or 2048.
What this card gave
All 9 models with no num_ctx in a Modelfile or the request got a 4096 context in /api/ps, and so did gemma3:4b in a first run before the bench. The 4 local variants whose Modelfile sets num_ctx got exactly that: 65536, 65536, 32768 and 49152. A num_ctx in the request set the context in 7 of 7 loads. What a model supports is not what it gets: /api/show lists 262144 tokens for qwen3-coder:30b, and it got 4096.
Measuredn = 9 models at the default, 4 variants, 7 loads with num_ctx in the request On this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), 2026-10-12: the context_length that /api/ps reported after each cold call.
The gap matters for agents. The context-length page: "Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens." The Claude Code integration page: "Choose a model and set a 64k+ context window." The v0.40.2 release notes: "ollama launch claude uses the model's full context length".
Three ways to set it
- Per request. The FAQ: "When using the API, specify the
num_ctxparameter:" - Per model.
PARAMETER num_ctx 32768in a Modelfile, built into a variant (Class 67 covers Modelfiles). - Per server. The FAQ: "This can be overridden with the
OLLAMA_CONTEXT_LENGTHenvironment variable." Class 67's configuration table lists it too. The Windows page adds: "If Ollama is already running, Quit the tray application and relaunch it from the Start menu, or a new terminal started after you saved the environment variables."
Not through the OpenAI-compatible API: its page says "The OpenAI API does not have a way of setting the context size for a model." Whichever way you choose, check the CONTEXT column of ollama ps.
Two drills follow: true or false on this PC, then a measured ollama ps line taken apart.
True on this PC, as measured or as documented?
Eight statements about the context a model gets. Read PASS (the button says ship) as: true, as measured on this PC or as the vendor documents it. Read FAIL (send back) as: not true. The statements are ours. Four answers rest on loads measured on one PC (NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2) on 2026-10-12; four rest on sentences from Ollama's documentation saved that day.
With no num_ctx set anywhere, gemma3:4b loaded with a 4096-token context.
ollama ps printed CONTEXT 4096 for it (n = 1). In the bench's first block, 9 of 9 models with no num_ctx in the request or the Modelfile got 4096 as well.A model with no num_ctx gets the default the Modelfile reference documents, 2048 tokens.
gemma3:4b in a separate run. The documentation gives three answers; the server gave one.devstral with a 48K context, a local Modelfile variant whose Modelfile sets num_ctx 49152, loaded with 49152 tokens.
/api/ps showed context_length 49152 for it. All 4 local variants whose Modelfile sets num_ctx got exactly that context (65536, 65536, 32768 and 49152).On a card with less than 24 GiB of VRAM, the documented default context is 32K.
num_ctx got 4096. The FAQ says the same number: “By default, Ollama uses a context window size of 4096 tokens.”Sending num_ctx in the request set the context for that load.
/api/ps equalled the num_ctx sent in the request (4096 to 65536). The FAQ: “When using the API, specify the num_ctx parameter:”Ollama's OpenAI-compatible endpoint takes a context size in each request.
/api/chat. The OpenAI compatibility page: “The OpenAI API does not have a way of setting the context size for a model. If you need to change the context size, create a Modelfile which looks like:”qwen3-coder:30b supports a 262144-token context, so that is what it got by default.
/api/show lists 262144 as its context length, the most the model supports. /api/ps showed 4096 at the server's default. What a model supports is not what it gets.Ollama's documentation asks for a context of at least 64000 tokens for agents and coding tools.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredQuoted What each answer rests on
- Measured
- Eight statements written by us for this drill (constructed). Rows 1, 3, 5 and 7 rest on loads measured on this PC; rows 2, 4, 6 and 8 on sentences quoted from Ollama's documentation, saved 2026-10-12.
- Method
/api/psread after each cold call of the bench (73 measured/api/chatcalls);ollama psafter oneollama runofgemma3:4b;/api/showmodel_infofor the most a model supports.- n
- 9 of 9 models at the server's default; 4 of 4 local variants; 7 of 7 loads with
num_ctxin the request; 1 run ofgemma3:4b. Counts, so no confidence interval. - Source
- Ollama FAQ, Context length, Modelfile reference, OpenAI compatibility, Claude Code integration (saved 2026-10-12). One PC: NVIDIA GeForce RTX 3060, 12288 MiB, driver
610.88(WDDM), Ollama 0.40.2, 2026-10-12. - Excludes
- Cards with 24 GiB or more, where the documentation gives larger defaults (not measured); other Ollama versions; the OpenAI-compatible endpoint (not called); the embedding model (not measured).
Read one ollama ps line, column by column
What ollama ps printed on this PC after one run of gemma3:4b on 2026-10-12: the header and the row as printed (measured, n = 1). Select a part of the line to see what it tells you and what to do with it. Nothing is scored.
# ollama ps, measured on this PC, 2026-10-12NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTILgemma3:4b c30276f7dffe 2.9 GB 100% GPU 4096 llamacpp 14 minutes from now
llama3.1:latest and llama3.1:8b shared one ID.ollama list: SIZE is the loaded size, not the file. Compare it with the VRAM free before the load, not with the card's total.100% GPU means the model was loaded entirely into the GPU”; “48%/52% CPU/GPU means the model was loaded partially onto both the GPU and into system memory”. Read it before you read a speed: below 100% GPU, part of the model is in system RAM.num_ctx was set, so this is the default on this card. If the job needs more, set num_ctx and read this column again after the next call.14 minutes from now; its keep-alive setting was not read, so the reason is not verified. Unload by hand with keep_alive 0 when you are done.Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredQuotedn = 1 run Measured on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 7372 MiB free before the run, 2026-10-12: the header and the row as printed (the engine trims trailing spaces). The column notes quote Ollama's FAQ and context-length page, saved that day.
What a bigger context costs: raising num_ctx
The KV cache is the memory a model keeps for every token of its context, layer by layer; it grows with the context. Its cost per token follows from the model's own fields in /api/show: layers × KV heads × (key length + value length) × bytes per element. The default cache type, f16 by the FAQ, takes 2 bytes per element.
For qwen2.5:14b: 48 layers × 8 KV heads × (128 + 128) × 2 bytes = 196,608 bytes per token, about 0.197 GB per thousand tokens, or 6.44 GB at a 32768 context.
Calculatedn = 1 model's /api/show fields block_count 48 and head_count_kv 8 from model_info; it lists no key or value length, so the head size, 128 for keys and for values, is taken as embedding_length / head_count; 2 bytes per element at f16. GB here is 10^9 bytes.
One model, three contexts
With num_ctx 4096, 16384 and 32768 in the request, /api/ps reported qwen2.5:14b at 9.47, 12.42 and 15.75 GB. Per added token it grew 239,670 bytes, then 203,304: 1.22 and 1.03 times the formula, and 1.02 to 1.22 times across five pairs of the same weights at two contexts. Read We take the rest to be compute buffers that also grow with the context; Ollama's docs do not break the size down.
gemma3:4b, swept at a different time, barely moved: 2.88, 3.05 and 3.08 GB at 4096, 16384 and 32768, all on the GPU, at about 84 tok/s at every context (on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 8594 to 8808 MiB free; the four medians span 0.39 tok/s). A sliding window is a layer that only looks back a fixed number of tokens. In /api/show, gemma3, gemma4 and gpt-oss models list a sliding_window, so the formula above is not applied to them. Read We read that as part of their cache keeping a fixed window, so it does not grow with every token at every layer. At 65536 its size even fell, to 2.94 GB (see the measured, not explained panel).
num_ctx in the request. Top, qwen2.5:14b: the outlined bar is the model's size with the KV cache the formula gives as its violet end; below it, cyan is the part on the GPU and amber the part in system RAM. Bottom, gemma3:4b on the same GB scale: four nearly equal bars.MeasuredCalculatedReadn = 1 load and 2 warm calls per context; 7 loads On this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), 2026-10-12. Free before each load: qwen2.5:14b 8879, 9082 and 10109 MiB; gemma3:4b 8594, 8808, 8804 and 8737 MiB. Sizes and shares from /api/ps; the violet mark is the formula's figure, not a measured split.
Two levers the docs describe, not measured here
The cache type. By the FAQ, the K/V cache can be quantized when Flash Attention is on, which Ollama does automatically where the backend and devices support it; q8_0 then uses approximately half the memory of f16 and q4_0 a quarter, and the setting is global, for every model at once. Parallel requests. "Parallel request processing for a given model results in increasing the context size by the number of parallel requests."
Three more words for the drills. keep_alive: how long a model stays loaded after a call; the FAQ: "By default models are kept in memory for 5 minutes before being unloaded." load_duration: the time a call spent loading, at most 0.047 s in a warm call here (the two reloads aside) and at least 4.05 s in a cold one. Prompt eval: the model reading the prompt before it replies.
Two drills follow: before-and-after claims checked against the sweep, then a request built up line by line.
A bigger context: does the measurement back the claim?
Seven claims about what a larger context did on this PC. Each shows two measured values, before and after. Decide whether the measurement backs the claim. All values were measured on one PC (NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2) on 2026-10-12; the free VRAM before each load is in the notes.
qwen2.5:14b took about two thirds more memory at a 32768-token context than at 4096.
/api/ps size of qwen2.5:14b with num_ctx 4096 (before) and 32768 (after), one sweepmeasured delta +6.28 GB +66.3%
/api/show gives 0.197 GB per thousand tokens of context for this model; its size grew 1.03 to 1.22 times that formula, and across five measured pairs of four models, each against its own formula, 1.02 to 1.22 times (READ: we take the rest for compute buffers that also grow with the context).At 32768, about a third of qwen2.5:14b sat in system RAM.
size_vram / size in /api/ps), 4096 (before) and 32768 (after)measured delta -33.6 % -33.6%
Its warm speed fell by more than half.
eval_count / eval_duration), 2 warm calls each, 4096 (before) and 32768 (after)measured delta -12.73 tok/s -59.0%
gemma3:4b lost half its speed from a 4096 to a 65536 context.
gemma3:4b, num_ctx 4096 (before) and 65536 (after), 2 warm calls eachmeasured delta -0.17 tok/s -0.2%
gemma3:4b lists a sliding-window field in /api/show; we read that as part of its cache keeping a fixed window, so the cache does not grow with every token at every layer.Raising num_ctx from 4096 to 65536, 16 times the context, made gemma3:4b much larger in memory.
/api/ps size of gemma3:4b, num_ctx 4096 (before) and 65536 (after)measured delta +0.06 GB +2.1%
qwen2.5:14b, which has no sliding window: 1.66 times the size from 4096 to 32768. READ: for sliding-window models the per-token formula does not apply.Giving devstral a 48K context in a local Modelfile variant made it slower.
devstral at the server's 4096 (before); devstral with a 48K context, a local Modelfile variant (after)measured delta +0.38 tok/s +11.6%
qwen2.5-coder:14b lost about three quarters of its speed when its Modelfile set a 32768-token context.
qwen2.5-coder:14b at the server's 4096 (before); qwen2.5-coder-14b-32k, the same weights with num_ctx 32768 in its Modelfile (after)measured delta -22.03 tok/s -73.3%
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredCalculatedREAD, our reading How each value was measured
- Measured
- Seven claims written by us for this drill (constructed). Every before and after value is a measured load of the bench on this PC, 2026-10-12: the
/api/pssize andsize_vramafter the cold call, and the median of the warm calls' eval rates. - Method
- Eval rate =
eval_count/eval_duration(nanoseconds); the part in system RAM and every ratio are calculated from the measured values. Rows 1 to 5 compare loads of one model within one sweep, minutes apart; rows 6 and 7 compare a model with its local variant, measured minutes to an hour apart. READ marks our readings of the KV cache. - n
- 1 load per value; 2 warm calls per rate in rows 1 to 5, 3 for devstral and its variant, 2 and 3 for the qwen2.5-coder pair. No confidence interval is claimed.
- Source
- The bench's saved
/api/chatreplies and/api/psreads on one PC: NVIDIA GeForce RTX 3060, 12288 MiB, driver610.88(WDDM), Ollama 0.40.2, 2026-10-12. The GPU was shared with other programs (4916 MiB in use before any model loaded); 0 of 73 calls were contended. - Excludes
- Long prompts and structured output (not run); other cards, drivers and versions; answer quality (nothing was graded).
From the server default to a context you chose
On the left, a request body for Ollama's /api/chat with no options, constructed for this drill. Add clauses and read what each one changes. The figures in the notes are this PC's measured loads of qwen2.5:14b (NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2, 2026-10-12).
POST /api/chat
{
"model": "qwen2.5:14b",
"messages": [{"role": "user", "content": "your question"}],
"stream": false
}Measured with it: 12.42 GB, 84.6 % on the GPU, 14.04 tok/s warm (n = 2), on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 9082 MiB free. Without a num_ctx the server gave 4096; in the sweep, num_ctx 4096 gave 9.47 GB, 100 % on the GPU and 21.58 tok/s, with 8879 MiB free. The FAQ: “When using the API, specify the num_ctx parameter:”
Measured: 15.75 GB, 66.4 % on the GPU, 8.85 tok/s warm (n = 2), on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 10109 MiB free: 5.3 GB in system RAM. The model's own maximum in /api/show is 32768, so this is as far as it goes.
Documented: “Model keep-alive duration (for example 5m or 0 to unload immediately)” The next call finds the model loaded. On this PC every call that found the model still loaded spent 0.047 s or less loading it; the shortest cold load was 4.05 s.
Documented, not measured: “Parallel request processing for a given model results in increasing the context size by the number of parallel requests. For example, a 2K context with 4 parallel requests will result in an 8K context and additional memory allocation.” The installed version's default: NumParallel = Uint("OLLAMA_NUM_PARALLEL", 1).
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredQuotedn = 1 load per context, 2 warm calls each The request is constructed for this drill, not a recorded call. The measured figures are the bench's qwen2.5:14b sweep on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), 2026-10-12, with num_ctx in the request. The keep-alive and parallel notes quote Ollama's documentation (Ollama FAQ, API: chat, the v0.40.2 source (envconfig)); parallel requests were not measured.
When the model spills into system RAM
When a model and its context do not all fit on the GPU, the rest spills into system RAM and the PROCESSOR column of ollama ps shows the split: by the FAQ, 100% GPU means loaded entirely into the GPU, and a form such as 48%/52% CPU/GPU means loaded partly into both. The context-length page: "For best performance, use the maximum context length for a model, and avoid offloading the model to CPU. Verify the split under PROCESSOR using ollama ps."
Here 9 of 20 loads spilled. qwen2.5:14b ran 21.58 tok/s fully on the GPU at 4096, 14.04 with 84.6 % on the GPU at 16384 and 8.85 with 66.4 % at 32768, on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 8879, 9082 and 10109 MiB free; 1.91 GB, then 5.3 GB, sat in system RAM. The same weights with a 32K default in a Modelfile, qwen2.5-coder-14b-32k, had 66.4 % on the GPU and ran 8.01 tok/s; its base, qwen2.5-coder:14b, fully on the GPU at 4096, ran 30.04: 3.75 times faster, measured 14 minutes apart, with 6771 and 9616 MiB free.
The share alone does not predict speed
Parameters and quantisation are a model's size and how its weights are stored, as /api/show reports them. A mixture of experts is a model whose layers hold many expert blocks and use only some per token. qwen3-coder:30b (30.5B, Q4_K_M; /api/show lists 128 experts, 8 used per token) had 55.6 % on the GPU and ran 29.78 tok/s with 9671 MiB free. devstral (23.6B, Q4_K_M, architecture llama, no experts) had 69.5 % and ran 3.29 tok/s with 7802 MiB free, 15 minutes apart. Less on the GPU, 9.05 times faster: far beyond the 1.67 times by which two models of one architecture differed at different times here. Read That fewer weights work per token is why: our reading, not a measurement. Read the architecture in /api/show, not just PROCESSOR.
qwen2.5:14b sweep falls as its share falls; qwen3-coder:30b at 55.6 % sits far above devstral at 69.5 %.Measuredn = 20 loads; 2 or 3 warm calls each On this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), 2026-10-12, with 6771 to 10109 MiB free before a load; units ran minutes to hours apart. The same model at the same context moved 1.2 times in 36 minutes; two models of one architecture differed 1.67 times, measured an hour apart. These runs cannot separate time from model.
Settings the installed help lists
The GPU page: "The Ollama scheduler leverages available VRAM data reported by the GPU libraries to make optimal scheduling decisions." The installed 0.40.2's ollama serve --help lists three settings about fitting a model into VRAM, none of them varied here: LLAMA_ARG_FIT, automatic fit of unset memory options, on by default; LLAMA_ARG_FIT_TARGET, a free-VRAM margin per device in MiB; and OLLAMA_GPU_OVERHEAD, VRAM reserved per GPU. On this card the GPU part of the 9 spilled loads stayed between 8678 and 10210 MiB, while their sizes ranged from 12.42 to 25.37 GB.
Measured, not explained
Four results we measured and cannot explain. Each is published as measured; none has a verified cause, and none is advice.
/api/ps/api/ps had been empty right after the call before each, and they began 2.0 s and 0.5 s after that call ended. Both are out of every warm median. Cause not verified.size_vram that /api/ps reported was larger than the VRAM nvidia-smi showed free before the load; the two reads were 20 to 143 s apart, with the load between them. Largest gap: 9967 MiB on the GPU after 6771 MiB free (qwen2.5-coder-14b-32k at 32768). Cause not verified.gemma3:4b shrank/api/ps size was 3.08 GB at 32768 and 2.94 GB at 65536, two loads of one sweep 13 s apart, while nvidia-smi's rise grew at every step (4613, then 4982 MiB). Cause not verified.gpt-oss:20b, local 64K variant, ran 31.07 tok/s with 64.3 % on the GPU; the base model at 4096 ran 16.3 with 75.5 %, a ratio of 0.52. 3 warm calls each, on this PC with 8966 and 8163 MiB free, the two units 21 minutes apart. Cause not verified.Measuredn = 73 calls, 20 loads, 4 sweep loads, 2 units On this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), 2026-10-12, from the bench's saved replies, /api/ps reads and nvidia-smi reads. No cause was tested.
Two drills follow: flag the reading a measurement does not support, then time a reply once the model is loaded.
Find the reading the measurement does not support
Three rounds, each a measurement from this PC (NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2, 2026-10-12) and three readings of it, written by us. Two readings are supported by the measurement; pick the one that is not.
qwen2.5:14b, num_ctx 32768, this PC size 15.75 GB, 66.4 % on the GPU warm eval rate 8.85 tok/s, n = 2 10109 MiB free before the load Which reading does the measurement not support?
Ask what one PC can tell you.
qwen3-coder:30b at 4096: 55.6 % on the GPU, 29.78 tok/s devstral at 4096: 69.5 % on the GPU, 3.29 tok/s warm medians, n = 3 each, 15 minutes apart Which reading does the measurement not support?
qwen3-coder:30b had less and ran 29.78, 9.05 times as fast. /api/show lists 128 experts for it with 8 used per token; devstral (architecture llama) lists none. READ: fewer weights used per token is our reading of why, not a measurement. They ran 15 minutes apart, on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 9671 MiB free (qwen3-coder:30b) and 7802 MiB free (devstral). Here two models of one architecture, measured about an hour apart, differed by 1.67 times, and 9.05 is far past that.Look at what each model uses per token.
nvidia-smi, before any model loaded: 4916 MiB used of 12288 MiB driver model WDDM Which reading does the measurement not support?
Count what was there before you.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredCalculatedREAD, our reading What each round rests on
- Measured
- Three measurements on this PC, 2026-10-12:
qwen2.5:14bat 32768 (the bench's second block),qwen3-coder:30band devstral at the server's 4096 (the first block), and nvidia-smi before any model loaded. The readings are written by us (constructed). - Method
/api/pssizeandsize_vramafter the cold call; the median warm eval rate;/api/showmodel_infofor the expert counts;nvidia-smi --query-gpu=memory.used,memory.total. READ marks our reading of why a mixture-of-experts model ran faster with less of itself on the GPU.- n
- 1 load each; 2 warm calls at 32768, 3 for each first-block model; 1 nvidia-smi read before any model.
- Source
- Ollama FAQ, Hardware support (saved 2026-10-12). One PC: NVIDIA GeForce RTX 3060, 12288 MiB, driver
610.88(WDDM), Ollama 0.40.2. - Excludes
- Other cards, drivers and versions; which programs held the 4916 MiB (on this PC nvidia-smi printed [N/A] for each program's memory, and the page does not ask); answer quality.
How long will the reply take once the model is loaded?
Pick a measured load and type how many tokens the reply should have. The readout is seconds of generation at that load's median warm rate, measured on this PC (NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2, 2026-10-12); the free VRAM of each load is in the receipt. It leaves out reading the prompt and loading the model. The default, 200 tokens, is the budget each bench call had.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
CalculatedMeasured How the readout is calculated
- Measured
- Each option is one measured load: qwen2.5 14b at 4096 (sweep), 21.58 tok/s (n = 2), with 8879 MiB free; qwen2.5 14b at 16384 (sweep), 14.04 tok/s (n = 2), with 9082 MiB free; qwen2.5 14b at 32768 (sweep), 8.85 tok/s (n = 2), with 10109 MiB free; qwen2.5-coder 14b at 4096, 30.04 tok/s (n = 2), with 9616 MiB free; qwen2.5-coder-14b-32k at 32768, 8.01 tok/s (n = 3), with 6771 MiB free; qwen3-coder 30b at 4096, 29.78 tok/s (n = 3), with 9671 MiB free; devstral at 4096, 3.29 tok/s (n = 3), with 7802 MiB free; gemma3 4b at 4096 (sweep), 84.11 tok/s (n = 2), with 8594 MiB free; llama3.1 8b at 4096, 58.06 tok/s (n = 3), with 7563 MiB free; mistral-nemo at 4096, 39.43 tok/s (n = 3), with 7746 MiB free. All on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), 2026-10-12.
- Method
- Seconds = tokens x seconds per token, where seconds per token is 1 / the load's median warm eval rate (
eval_count/eval_duration). Check, first option: 1 / 21.58 tok/s = 0.0463 s per token, the ledger's value for that load. The four bands are ours. - n
- One load per option; 2 or 3 warm calls each, as listed.
- Source
- The bench's saved replies on one PC: NVIDIA GeForce RTX 3060, 12288 MiB, driver
610.88(WDDM), Ollama 0.40.2, 2026-10-12; API: usage (saved 2026-10-12). - Excludes
- Reading the prompt; cold loads (4.05 to 77.4 s here); other cards. The loads ran at different times on a shared PC, where two models of one architecture, measured about an hour apart, differed by 1.67 times; a model that thinks spends part of its tokens on thinking, which this readout does not separate.
Read your load: ollama ps, --verbose and the API, in your browser
The reader below is a load reader: a tool for the text your own machine printed. It reads what your Ollama and nvidia-smi printed, in any mix, and computes the eval and prompt rates, the GPU share, the context the server gave and the KV cache per token, with the formula beside each figure. It never contacts anything, never runs a command and never tells you whether a model will fit your card. Every figure it computes comes from your text, with the class's measured rows for the same model beside it, each with its qualifier.
A sample is a saved output you load with one press: nine from this class's PC, labelled real, and six constructed or the vendor's own example, labelled so. The context what-if shows the KV arithmetic from your own /api/show beside the measured error band: on this class's card the size grew 1.02 to 1.22 times the formula across 5 pairs (READ: we take the rest to be compute buffers). Its projected size is that arithmetic added to the size you pasted, not a forecast for your card. It gives no fit verdict, GPU-share forecast or speed forecast and asks for no parameter count or quantisation, which is what separates it from Class 67's "Will it fit on your card?" calculator.
Read your load: paste what your machine printed
Paste your own output: the reader recomputes the rates, the GPU share, the context and the KV cost from what your Ollama printed, and lays this class's measured rows beside them. It takes no parameter count or quantisation and gives no fit verdict, GPU-share forecast or speed forecast: the context what-if is the KV arithmetic from your own /api/show, beside the error band measured on our card.
Pressing this tool's buttons sends nothing anywhere, and you can confirm that in your browser's network tab. The text you paste stays in this page; nothing here contacts your Ollama or runs a command.
Scripts are off, so the reader cannot open here. With scripts on, you paste your own output and it is read in this page. Below is the measured sweep the reader puts beside a qwen2.5:14b paste.
Context (num_ctx) | Size, GB | On the GPU, % | Warm eval rate, tokens/s |
|---|---|---|---|
4096 | 9.47 | 100 | 21.58 |
16384 | 12.42 | 84.6 | 14.04 |
32768 | 15.75 | 66.4 | 8.85 |
Measuredn = 2 warm calls per contextqwen2.5:14b with num_ctx in the request, on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 8879, 9082 and 10109 MiB free before the three loads, 2026-10-12; one PC, one day, a shared GPU. Size and share from /api/ps; the rate is the median of the warm calls, eval_count / eval_duration.
What your paste shows
Findings
“Our card” below is this class's one PC: NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2, 2026-10-12, a shared GPU. Each finding lists its sources.
Next to our rows
Each of our rows is one load, measured at its own time on a shared GPU, so two rows at the same context can differ; the cleanest comparison is within one sweep (the rows with num_ctx in the request).
Context what-if: the KV arithmetic, not a fit verdict
From the architecture fields of /api/show: layers x KV heads x (key length + value length) x bytes per element, for every token of the context. It shows no GPU share, no speed and no verdict on whether a model fits a card.
The FAQ: parallel requests multiply the context.
CalculatedMeasuredQuotedREADn = 20 measured loads in our rowsEverything about your paste is computed in this page from the text you pasted (CALCULATED). Our rows are this class's measured loads, each on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2) with the free MiB it names, 2026-10-12: one PC, one day, a shared GPU (MEASURED). A finding's sources are Ollama's docs (QUOTED) or our reading where they are silent (READ).
Three things to notice in the samples
- The
ollama pssample.gemma3:4b, with nonum_ctxset anywhere, showsCONTEXT4096and100% GPU: the documented default under 24 GiB, far below the 64000 tokens the docs ask for agents and coding tools. - The warm reply at 32768, then its
/api/psread. The card shows 66.4 % ofqwen2.5:14bon the GPU and 5.3 GB in system RAM, beside the class's row for that load: a median of 8.85 tok/s over 2 warm calls, on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama0.40.2), with 10109 MiB free. The reply's own rate, 9.24 tok/s, is one call, so it need not equal the median. - The
gemma4:12breply. Itscontentis empty: the 200-token budget went to thethinkingfield, as in all 4 of its calls here (697 to 721 characters each), andeval_countcounts those tokens. The thinking page: "Thinking-capable models emit athinkingfield that separates their reasoning trace from the final answer."
MeasuredQuotedn = 1 load per sample; 2 warm calls behind 8.85; 4 gemma4:12b calls Outputs saved on this PC on 2026-10-12 and shown as printed; the docs quoted as saved that day.
Old rules of thumb, and what changed in 2026
A rule of thumb is a quick estimate that stands in for a measurement, such as a model's file size times 1.2. The earlier Ollama classes give several; this PC measured them on 2026-10-12. Those classes remain the place for the install, the catalog and the Modelfile, which this class does not repeat.
| An earlier class said | This PC measured |
|---|---|
Context: the default may cut an embedding model's input at 2048 tokens (Class 27); the default is 32K (Class 46); 8192 is the typical value to set for OLLAMA_CONTEXT_LENGTH (Class 67) | 4096 for all 9 chat models with no num_ctx; no embedding model was measured |
| 14B models: "Partial — GPU+CPU split", 15-25 tok/s, an estimate (Class 11) | Fully on the GPU at 4096: 18.01 and 21.58 tok/s (qwen2.5:14b), 30.04 (qwen2.5-coder:14b), at different times. Split: 14.04 and 8.85 tok/s (qwen2.5:14b at 16384 and 32768) |
"14B fits comfortably in 12GB VRAM" (Class 46, a comment on its pull of qwen2.5-coder:14b) | qwen2.5-coder:14b: 100 % on the GPU at 4096; the same weights with a 32K default (qwen2.5-coder-14b-32k): 66.4 % at 32768. qwen2.5:14b: 84.6 % at 16384 |
| File size times 1.2 (Class 11; Class 67's calculator applies the 1.2 to parameters × bytes per parameter instead) | Over for all 10 models measured at 4096, qwen2.5:14b by 1.32 GB; 4.96 GB short for it at 32768 |
Ollama 0.16.3 (Class 11), v0.31.1 (Class 67) | Ollama 0.40.2 |
ReportedMeasuredCalculatedn = 9 default loads; 3, 2 and 2 warm calls for the 14B rates at 4096, 2 each for the split ones; 10 models for the rule Left: the earlier pages as saved on 2026-10-12. Right: on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), with 8294, 8879 and 9616 MiB free for the 14B rates at 4096, 9082 and 10109 at 16384 and 32768, and 6771 for the 32K variant; the same model moved 1.2x in 36 minutes. The rule is computed from file sizes in /api/tags; it has no context in it.
What changed in the installed 0.40.2
ollama psprints two more columns,CONTEXTandRUNNER(llamacpphere). The context-length page showsCONTEXT, the FAQ still showsNAME ID SIZE PROCESSOR UNTIL, and no docs page showsRUNNER.- The default context follows VRAM, since release
v0.15.5("Ollama will now default to the following context lengths based on VRAM:") and, for the Windows and macOS apps, sincev0.17.0. - Automatic fit. The installed
ollama serve --helplistsLLAMA_ARG_FIT:Enable llama.cpp automatic fit of unset memory options (default "on"). - The background upgrade. A background upgrade is the conversion release
v0.40.2describes: "Models downloaded with earlier versions of Ollama are upgraded in the background the first time you run them, for better performance and compatibility when running on llama.cpp." The original stays on disk as a backup, andv0.40.3paused the upgrade for embedding and other request performance. Here/api/showreturned amanifestsfield, which the API schema does not document, for 1 of 17 models:gemma3:4b, run once before the bench began, with 2 entries, runnerggmland runnerllamacpp(selected), the two runners thev0.40.2note's backup clean-up reads. Whether the upgrade touched any timing here is NOT VERIFIED. - Sizes under partial offload. Release
v0.30.11: "llm: fix ollama ps double-counting mmap'd weights on partial offload". Sizes read under older versions may differ.
QuotedMeasuredn = 1 ollama ps read; 17 /api/show reads Release notes, docs and the installed help quoted as saved on 2026-10-12; columns and manifests read from this PC's Ollama 0.40.2.
Test each old claim against this PC in the drill below.
Does the measurement on this PC agree with the earlier pages?
Seven statements drawn from earlier academy pages (reported from the pages as saved on 2026-10-12). Read PASS (ship) as: today's measurement on this PC agrees. Read FAIL (send back) as: it does not. Measured on one PC (NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2), 2026-10-12.
Class 27 says the default context may cut an embedding model's input at 2048 tokens. A chat model with no num_ctx gets the same 2048 tokens.
num_ctx got 4096: 9 of 9 in the bench and gemma3:4b in a separate run. The embedding model was not measured, so Class 27's own case is not tested here. The Modelfile reference still documents 2048: “Sets the size of the context window used to generate the next token. (Default: 2048)”The default context is 32K, as Class 46 says.
Class 67's configuration table lists 8192 as the typical value for OLLAMA_CONTEXT_LENGTH, a setting on the server. A model with no num_ctx did not get 8192 on this PC.
num_ctx in the bench. 8192 is a value you set; the FAQ: “This can be overridden with the OLLAMA_CONTEXT_LENGTH environment variable.” Its own example sets it that way (OLLAMA_CONTEXT_LENGTH=8192 ollama serve).Class 46 writes “14B fits comfortably in 12GB VRAM” above its command to pull qwen2.5-coder:14b. That model loaded fully on the GPU here at the server's default context.
qwen2.5-coder:14b 100 % on the GPU, with 9616 MiB free; qwen2.5:14b, the same loaded size, too (100 %, with 8294 and 8879 MiB free). With a larger context they did not: qwen2.5-coder-14b-32k, the same weights with 32768 in its Modelfile, held 66.4 %; qwen2.5:14b held 84.6 % at 16384 and 66.4 % at 32768. The statement holds at the small context only. Class 46 counts the whole card; here 4916 MiB was in use before any model loaded.File size times 1.2 (Class 11; Class 67's calculator multiplies parameters by bytes per parameter by 1.2) tells you what a model takes in memory.
qwen2.5:14b at 32768 (10.79 GB against 15.75 GB measured). The rule has no context in it.Class 11 estimates 15-25 tok/s for 14B models, in a row marked “Partial — GPU+CPU split”. The 14B loads measured here ran inside that range.
qwen2.5:14b 18.01 tok/s (first block, with 8294 MiB free) and 21.58 (the sweep, with 8879 MiB free), inside; qwen2.5-coder:14b 30.04 (with 9616 MiB free), above. Split between the GPU and system RAM, as that row says, all below: qwen2.5:14b 14.04 at 16384 (84.6 % on the GPU, with 9082 MiB free) and 8.85 at 32768 (66.4 %, with 10109 MiB free); qwen2.5-coder-14b-32k 8.01 (66.4 %, with 6771 MiB free). All on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2). Class 11 labels its figure an estimate; these ran at different times on a shared PC, where two models of one architecture, measured about an hour apart, differed by 1.67 times.This PC ran a newer Ollama than the earlier pages were written for.
0.40.2. Class 11's sample output names 0.16.3; Class 67 is written to v0.31.1. One change between them, in release v0.30.11: “llm: fix ollama ps double-counting mmap'd weights on partial offload”. A size read under an older version may differ.Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
ReportedMeasuredCalculated What the earlier pages said and what was measured
- Measured
- Seven statements drawn from earlier academy pages, saved 2026-10-12 and reported here (Class 11, Class 27, Class 46, Class 67), set against loads measured on this PC that day.
- Method
/api/pscontext_length,sizeandsize_vramafter each cold call; median warm eval rates; the file size from/api/tagstimes 1.2 against the measured size at 4096.- n
- 9 models at the server's default; 10 models for the 1.2x rule; 1 load per figure; 2 or 3 warm calls per rate.
- Source
- The earlier pages as saved 2026-10-12; Ollama FAQ, Context length, Modelfile reference, release v0.30.11 (saved 2026-10-12). One PC: NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2.
- Excludes
- Embedding models; the machines the earlier pages were written on; answer quality (nothing was graded).
Measure your own machine: tokens per second and what the context costs
The habit in seven steps, each with its source: the bench's protocol, which produced every figure here, or a saved docs page. The steps are our advice, not a measured recipe.
- See what already holds the GPU. Run
nvidia-smi --query-gpu=memory.used,memory.total --format=csvandollama ps; count what is there and do not unload a model that is not yours. Here 4916 of 12288 MiB was in use before any model loaded, and on this PCnvidia-smiprinted N/A for every program's memory: count, do not name. - Wait for a quiet GPU. The bench's rule: two reads of
utilization.gpu20 s apart, both under 15 %, and no model listed that it had not loaded. It polled every 60 s and skipped a test after 15 minutes. - Load with the context the job needs:
num_ctxin the request'soptions, as the FAQ shows; then readPROCESSORandCONTEXTinollama ps. It set the context in 7 of 7 loads here. - Ask the same question once cold and at least twice warm, with
temperature0, a fixedseedand a fixednum_predict(the bench used 200 tokens). Durations are in nanoseconds (the usage page), and the API reference in thev0.40.2source says: "To calculate how fast the response is generated in tokens per second (token/s), divideeval_count/eval_duration*10^9." - Raise
num_ctxin steps and watch the size,PROCESSORand the eval rate. Compare within one sweep: two models of one architecture and size, measured an hour apart on this shared PC, differed by 1.67x. - Write the free VRAM, the version and the date next to every number: 8.85 tok/s on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama
0.40.2), with 10109 MiB free, 2026-10-12, 2 warm calls. - Unload with
keep_alive0 when you are done. The FAQ: "'0' which will unload the model immediately after generating a response". The bench unloaded its own model 20 times this way, confirming each time that it had left/api/ps.
ReportedMeasuredQuotedn = 73 calls and 20 unloads Thresholds: the bench's settings, fixed before it ran. Counts: its saved calls on this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), 2026-10-12. Quotations verbatim as saved that day.
The drills below set the context, check whether a load was set up and measured on purpose, and plan a measurement on your machine.
Set the context in the request
Type a model tag and a keep-alive, and pick a context. The block shows the request body that sets the context for one call, the form this page measured. Constructed for this drill: the defaults are an example, not a recorded setup. Check the result with ollama ps after the call.
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
Quotedn = 1 constructed example Constructed for this drill. Not a measured load. The request form follows Ollama's FAQ “When using the API, specify the num_ctx parameter:” For every load the FAQ adds “This can be overridden with the OLLAMA_CONTEXT_LENGTH environment variable.” The OpenAI compatibility page: “The OpenAI API does not have a way of setting the context size for a model. If you need to change the context size, create a Modelfile which looks like:” (Ollama FAQ, Context length, OpenAI compatibility, saved 2026-10-12). Class 67 covers Modelfiles and the server's environment variables; this drill keeps to the per-request form the bench measured.
Was this load set up and measured on purpose?
Five checks, in order. For each load, pick the check that stops it first; if one passes all five, pick the last button. Four loads were measured on this PC (NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2, 2026-10-12); two are constructed and say so. The checks ask whether a load was set up and measured on purpose, not whether a model is good enough for your work.
qwen2.5-coder:14b at the server's default context (measured).
- ListedThe model shows in
ollama ps(or/api/ps) after a call, so you read the load you think you are reading.pass - All on the GPU
PROCESSORreads 100% GPU. The context-length page: “For best performance, use the maximum context length for a model, and avoid offloading the model to CPU. Verify the split underPROCESSORusingollama ps.”pass - Context of 64000 or moreCONTEXT is at least 64000 tokens. The same page: “Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens.”REFUSED
- Rate measured hereA warm eval rate was measured on this machine, for this load, at least twice.never reached
- Written downThe free VRAM before the load, the Ollama version and the date are written beside the rate.never reached
num_ctx and measure again.qwen3-coder:30b, local 64K variant (measured).
- ListedThe model shows in
ollama ps(or/api/ps) after a call, so you read the load you think you are reading.pass - All on the GPU
PROCESSORreads 100% GPU. The context-length page: “For best performance, use the maximum context length for a model, and avoid offloading the model to CPU. Verify the split underPROCESSORusingollama ps.”REFUSED - Context of 64000 or moreCONTEXT is at least 64000 tokens. The same page: “Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens.”never reached
- Rate measured hereA warm eval rate was measured on this machine, for this load, at least twice.never reached
- Written downThe free VRAM before the load, the Ollama version and the date are written beside the rate.never reached
gpt-oss:20b, local 64K variant (measured).
- ListedThe model shows in
ollama ps(or/api/ps) after a call, so you read the load you think you are reading.pass - All on the GPU
PROCESSORreads 100% GPU. The context-length page: “For best performance, use the maximum context length for a model, and avoid offloading the model to CPU. Verify the split underPROCESSORusingollama ps.”REFUSED - Context of 64000 or moreCONTEXT is at least 64000 tokens. The same page: “Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens.”never reached
- Rate measured hereA warm eval rate was measured on this machine, for this load, at least twice.never reached
- Written downThe free VRAM before the load, the Ollama version and the date are written beside the rate.never reached
gemma3:4b with num_ctx 65536 in the request (measured).
- ListedThe model shows in
ollama ps(or/api/ps) after a call, so you read the load you think you are reading.pass - All on the GPU
PROCESSORreads 100% GPU. The context-length page: “For best performance, use the maximum context length for a model, and avoid offloading the model to CPU. Verify the split underPROCESSORusingollama ps.”pass - Context of 64000 or moreCONTEXT is at least 64000 tokens. The same page: “Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens.”pass
- Rate measured hereA warm eval rate was measured on this machine, for this load, at least twice.pass
- Written downThe free VRAM before the load, the Ollama version and the date are written beside the rate.pass
Constructed: a reply came back, then ollama ps listed nothing, because the request set keep_alive to 0.
- ListedThe model shows in
ollama ps(or/api/ps) after a call, so you read the load you think you are reading.REFUSED - All on the GPU
PROCESSORreads 100% GPU. The context-length page: “For best performance, use the maximum context length for a model, and avoid offloading the model to CPU. Verify the split underPROCESSORusingollama ps.”never reached - Context of 64000 or moreCONTEXT is at least 64000 tokens. The same page: “Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens.”never reached
- Rate measured hereA warm eval rate was measured on this machine, for this load, at least twice.never reached
- Written downThe free VRAM before the load, the Ollama version and the date are written beside the rate.never reached
ollama ps while it is loaded.Constructed: 100% GPU, a context of 65536 and a warm rate you measured, noted with no free VRAM, version or date.
- ListedThe model shows in
ollama ps(or/api/ps) after a call, so you read the load you think you are reading.pass - All on the GPU
PROCESSORreads 100% GPU. The context-length page: “For best performance, use the maximum context length for a model, and avoid offloading the model to CPU. Verify the split underPROCESSORusingollama ps.”pass - Context of 64000 or moreCONTEXT is at least 64000 tokens. The same page: “Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens.”pass
- Rate measured hereA warm eval rate was measured on this machine, for this load, at least twice.pass
- Written downThe free VRAM before the load, the Ollama version and the date are written beside the rate.REFUSED
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredQuoted What is measured and what is constructed
- Measured
- Four loads measured on this PC on 2026-10-12 (the bench's
/api/psreads and warm calls); two cases constructed for this drill, not measured loads. The five checks are ours, built from Ollama's context-length page and this page's habit. - Method
- A load stops at the first check it fails.
/api/pscontext_lengthandsize_vram/sizeafter the cold call; the median warm eval rate over the warm calls. - n
- 1 load each; 2 warm calls for
qwen2.5-coder:14b, 2 for theqwen3-coder:30bvariant, 3 for thegpt-oss:20bvariant and 2 forgemma3:4bat 65536. - Source
- Context length, Ollama FAQ (saved 2026-10-12). One PC: NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2.
- Excludes
- Answer quality (nothing was graded); long prompts (not run); whether a model suits your agent; other cards.
Before you measure, what do you set up?
Four questions; steps that do not apply disappear. Each step names its source: a measurement or rule of this page's bench on one PC (NVIDIA GeForce RTX 3060, 12288 MiB, Ollama 0.40.2, 2026-10-12), or a sentence from Ollama's documentation saved that day.
- See what already holds the GPU
ollama pslists the models loaded now; with an NVIDIA card,nvidia-smi --query-gpu=name,memory.used,memory.total,utilization.gpu --format=csvshows the memory in use. Count what is there; do not unload what is not yours. On this PC 4916 of 12288 MiB was in use before any model loaded. (Source:meas.o0.used_before_mib.) - On Windows: count, do not nameOn this PC (NVIDIA driver
610.88, driver model WDDM) nvidia-smi printed [N/A] for each program's GPU memory; check what yours prints. Count the memory in use and leave the programs unnamed. (Source:meas.gpu.driver_model,meas.gpu.driver.) - Wait for a quiet GPUThe bench's rule: two reads of
utilization.gpu20 s apart, both under 15 %, and no model inollama psthat you did not load. On this PC 141 polls found the GPU not clear. (Source:rep.bench.util_max_pct,rep.bench.settle_s,meas.bench.failed_polls.) - Measure speed: once cold, twice warm
ollama run <model> --verbose(“Show timings for response”) with the same question each time, or the API withtemperature0, a fixedseedand a fixednum_predict; the rate iseval_count/eval_duration. The bench gave each call 200 tokens. (Source:vq.help.verbose,rep.bench.num_predict.) - Measure the context and its memorySend
num_ctxin the request (the FAQ: “When using the API, specify thenum_ctxparameter:”), then readollama ps: SIZE, PROCESSOR and CONTEXT. Raise it in steps and compare within one sweep. (Source:vq.faq.num_ctx_api.) - NVIDIA: check the driver“Ollama supports Nvidia GPUs with compute capability 5.0+ and driver version 550 and newer.” This PC: driver
610.88, Ollama0.40.2. (Source:vq.gpu.nvidia_req,meas.gpu.driver.) - AMD, Apple or no GPU: nothing here was measured on itThis page measured one NVIDIA card on Windows; no figure here applies to your setup. Ollama's hardware page covers AMD Radeon and Apple GPUs; the Windows page: “Ollama runs as a native Windows application, including NVIDIA and AMD Radeon GPU support.” With no GPU, the FAQ: “
100% CPUmeans the model was loaded entirely in system memory”. (Source:vq.win.native,vq.faq.proc_cpu.) - Write it downBeside every number: the free VRAM before the load (
memory.totalminusmemory.used), the Ollama version (ollama --version) and the date. On this PC the free VRAM before a load ran from 6771 to 10109 MiB on one day. (Source:meas.free.min_mib,meas.free.max_mib.) - Unload when you are doneSend
keep_alive0: the FAQ lists “'0' which will unload the model immediately after generating a response”. Then paste what your machine printed into the load reader in module four; it reads only the text you paste. (Source:vq.faq.keep_alive_0.)
Your answers stay in this browser. Nothing is sent anywhere. Reset clears them.
MeasuredReportedQuotedn = 141 busy polls, 20 loads, 1 PC The questions are constructed; the steps follow the seven-step habit of this page. The bench's rules are reported from its own protocol and its counts measured; vendor behaviour is quoted from Ollama's documentation (Ollama FAQ, Hardware support, Ollama for Windows, saved 2026-10-12), not tested on your setup.
Where to go next
- Class 67: The Definitive Ollama Masterclass and Class 11: Ollama for Windows: the install, the catalog and the Modelfile.
- Class 80: Your GPU or Nothing, next: wire an app to the GPU you just measured.
- Class 82: Ollama as the fallback in a real engine. It strips code fences by hand; structured output was not measured here.
- Class 27: fully local retrieval.
- Class 46: a local model beside cloud ones.
- Class 81: instruments measured on the same kind of card.
- Class 101: tokens, and what they cost in the cloud.
- Class 96: a measured comparison and its method.
- Class 93: publishing measured claims that survive being checked.
What we did not verify
Every figure comes from one PC on one day: an NVIDIA GeForce RTX 3060 with 12288 MiB under WDDM, driver 610.88, Ollama 0.40.2, 2026-10-12. The GPU was shared throughout. 4916 MiB was in use before any model loaded; 141 polls found the GPU not clear, 52 of them with a model listed that the bench had not loaded; median utilisation on those polls was 26 %; and 0 of 73 calls were contended.
Measuredn = 141 polls; 73 calls The bench's own nvidia-smi and /api/ps reads on this PC, 2026-10-12: counts and utilisation only.
- Any other machine: another GPU, driver, operating system or Ollama version.
- Speeds on an idle GPU. The GPU was never quiet for long, and
nvidia-smilisted 39 to 44 rows in its compute-app table before each load. - Answer quality. No answer was graded.
- Long prompts, structured output and thinking levels. A long-prompt test and a structured-output test with a JSON schema were planned and not run: the 150-minute cap came first. No model was asked to think or not, so
--thinklevels were not measured. - Three skipped tests.
deepseek-r1:8b, skipped by a fault in the bench's scheduling and not retried; the context sweep forllama3.1:8band the default-context test ofgemma3:4b, skipped because the GPU was not clear within the 15-minute wait.gemma3:4b's default context comes from the one run before the bench. - Why four results came out as they did. The measured, not explained panel in module three lists them; the cause of each is not verified.
- How much GPU memory each other program held. On this PC
nvidia-smiprinted N/A for every program's memory, so only the count of rows is known. - Cached prompt tokens. Whether
prompt_eval_countincludes tokens read from the cache: thev0.30.2release note says the llama.cpp backend now counts them, and the usage page saysprompt_eval_durationcovers only the uncached ones, so a warm prompt rate may overstate. - The background upgrade: whether it touched any cold load timed here.
- Why
UNTILread 14 minutes. The documented default keep-alive is 5 minutes; this server's keep-alive setting was not read. - KV cache types and parallel requests.
q8_0,q4_0andOLLAMA_NUM_PARALLELare documented, not measured. - The Windows file cache, which was not controlled during cold loads.
- The vendor pages after 2026-10-12, when they were saved.
- The drills' constructed cases. They are not measured loads; each drill says which of its cases are measured.
Bottom line
Ask for the context the job needs, then read what you got. On this PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2) every model with no num_ctx got 4096, and raising qwen2.5:14b to 32768 took it from 9.47 GB fully on the GPU at 21.58 tok/s to 15.75 GB with 66.4 % on the GPU at 8.85 tok/s (2 warm calls each, with 8879 and 10109 MiB free). The GPU share alone did not predict speed, and a rule of thumb with no context in it missed by gigabytes. Measure your own card the same way, write the free VRAM, the version and the date beside every number, and paste the output into the reader.
Questions
How much VRAM does Ollama use?
It depends on the model and on the context it is given. On one PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2, 2026-10-12), qwen2.5:14b took 9.47 GB, all of it on the GPU, at a 4096 context and ran 21.58 tok/s with 8879 MiB free. At a 16384 context it took 12.42 GB with 84.6 % on the GPU and ran 14.04 tok/s with 9082 MiB free; at 32768 it took 15.75 GB with 66.4 % on the GPU and ran 8.85 tok/s with 10109 MiB free (2 warm calls per context, on a GPU shared with other programs). Ollama reports the size in /api/ps and in the SIZE column of ollama ps, in GB of 10^9 bytes; size_vram in /api/ps is the part on the GPU. Read your own load rather than a table.
What context length does Ollama give a model by default?
The docs disagree. The FAQ says 4096 tokens; the context-length page and the installed 0.40.2's help say it depends on VRAM, 4k under 24 GiB; the Modelfile reference says 2048. On one RTX 3060 with 12288 MiB and Ollama 0.40.2, all 9 measured models with no num_ctx set anywhere got 4096, whatever they support: qwen3-coder:30b lists 262144 in /api/show and got 4096. The 4 local variants whose Modelfile sets num_ctx got exactly that value.
How do I set num_ctx in Ollama?
Three ways, each with a different reach. Per request: put num_ctx in the options of /api/chat or /api/generate; it set the context in 7 of 7 loads measured here. Per model: a PARAMETER num_ctx line in a Modelfile and a variant built from it, so every load of that variant gets it. Per server: the OLLAMA_CONTEXT_LENGTH environment variable; on Windows, quit the tray app and relaunch it after saving the variable. Class 67 covers the Modelfile and that variable. The docs say the OpenAI-compatible API has no way to set the context size. Then check CONTEXT and PROCESSOR in ollama ps.
Why is my model slow when ollama ps shows a CPU/GPU split?
A split means part of the model sits in system RAM. On the one PC measured here, within one sweep, the speed fell as that part grew: qwen2.5:14b ran 21.58 tok/s fully on the GPU at a 4096 context, 14.04 tok/s with 84.6 % on the GPU at 16384 and 8.85 tok/s with 66.4 % at 32768 (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2, 2 warm calls each, with 8879, 9082 and 10109 MiB free). The options changed only in num_ctx, but the three loads ran one after another on a shared GPU and the free VRAM moved too, so the sweep does not prove the cause. The same weights with a 32K default in a Modelfile ran 8.01 tok/s against 30.04 at the 4096 default, measured 14 minutes apart (3 and 2 warm calls, with 6771 and 9616 MiB free). Not every pair went that way: devstral with a 48K context, a local Modelfile variant, had 46.6 % on the GPU and ran 3.67 tok/s, against 3.29 for devstral with 69.5 % at its default, measured at different times (3 warm calls each, with 8218 and 7802 MiB free). The docs advise avoiding offload to the CPU for best performance; read PROCESSOR in ollama ps and measure your own load.
Does more of the model on the GPU always mean faster?
No. On the one PC measured here (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), qwen3-coder:30b ran 29.78 tok/s with 55.6 % of it on the GPU, and devstral ran 3.29 tok/s with 69.5 % on the GPU: the model with less on the GPU was 9.05 times faster (3 warm calls each, with 9671 and 7802 MiB free, measured 15 minutes apart). /api/show lists 128 experts for qwen3-coder:30b with 8 used per token, and none for devstral. Our reading, not a measurement: a mixture-of-experts model uses only some of its weights for each token, which would explain the gap. Read the architecture in /api/show as well as PROCESSOR.
Is the 1.2x rule of thumb for Ollama VRAM right?
Not as a measurement. The rule, file size times 1.2, appears in Class 11 (Class 67's calculator applies the 1.2 to parameters times bytes per parameter instead) and has no context in it. On one RTX 3060 with Ollama 0.40.2, it over-estimated all 10 models measured at the 4096 default, qwen2.5:14b by 1.32 GB; at a 32768 context, the measured size of qwen2.5:14b was 4.96 GB above it. The size grows with the context, so read size and size_vram from /api/ps for your own load.
How do I measure tokens per second in Ollama?
Divide eval_count by eval_duration and multiply by 10^9, because the API reports durations in nanoseconds; ollama run --verbose prints the result as eval rate. Do not divide by total_duration: in the one --verbose run on the PC measured here it was 5.8 s, and 5.37 s of that was loading the model. Ask the same question once cold and at least twice warm, with temperature 0, a fixed seed and a fixed num_predict, and use the warm calls. On that PC (NVIDIA GeForce RTX 3060 12288 MiB, Ollama 0.40.2), cold calls spent 4.05 to 77.4 seconds loading, and calls to a model already loaded spent 0.047 seconds or less (the two calls that reloaded the model aside).
Can a 12 GiB card give a coding agent the 64000 tokens the docs ask for?
Three loads with a 65536 context were measured on one NVIDIA GeForce RTX 3060 12288 MiB with Ollama 0.40.2, each at a different time: qwen3-coder:30b, local 64K variant, had 42.2 % on the GPU and ran 15.33 tok/s (2 warm calls, with 9349 MiB free); gpt-oss:20b, local 64K variant, had 64.3 % on the GPU and ran 31.07 tok/s (3 warm calls, with 8966 MiB free); gemma3:4b with num_ctx 65536 was fully on the GPU and ran 83.94 tok/s (2 warm calls, with 8737 MiB free). Every call carried the same short question (with a short tag in front), so the context was allocated, not filled: nothing was measured with a long prompt in it. The docs ask for at least 64000 tokens for agents and coding tools; whether any of these loads would serve an agent was not measured (no answer was graded), so measure your own card.
Does the reader on this page send my output anywhere?
No. Its own note says: "Pressing this tool's buttons sends nothing anywhere, and you can confirm that in your browser's network tab. The text you paste stays in this page; nothing here contacts your Ollama or runs a command." It reads the text in your browser and computes from it, with the formula beside each figure, and it gives no verdict on whether a model fits your card.
Is the class free, and do I need to sign up?
Yes, it is free, and you do not need to sign up or give an email address. An independent class, not affiliated with Ollama, NVIDIA or the makers of the models it measures.