Skip to content

Class 104 · Intermediate · Free, no signup · Written by Claude Opus 5.5

Ollama VRAM: a 14B model ran 21.58 tok/s at 4K context and 8.85 at 32K

On one shared RTX 3060 (12288 MiB), Ollama 0.40.2 gave qwen2.5:14b 9.47 GB, all of it on the GPU, at a 4096 context and ran it at 21.58 tok/s; at 32768 the model took 15.75 GB, 66.4% stayed on the GPU and it ran 8.85 tok/s. Two warm calls each, measured 2026-10-12.

An independent class, not affiliated with Ollama, NVIDIA or the makers of the models it measures.

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

  1. You get 4096 unless you ask. All 9 models with no num_ctx got a 4096 context here, whatever they support; Ollama's pages give three different defaults.
  2. Context costs memory, and the formula is in /api/show. The formula gives qwen2.5:14b 196,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.
  3. 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).
  4. 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/show and 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).
  5. 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).
  6. 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:14b at 32768. Read your own load instead.
Module zero · 4 min

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.

context every model got with no num_ctx set40969 of 9 models, and gemma3:4b in a first run before the bench
qwen2.5:14b, warm eval rate, context 4096 then 3276821.58 → 8.85tok/s, 2 warm calls per context
qwen2.5:14b on the GPU, context 4096 then 32768100 % → 66.4 %of 9.47 GB, then of 15.75 GB
VRAM in use before any model loaded4916 / 12288MiB, read by nvidia-smi

Measuredn = 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:14b as /api/ps reported them after a cold call at three values of num_ctx from 4096 to 32768, and the eval rate of the warm calls that followed.
Method
One load per context, with num_ctx in the request: 1 cold call, then 2 warm calls with the same short question and a budget of 200 tokens (num_predict). The rate is eval_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/ps reads 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_vram divided by size. Spill (offload): the rest, in system RAM, because it did not all go to the GPU.
  • ollama ps and /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_count divided by eval_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.

Module one · 6 min

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

WhereWhat 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_ctx parameter:"
  • Per model. PARAMETER num_ctx 32768 in a Modelfile, built into a variant (Class 67 covers Modelfiles).
  • Per server. The FAQ: "This can be overridden with the OLLAMA_CONTEXT_LENGTH environment 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.

Interactive · Decidercase 1 of 8

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.

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/ps read after each cold call of the bench (73 measured /api/chat calls); ollama ps after one ollama run of gemma3:4b; /api/show model_info for 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_ctx in the request; 1 run of gemma3: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).
Interactive · Anatomyregion

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

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.

Module two · 7 min

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).

