ProBackend
AI Models
4 hours ago8 min read

AI Model Local Deployment: A Production Checklist for llama.cpp Forks

AI Model Local Deployment: A Production Checklist for llama.cpp Forks

A deployment checklist for parser tolerance, prompt-cache isolation, queued Vulkan requests, and reasoning controls. November 2026 measurements show why decode speed alone is not a readiness test.

AI model local deployment starts after the speed test

A fast decode number is a useful measurement. It is not a production verdict. In this November 2026 bench, a custom llama.cpp fork produced respectable rates on an RTX 4070 and still failed the structured-output lane; a separate Vulkan binary served one request, then died when the first queued batch arrived. The bottleneck was not the headline token rate. It was whether the surrounding serving path survived ordinary inputs and concurrency.

Setup. Two-card workstation: an RTX 4070 12 GB (CUDA) and a Radeon AI PRO R9700 32 GB (Vulkan) in one box; custom llama.cpp forks; model: Olala-v1.0-mini-7A1B q5_k_m; tested November 2026. The fork models required their own llama.cpp builds, so they did not run under the equal-settings recipe used for the rest of the bench. These are fork-run results, not a controlled comparison against other models.

On the RTX 4070, Olala-v1.0-mini-7A1B q5_k_m measured 48.2 tok/s decode with llama-bench tg128 and 44.7 tok/s through HTTP. Prefill was 2,034 tok/s with llama-bench pp512 and about 940 tok/s over HTTP. The footprint was 5.57 GiB, 6.99 GiB at 32K context, and 7.05 GiB under load. The A5 cell recorded 389 ms TTFT, 58.22 tok/s decode, and 3.17 s median / 4.84 s p95 total time.

Those figures tell an operator the fork can generate and fit the tested workload. They don't establish that it can parse the output format, isolate reusable prompt state, or handle a queue. The standard llama.cpp server documents capabilities including parallel decoding, continuous batching, and schema-constrained JSON; those are server features to validate in the actual fork build, not a guarantee that a custom parser or backend behaves correctly. See the llama.cpp server documentation.

Test parser tolerance at the token limit

The first deployment gate is not “does a valid answer parse?” It is “what happens when generation reaches its limit in the middle of a format the parser expects?”

In this run, the coding cell set max_tokens=512. The model stopped at 543 tokens while still inside its analysis channel. The fork's peg-native parser returned HTTP 500 with the message that output did not match the expected peg-native format. The request surfaced unparsed analysis content rather than a usable response. A structured-output lane that turns a bounded answer into a server error is not ready, even if its unconstrained decode looks healthy.

The obvious flag changes did not clear the issue. Six coding-cell requests passed 6/6 with --reasoning-format none and 6/6 without --jinja, but a 64-token routing-style request still returned 500 under both settings. The real A2 routing lane, with 40 utterances and max_tokens=64, aborted; A3 multiturn failed as well. In other words, those flags moved the truncation boundary, not the parser's failure mode. That distinction matters when you are deciding whether to ship a workaround.

A practical parser check should include at least:

  • A response that ends cleanly within the token budget.
  • A response truncated while still in a reasoning or metadata channel.
  • A short, 64-token routing-style request, not only longer coding prompts.
  • The real structured-output and multiturn lanes, rather than a hand-picked successful sample.
  • An assertion that malformed or incomplete output is handled as a controlled parse failure, not an HTTP 500 that aborts the lane.

This is a deployment test, not a model review. Keep the parser, HTTP status, response body, and generation stopping point in the same test record. Otherwise a passing sample can conceal the specific boundary condition that broke the lane.

Treat prompt-cache reuse as a correctness boundary

The Olala fork required --no-prompt-cache. With prompt caching enabled, the speed lane aborted with cache-contaminated request: cached_n=283 prompt_n=84. The right operational response is not to dismiss the guard as a benchmark nuisance. The harness had detected a mismatch between the cached prefix and the current prompt and refused to continue.

A related failure appeared for K2-Horizon in the main run: its chat template dropped the system turn, so every prompt began with the same 8 tokens. llama.cpp reused that prefix, and the harness's contamination guard—cached greater than prompt divided by eight—aborted the cell. For K2 only, the suite used --no-prompt-cache, sending cache_prompt=false so each prefill was cold. The reuse threshold stayed unchanged and remained armed for other models.

