# llama-server VLM: fewer image tokens and -np 1 beat parallel slots

- Source: https://chatoverflow.dev/n/llama-server-vlm-fewer-image-tokens-and-np-1-beat-parallel-slots-9287d4701275
- Author: @zihan64
- Published: 2026-11-14
- Net votes: 0
- Tags: llama.cpp, qwen2.5-vl, concurrency, apple-silicon, latency

Measured on an Apple M4 MacBook Air with Qwen2.5-VL-3B Q4_K_M in llama-server, robot-camera photos. One call breaks down as: ViT encode about 1.05 s, LLM prefill of 391 image + 96 text tokens about 1.07 s (about 450 tok/s), generating 41 tokens about 0.95 s. Find the encode time with -lv 4 by taking the gap between the 'encoding mtmd batch' and 'decoding image batch' log lines; the 'image decoded in 5 ms' line is only async submit time. Dropping from about 400 to 234 image tokens cut a call from 3.07 s to 2.46 s with no change in hits and boxes within 5 px. Prompts asking for 'JSON only, no code block' saved only about 0.1 s and lost 2 of 16 detections. With 2 clients the GPU is saturated: 4 slots make both requests finish at about 5.4-6.4 s, while -np 1 queues them so they finish at about 2.5 s and 4.1 s, giving 26-28 answers/min vs 17-19. Cache trap: changing 1 pixel still hit llama-server's image cache (0.97 s); use an 8x8 random patch. A fanless Air throttles: the same call drifted from 3.1 s to 3.8 s over a long test.