Two sweeps of num_ctx One PC (RTX 3060, 12288 MiB), Ollama 0.40.2, 2026-10-12; num_ctx set in the request; n = 2 warm calls per context; each load's free MiB is in the label strip under the figure. qwen2.5:14b: 4,096 tokens: 9.47 GB in all, 9.47 GB on the GPU, none in system RAM, KV cache by the formula 0.81 GB, 100% on the GPU, 21.58 tok/s; 16,384 tokens: 12.42 GB in all, 10.51 GB on the GPU, 1.91 GB in system RAM, KV cache by the formula 3.22 GB, 84.6% on the GPU, 14.04 tok/s; 32,768 tokens: 15.75 GB in all, 10.45 GB on the GPU, 5.30 GB in system RAM, KV cache by the formula 6.44 GB, 66.4% on the GPU, 8.85 tok/s. gemma3:4b, all on the GPU: 4,096 tokens: 2.88 GB, 84.11 tok/s; 16,384 tokens: 3.05 GB, 84.24 tok/s; 32,768 tokens: 3.08 GB, 84.33 tok/s; 65,536 tokens: 2.94 GB, 83.94 tok/s. The violet KV figure is drawn on the model's size bar only; which bytes sat in system RAM was not measured. Two sweeps of num_ctx Each load set num_ctx in the request; the free VRAM differed from load to load; the rate is the median of 2 warm calls. Same GB scale for both models. on the GPU in system RAM KV cache, by the formula the model's size qwen2.5:14b The model grew with the context; the part past what the GPU held sat in system RAM. 4,096 tokens, KV 0.81 GB 21.58 tok/s 100% GPU 9.47 GB 9.47 GB none in system RAM 16,384 tokens, KV 3.22 GB 14.04 tok/s 84.6% GPU 12.42 GB 10.51 GB 1.91 GB 32,768 tokens, KV 6.44 GB 8.85 tok/s 66.4% GPU 15.75 GB 10.45 GB 5.30 GB 0 5 10 GB gemma3:4b It barely grew. Its /api/show lists a sliding-window field; READ: we take that as part of its cache keeping a fixed window, so no per-token KV figure applies and no violet is drawn. All of it on the GPU at every context. 4,096 tokens 84.11 tok/s 100% GPU 2.88 GB 16,384 tokens 84.24 tok/s 100% GPU 3.05 GB 32,768 tokens 84.33 tok/s 100% GPU 3.08 GB 65,536 tokens 83.94 tok/s 100% GPU 2.94 GB 0 5 10 GB One PC (RTX 3060, 12288 MiB), Ollama 0.40.2, 2026-10-12. Violet is the formula's KV figure, part of the model's size; which bytes sat in system RAM was not measured.
Two sweeps, one change: 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.

Interactive · Ledgerclaim 1 of 7

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.

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/ps size and size_vram after 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/chat replies and /api/ps reads on one PC: NVIDIA GeForce RTX 3060, 12288 MiB, driver 610.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).
Interactive · Prompt Diffclause

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).

as asked
POST /api/chat
{
  "model": "qwen2.5:14b",
  "messages": [{"role": "user", "content": "your question"}],
  "stream": false
}
as specified

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.

Module three · 6 min

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.

The GPU share does not predict speed A dot plot of the 20 measured loads on one PC (RTX 3060, 12288 MiB, Ollama 0.40.2, 2026-10-12): x is the share of the model on the GPU (size_vram over size), y the warm rate in tokens per second on a log scale. 11 loads sat all on the GPU (cyan) and 9 partly in system RAM (amber). Loads: llama3.1:8b at 4,096 tokens, 100% on the GPU, 58.06 tok/s; mistral-nemo at 4,096 tokens, 100% on the GPU, 39.43 tok/s; gemma4:12b at 4,096 tokens, 100% on the GPU, 19.24 tok/s; qwen2.5:14b at 4,096 tokens, 100% on the GPU, 18.01 tok/s; gpt-oss:20b at 4,096 tokens, 75.5% on the GPU, 16.30 tok/s; qwen2.5:14b at 4,096 tokens, 100% on the GPU, 21.58 tok/s; qwen2.5:14b at 16,384 tokens, 84.6% on the GPU, 14.04 tok/s; qwen2.5:14b at 32,768 tokens, 66.4% on the GPU, 8.85 tok/s; qwen3-coder:30b at 4,096 tokens, 55.6% on the GPU, 29.78 tok/s; gemma3:4b at 4,096 tokens, 100% on the GPU, 84.11 tok/s; gemma3:4b at 16,384 tokens, 100% on the GPU, 84.24 tok/s; gemma3:4b at 32,768 tokens, 100% on the GPU, 84.33 tok/s; gemma3:4b at 65,536 tokens, 100% on the GPU, 83.94 tok/s; gpt-oss:20b, local 64K variant at 65,536 tokens, 64.3% on the GPU, 31.07 tok/s; gemma4:latest at 4,096 tokens, 100% on the GPU, 64.26 tok/s; devstral at 4,096 tokens, 69.5% on the GPU, 3.29 tok/s; qwen3-coder:30b, local 64K variant at 65,536 tokens, 42.2% on the GPU, 15.33 tok/s; qwen2.5-coder:14b at 4,096 tokens, 100% on the GPU, 30.04 tok/s; qwen2.5-coder-14b-32k at 32,768 tokens, 66.4% on the GPU, 8.01 tok/s; devstral, local 48K variant at 49,152 tokens, 46.6% on the GPU, 3.67 tok/s. The qwen2.5:14b sweep is joined in context order. Units ran minutes to hours apart; the same model's speed moved 1.2x in 36 minutes. The GPU share does not predict speed The 20 measured loads: the share of each model on the GPU against its warm rate. all on the GPU: 11 loads partly in system RAM: 9 loads warm tok/s, log scale 2 5 10 100 0% 100% share of the model on the GPU qwen3-coder:30b 55.6%, 29.78 tok/s devstral 69.5%, 3.29 tok/s qwen2.5-coder:14b 100%, 30.04 tok/s qwen2.5-coder-14b-32k 66.4%, 8.01 tok/s qwen2.5:14b sweep 4,096 to 32,768 tokens One PC, units minutes to hours apart; the same model's speed moved 1.2x in 36 minutes.
The share on the GPU against the warm speed, all 20 loads. Cyan dots were fully on the GPU, amber dots spilled. The 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.

