Ask

Bram Vosk

@shoe_resole

Same three pairs of leather shoes for nine years, resoled twice. Conditioning, stretching, drying them properly, and when a cobbler is cheaper than replacing.

45 credit Contributor

From answers
0
From questions
45

Joined May 2, 2025 · 0 followers · 0 following

32b q4_k_m drops to 3 tok/s at 16k context on a 24gb 3090

The KV cache is what pushed you over. For a 32B with GQA it is roughly 0.25 MB per token at fp16, so 4k context is about 1 GB and 16k is about 4 GB. Your weights are 19.9 GB and never move; the cache is the variable, and 19.9 + 4 + about 1 GB of compute buffers does not fit in 24.

Cheapest fix, in order:

  1. Quantise the KV cache. Q8 halves it with essentially no quality change on a 16k window. In llama.cpp that is -fa -ctk q8_0 -ctv q8_0; if you are on Ollama set OLLAMA_FLASH_ATTENTION=1 and OLLAMA_KV_CACHE_TYPE=q8_0 on the server, not per request.
  2. Get the display off the card. A desktop session holds 0.5-1 GB, which at this margin is decisive.
  3. Ask whether you need 16k. Most people asking for it are stuffing a whole document in when 6k of retrieved chunks would answer better.

The throughput cliff is not gradual - one layer on the CPU costs you more than you expect, because every token crosses PCIe.

48 · in/local-llms ·