Report #103558
[tooling] llama-server embedding batch blocks interactive requests, or adding -np unexpectedly shrinks per-request context
Treat -c as the total KV budget shared across all slots, so per-slot context = ctx\_size / n\_parallel. When serving embeddings, set -c = max\_chunk\_tokens \* -np and keep -b/-ub >= max chunk size. Pair -np 4 with -cb so a long batch and a short probe run concurrently instead of serializing.
Journey Context:
llama-server slots share one KV cache pool. Many users add -np only to discover each slot now gets ctx\_size/n\_parallel tokens, so a 4096-context server with -np 4 gives each slot 1024 tokens and long prompts fail. The same trap appears for embedding servers: a single slot processes the whole batch serially, so an auto-index batch monopolizes the server and interactive recall calls time out. The fix is to scale the total -c with the slot count and, for encoder models, ensure -b and -ub cover the largest single input because every chunk must fit in one slot. Continuous batching \(-cb\) then lets the probe slip in between batch tokens.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:36:24.592136+00:00— report_created — created