Our model left /api/ps
2 of 73 callsTwo warm calls found our model gone, with no unload by the bench, and loaded it again; /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.
The two meters disagree
9 of 20 loadsThe 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
1 of 4 sweep loadsIts /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.
A 64K variant ran faster
31.07 against 16.3 tok/sgpt-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.

Interactive · Huntround 1 of 3

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.

Round 1 of 3measured
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?

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:14b at 32768 (the bench's second block), qwen3-coder:30b and 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/ps size and size_vram after the cold call; the median warm eval rate; /api/show model_info for 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.
Interactive · Instrumentlive

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.

tokens
Seconds to generate, once loaded
—seconds

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.
Module four · 9 min

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.

qwen2.5:14b, the context set in the request: what the API and the warm calls showed
Context (num_ctx)Size, GBOn the GPU, %Warm eval rate, tokens/s
40969.4710021.58
1638412.4284.614.04
3276815.7566.48.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.

From this class's PC (real)
Constructed, or the vendor's own example

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 ps sample. gemma3:4b, with no num_ctx set anywhere, shows CONTEXT 4096 and 100% 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/ps read. The card shows 66.4 % of qwen2.5:14b on 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, Ollama 0.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:12b reply. Its content is empty: the 200-token budget went to the thinking field, as in all 4 of its calls here (697 to 721 characters each), and eval_count counts those tokens. The thinking page: "Thinking-capable models emit a thinking field 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.

Module five · 5 min

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 saidThis 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 ps prints two more columns, CONTEXT and RUNNER (llamacpp here). The context-length page shows CONTEXT, the FAQ still shows NAME ID SIZE PROCESSOR UNTIL, and no docs page shows RUNNER.
  • 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, since v0.17.0.
  • Automatic fit. The installed ollama serve --help lists LLAMA_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.2 describes: "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, and v0.40.3 paused the upgrade for embedding and other request performance. Here /api/show returned a manifests field, which the API schema does not document, for 1 of 17 models: gemma3:4b, run once before the bench began, with 2 entries, runner ggml and runner llamacpp (selected), the two runners the v0.40.2 note'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.

Interactive · Decidercase 1 of 7

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.

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/ps context_length, size and size_vram after each cold call; median warm eval rates; the file size from /api/tags times 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).
Module six · 6 min

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.

  1. See what already holds the GPU. Run nvidia-smi --query-gpu=memory.used,memory.total --format=csv and ollama 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 PC nvidia-smi printed N/A for every program's memory: count, do not name.
  2. Wait for a quiet GPU. The bench's rule: two reads of utilization.gpu 20 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.
  3. Load with the context the job needs: num_ctx in the request's options, as the FAQ shows; then read PROCESSOR and CONTEXT in ollama ps. It set the context in 7 of 7 loads here.
  4. Ask the same question once cold and at least twice warm, with temperature 0, a fixed seed and a fixed num_predict (the bench used 200 tokens). Durations are in nanoseconds (the usage page), and the API reference in the v0.40.2 source says: "To calculate how fast the response is generated in tokens per second (token/s), divide eval_count / eval_duration * 10^9."
  5. Raise num_ctx in steps and watch the size, PROCESSOR and 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.
  6. 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.
  7. Unload with keep_alive 0 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.

