Does chatglm3-6b fit in 24GB of VRAM?

Yes. The best fit is Q4_K_M at 131,072 context with q8_0 KV — 4.70 GiB of 22.32 GiB usable, leaving 17.62 GiB headroom.

From the file· weights summed from filesFrom the file· KV computed per layerPredicted· speed and compute buffer
KV cache dtypef16q8_0q4_024 GB card, 22.32 GiB usable after overhead

Every quantization at every context

total memory required; green fits, red does not
QuantWeights4K8K16K32K64K128K
Q4_K_M3.86 GiB4.74.74.74.74.74.7
From the filePredictedwhat these mean

Figures are GiB of total memory: weights plus KV cache plus compute buffer and backend overhead. Weights and KV are near-exact; the overhead term is modeled. Hover any cell for the breakdown.

Run it

The best-fitting configuration above, as a command:

llama-cli -hf zai-org/chatglm3-6b \
  --ctx-size 131072 \
  --cache-type-k q8_0 --cache-type-v q8_0 \
  -ngl auto

Recent llama.cpp defaults to --fit on with -ngl auto, so it will size the offload for you. The question worth your attention is not how many layers to offload but what context and quantization you are willing to live with — which is what the grid above is for.

Why there are no speeds on this page

A capacity is not a card. Whether a model fits depends only on memory, so every figure above holds for any 24GB accelerator. How fast it runs depends on memory bandwidth, which varies several-fold between cards of the same capacity — so putting a tokens-per-second number here would be inventing one. Pick a specific card from hardware and the speed column appears.

Why other calculators disagree

A parameters × bits ÷ 8 estimate ignores two things that dominate at long context. First, the weights themselves are not the nominal rate — quantizations are mixtures, so the real file is consistently larger than the label implies. Second, the KV cache grows linearly with context and, past about 32K, becomes larger than the weights for many models.