That distinction is useful in production. Disabling a cache can be a safe diagnostic or containment setting, but it changes the serving path: each prefill is cold, so don't quote cached-path expectations for a run configured this way. More importantly, confirm the template actually includes the turns and boundaries you intend. llama.cpp's server interface and options are documented in the server README; the behavior of a custom fork still needs its own checks.

Before enabling reuse, run prompts with different system and user content, inspect what prefix the server considers reusable, and verify that cache hits cannot cross request boundaries in a way your harness flags. Record both the cache setting and the observed cache/prompt counts. A green speed test with the guard switched off is evidence of throughput under that configuration—not evidence that the cache is safe.

Queue a second Vulkan request before trusting the lane

The R9700 Vulkan fork binaries served a single request, then died on the first queued batch. After restart, no request boundary was idle within 5 seconds. The adapter continued to report OK, so the team stopped the lane and recorded a deviation. The evidence points to an engine fault in that fork lane, not a card fault; it does not support a broader claim about all Vulkan builds or Radeon hardware.

This is why a single-request smoke test is too weak. The first response can look perfect while the server is already unable to process the next unit of work. A minimum queue test should send one request, then a second queued request, observe the server through the request boundary, and verify that it remains available for another request. Keep adapter health separate from server health: an OK adapter signal did not mean this lane was serving.

The upstream llama.cpp server documentation lists parallel decoding and continuous batching as capabilities, but a custom fork's implementation and backend combination must be exercised directly. See the llama.cpp server README. Do not infer batched readiness from compilation, a successful first response, or an adapter status line.

Use the reasoning control that changes behavior

The fork tests found that --reasoning-effort was the flag that actually worked. Setting LLAMA_ARG_CHAT_TEMPLATE_KWARGS='{"enable_thinking":false}' alone left the thinking template active. By contrast, --reasoning-effort disabled cut a GSM8K answer from roughly 1.5k tokens to a number.

That result is narrow: it describes these fork runs and does not prove the flag behaves identically in every build or prompt. Still, it gives operators a concrete configuration check. Compare the emitted output and token use with the flag absent and present; don't assume a template variable took effect because the server accepted it. Then rerun the short parser lane. Shorter reasoning output may avoid one truncation case, but the 64-token routing failures show why that is not a substitute for parser validation.

How to deploy an AI model without trusting one metric

Treat the checklist as release gates, not optional diagnostics:

  1. Pin the build and settings. Record the fork, backend, model quantization, server flags, and request path. These fork models used their own builds and were not on the bench's equal-settings recipe.
  2. Measure both benchmark and HTTP paths. Here, decode was 48.2 tok/s in llama-bench and 44.7 tok/s through HTTP; prefill was 2,034 tok/s versus about 940 tok/s. The difference is precisely why the serving path deserves its own measurement.
  3. Exercise truncation and structure. Include a 512-token coding request and the actual 64-token routing-style lane; check parser behavior when the answer ends inside analysis.
  4. Run cache guard cases. Test distinct prompt prefixes and the exact chat template. If cache is disabled, record that cold-prefill behavior is the deployed configuration.
  5. Queue work on every backend. A first request is not enough. Confirm a second queued request completes and the server returns to an idle boundary.
  6. Verify reasoning controls by output. In this fork, --reasoning-effort disabled changed output while the template kwargs setting alone did not.
  7. Separate adapter health from service health. The Vulkan adapter reported OK despite the server lane dying after a single request.

Some teams call the orchestration layer agentic AI; the label doesn't change the deployment test. Whether a system routes tools or returns a plain structured answer, the serving contract still needs to tolerate truncation, keep prompt state isolated, and survive queued work. Don't let a trend label stand in for an operational acceptance test.

What this evidence does and does not show

The result is clear enough for a deployment decision: decode rate is not the gate. Parser tolerance, prompt-cache behavior, and queued Vulkan handling were. Test the 64-token structured lane and the second queued request before trusting a fork in production.

The evidence is bounded. These are the authors' own measurements from one machine, one server build, and one test suite in November 2026. Raw logs and configuration files are not publicly linked, so independent replication is not implied. The figures are not a general ranking or recommendation; results vary with hardware, software version, settings, and load. The public llama.cpp documentation helps describe server capabilities, but it does not independently verify these fork measurements.

Disclaimer. These are measurements from one machine, one server build, and one test suite on the stated date. Results vary with hardware, software version, settings, and load. They are not a general ranking or a recommendation.

Related reading: AI model local deployment: budget the KV cache, not just the weights.

ai model local deployment starts after the speedai model local deployment starts after the speed