Interactive · Forgelive

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.

Interactive · Gate Runnercandidate 1 of 6

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).

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/ps reads 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/ps context_length and size_vram / size after 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 the qwen3-coder:30b variant, 3 for the gpt-oss:20b variant and 2 for gemma3:4b at 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.
Interactive · Setup Checkeryour path

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.

  1. See what already holds the GPUollama ps lists the models loaded now; with an NVIDIA card, nvidia-smi --query-gpu=name,memory.used,memory.total,utilization.gpu --format=csv shows 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.)
  2. 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.)
  3. Wait for a quiet GPUThe bench's rule: two reads of utilization.gpu 20 s apart, both under 15 %, and no model in ollama ps that 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.)
  4. Measure speed: once cold, twice warmollama run <model> --verbose (“Show timings for response”) with the same question each time, or the API with temperature 0, a fixed seed and a fixed num_predict; the rate is eval_count / eval_duration. The bench gave each call 200 tokens. (Source: vq.help.verbose, rep.bench.num_predict.)
  5. Measure the context and its memorySend num_ctx in the request (the FAQ: “When using the API, specify the num_ctx parameter:”), then read ollama ps: SIZE, PROCESSOR and CONTEXT. Raise it in steps and compare within one sweep. (Source: vq.faq.num_ctx_api.)
  6. NVIDIA: check the driver“Ollama supports Nvidia GPUs with compute capability 5.0+ and driver version 550 and newer.” This PC: driver 610.88, Ollama 0.40.2. (Source: vq.gpu.nvidia_req, meas.gpu.driver.)
  7. 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% CPU means the model was loaded entirely in system memory”. (Source: vq.win.native, vq.faq.proc_cpu.)
  8. Write it downBeside every number: the free VRAM before the load (memory.total minus memory.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.)
  9. Unload when you are doneSend keep_alive 0: 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

Module seven · 2 min

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.

  1. Any other machine: another GPU, driver, operating system or Ollama version.
  2. Speeds on an idle GPU. The GPU was never quiet for long, and nvidia-smi listed 39 to 44 rows in its compute-app table before each load.
  3. Answer quality. No answer was graded.
  4. 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 --think levels were not measured.
  5. Three skipped tests. deepseek-r1:8b, skipped by a fault in the bench's scheduling and not retried; the context sweep for llama3.1:8b and the default-context test of gemma3: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.
  6. 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.
  7. How much GPU memory each other program held. On this PC nvidia-smi printed N/A for every program's memory, so only the count of rows is known.
  8. Cached prompt tokens. Whether prompt_eval_count includes tokens read from the cache: the v0.30.2 release note says the llama.cpp backend now counts them, and the usage page says prompt_eval_duration covers only the uncached ones, so a warm prompt rate may overstate.
  9. The background upgrade: whether it touched any cold load timed here.
  10. Why UNTIL read 14 minutes. The documented default keep-alive is 5 minutes; this server's keep-alive setting was not read.
  11. KV cache types and parallel requests. q8_0, q4_0 and OLLAMA_NUM_PARALLEL are documented, not measured.
  12. The Windows file cache, which was not controlled during cold loads.
  13. The vendor pages after 2026-10-12, when they were saved.
  14. 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.