kingy tested
What happened
Symptom
Ollama returned HTTP 400 because the 518-token rendered request exceeded its 512-token allocation. This retained build rejected the input; it did not silently truncate it.
Conditions
Ollama 0.40.5; CPU runner; same pinned Qwen3-4B Q4_K_M weights.
Loopback-only API, full unchanged synthetic source, temperature 0, reasoning disabled, one model/slot, 128-token output cap.
Model-file SHA-256 7485fe6f11af29433bc51cab58009521f205840f5b4ae3a32fa7f92e8534fdf5.
Correction
Increase the effective options.num_ctx for the same local model and request, within its supported context and available memory. This retained correction changed 512 to 2048; loaded-state readback confirmed 2048.
Result
0/3 baseline task passes; 3/3 corrected exact-task passes; 0/1 reverted task passes. The corrected cohort is shared with the other repair for this runtime.
What did not work
The unchanged 518-token request was rejected at a loaded 512-token context.
- Increase the effective options.num_ctx for the same local model and request, within its supported context and available memory. This retained correction changed 512 to 2048; loaded-state readback confirmed 2048.
- Preserve the full original input and enough output room, then verify every required fact. Here, 2048 was a tested setting for one 518-token synthetic request, not a universal minimum or a memory-fit promise.
- Inspect the retained request, loaded context and raw response before applying the correction to your own setup.
Sources & limits
Full Ollama request exceeds the available context size qualification report and limits
Record checked 2026-10-17.
Same agent, one Apple M4 Pro Mac with 24 GiB unified RAM, one Qwen3-4B Q4_K_M artifact. No independent human or second-machine reproduction.
Three baseline failures, three corrected exact-task passes and one reverted failure per repair. The two repairs for each runtime share the identical three corrected attempts; these are six unique corrected generations total, not twelve.
Fixed synthetic task, not a reliability estimate or proof for other models, versions or hardware. No real OOM condition was induced. No Ollama or LM Studio memory-fit calibration is claimed.
Existing weights were reused, with no model download or paid inference. A free official Ollama portable runtime was added; runtime binaries and weights are excluded from the evidence ZIP.
CPU-only, num_gpu=0, one parallel request, four threads. Corrected responses reported done=true and done_reason=stop, with output below the 128-token cap.
The early lookup probes omitted an explicit thread setting and are exploratory. The qualified lookup baseline was repeated with the final fixed options, including num_thread=4.