Local AI memory
Ollama context length and VRAM: plan for parallel requests
A model loading once does not prove it fits at a larger context or concurrency. Check Ollama context, GPU placement, parallel slots and resident models separately.
A successful load answers one configuration, not every workload.
Name the workloadKeep the model, context and concurrency together.
Inspect the runtimeCheck loaded models and CPU/GPU placement.
Change one inputRepeat the same task before drawing a fit conclusion.
Your plan, at a glance.
THE LAB BRIEF
The short answer.
Record the model, configured context, parallel slots and other loaded models before deciding that it fits. Check runtime placement and context, then change one input and repeat the workload. Combined context capacity is not an exact VRAM estimate or a larger window for one request.
- ContextRecord explicitly
- ConcurrencySeparate from model count
- Memory estimatesVerify on the target bench
Loading a model at one context and concurrency setting does not prove it will fit at larger settings. Before diagnosing an Ollama memory problem or buying a GPU, record the model, context per request, parallel slots and other loaded models. Then inspect the actual runtime placement.
This is a research-based guide for a generic GPU test bench, using official documentation checked on October 19, 2026. We have no recorded context sweep, concurrency benchmark or out-of-memory reproduction for this guide. The arithmetic below illustrates configured token capacity; it does not predict bytes, speed or whether a named card can run a model.
A successful load has a configuration
Ollama defines context length as the maximum tokens accessible to a model in memory. Its context-length guide says increasing that setting increases the memory needed to run it. A model tag alone therefore cannot describe every memory requirement for a workload.
Treat “it fits” as a bounded statement. Was the intended task completed? What context was configured? How many requests could run together? Were other models still loaded? Keep those answers beside the observation rather than carrying a fit label into a different setup.
Buying hardware after this check? The budget GPU buying guide compares checked 12 GB, 16 GB and 24 GB offers, with model-size starting points and separate historical bench results. Use the context and concurrency you actually need before paying for more VRAM.
Check the context that actually loaded
The official context guide documents the app’s context slider and the serving-process OLLAMA_CONTEXT_LENGTH setting. The FAQ also describes interactive /set parameter num_ctx and API options.num_ctx controls. These are configuration paths, not interchangeable names for concurrency.
There is a documentation mismatch worth handling explicitly: the current context guide gives VRAM-based defaults, while the FAQ gives a single default. Check the installed version and client configuration rather than assuming a universal value. Set the intended context explicitly for the proposed test, then inspect what loaded.
Run the read-only command:
ollama ps
Record its CONTEXT and PROCESSOR output alongside the configured per-request context and parallel slots. Ollama documents this command for checking context and CPU/GPU placement. Do not infer a single request’s usable window merely by treating every reported capacity as the same quantity.
For a structured record, the running-models API shows model entries with fields including quantization_level, size_vram and context_length. Its example response is illustrative, not a benchmark for the example model. Preserve field names and units in your own notes instead of replacing the model-level record with a claim about all free memory on a board.
Separate parallel slots from resident models
The Ollama FAQ distinguishes multiple loaded models from parallel requests handled by a given model. OLLAMA_MAX_LOADED_MODELS caps concurrent model residency when memory permits; OLLAMA_NUM_PARALLEL controls parallel requests per model. num_ctx controls context, not parallel-request count.
For insufficient memory to load a new model while others are resident, the FAQ describes queueing and unloading idle models. That does not mean every memory failure has the same cause or outcome.
In a proposed check, separate “the same model with more request slots” from “another model loaded too.” If both change, a different allocation or delay cannot be attributed to context alone. Record whether a request completed, waited or failed, rather than grouping every symptom under “out of memory.”
Multiply token capacity, not total VRAM
The FAQ explains that parallel processing increases context allocation with request count. The following chosen scenarios apply that relationship: context per request multiplied by parallel slots gives a combined configured context capacity.
| Context per request | Parallel slots | Combined context capacity |
|---|---|---|
| 2,048 tokens | 1 | 2,048 tokens |
| 2,048 tokens | 4 | 8,192 tokens |
| 8,192 tokens | 4 | 32,768 tokens |
These products are recomputed in code. They describe an illustrative capacity budget across slots, not tokens actually consumed, measured allocation, or a larger window for an individual request. They also do not establish the same multiplier for total VRAM. There is no conversion from these rows to a universal GPU-memory requirement.
Use the table to spot a configuration change that needs retesting. To obtain a byte figure, observe the specific model and runtime configuration on the target hardware. Keep the arithmetic result and the measured record as separate evidence.
Run a controlled fit check
For a proposed bench trial, record:
- Ollama version, model tag or digest, and weight quantization.
- GPU capacity, configured per-request context, parallel slots and other loaded models.
- The same public or synthetic input and the criterion for a useful answer.
- Runtime context and placement, any structured memory record, and request success, queueing or errors.
Start from an explicit configuration and change context, parallel slots or model residency separately. Preserve the before-and-after records. If a client adds its own context option, include it in the record rather than assuming a server setting explains everything.
This is a proposed comparison method. A throughput or latency conclusion would require timed runs with a stated method; none is supplied here. A successfully loaded model also still needs to complete the intended task before the configuration earns a useful fit label.
For a timing comparison after the fit check, the Ollama API timing guide keeps generation rate separate from loading, prompt processing and first useful content at the client.
Decide what to change next
If the task works with a smaller context, that is a configuration candidate to validate. If it needs more simultaneous work, test that concurrency explicitly. If multiple models are the requirement, include their residency in the trial. Let the required task determine the experiment instead of prescribing a context size for every reader.
Once memory placement and task success are established, the NVIDIA power-limit guide addresses a separate tuning decision. A power-cap result cannot establish context capacity, and a context-capacity calculation cannot establish tokens per second.
Sources & methodology
Where these facts come from.
- Ollama — context length and runtime inspection · checked October 19, 2026
- Ollama FAQ — context controls, concurrency and model residency · checked October 19, 2026
- Ollama API — list running models and response example · checked October 19, 2026
Source dates are listed above.
Prepared by Racks & Watts.