Running a 27B reasoning model locally gives you a different set of knobs than standard cloud completions. Before producing its final answer, the model generates intermediate reasoning: breaking down constraints, checking assumptions, and testing alternatives. That extra work at answer time is test-time compute, and tuning it well decides whether a local run finishes in three minutes or stalls for an hour.
Effort steers instructions, not a token cap
Many reasoning templates support explicit effort levels (low, medium, xhigh) that steer the same weights without changing parameters:
- Low: Tells the model to keep thinking brief and focused and move quickly to the answer. Best for routine, narrow tasks where extra exploration adds little.
- Medium: Adds no extra effort instruction while keeping thinking enabled. Best for ordinary work with moderate ambiguity.
- Xhigh: Tells the model to check assumptions carefully, consider alternatives, and verify before answering. Best for hard or ambiguous tasks that need double-checking.
Effort is guidance rather than a hard multiplier. xhigh tends to produce longer reasoning chains, though medium can still reason for a while and low and medium sometimes arrive at similar results.
Why more thinking does not always win
Extra reasoning helps when constraints interact, but it can also burn tokens second-guessing trivial steps. Task difficulty should choose the effort level.
In local comparisons on a focused data question, medium finished in about three minutes while xhigh took twelve to fourteen minutes. Both returned correct answers across repeated runs, except one medium run stopped after a single check while both xhigh runs verified two independent ways. That points to a practical speed-versus-thoroughness tradeoff: reserve xhigh for tasks where verification depth matters.
Reasoning budgets are a separate control
A reasoning budget (such as --reasoning-budget 512) puts a hard ceiling on the thinking portion of a turn and forces a transition to the final answer once exhausted. Effort asks how to reason; a budget caps how long thinking can continue. Small budgets lower latency, though cutting off too early risks skipping a final check.
Context room and prefix-cache reuse
Long agent sessions accumulate source files, tool output, and earlier decisions quickly:
- Around 100K tokens covers focused tasks; multi-turn agent loops benefit from ~250K when native weights support it.
- Larger active contexts still slow down generation as attention spans more history.
- Prefix-cache reuse dominates multi-turn responsiveness. Keeping the beginning of the conversation stable lets the runtime skip re-reading prior turns; changing early instructions or effort prompts mid-session breaks that reuse and forces an expensive prefill.
Model quantization vs. KV-cache quantization
Weight compression and cache compression save different parts of GPU memory:
- Model quantization shrinks stored weights so larger models fit in unified memory and move fewer bytes per generated token, at some capability tradeoff.
- KV-cache quantization compresses the attention state held over context history. A 4-bit cache takes roughly half the memory of an 8-bit cache for that component, freeing room for longer sessions without halving total memory use.
Weights, KV cache, and runtime buffers all share the same GPU budget, which is why a model file smaller than total RAM can still run out of headroom under a long agent context.
Speculative decoding and post-training
Post-trained variants aimed at agentic coding seek to trim redundant thinking tokens without blind budget truncation, while multi-token prediction (MTP) uses a draft head to propose multiple tokens verified in parallel by the target model. Combined, shorter reasoning chains and higher accepted-token throughput complement each other, provided extra draft-head memory still leaves enough context room for real sessions.
References
- llama.cpp server documentation: reasoning controls, context sizing, caching, and speculative decoding.
- Running Capable Models Locally on 48 GB Unified Memory: hardware ceiling and role-fit findings.