What GPU do I need to run zai-org/GLM-OCR?
1.3B parameters, published in BF16. View on Hugging Face
GLM-OCR is published by zai-org on Hugging Face, with 2,104,188 downloads and 2,009 likes to date. It's a GlmOcrForConditionalGeneration model built for image-text-to-text, published natively in BF16.
VRAM required & cheapest live GPU fit
Required VRAM = weight size at each precision times a flat 1.2 overhead for activations and fragmentation. The KV-cache grows with context and is not in that factor; it is listed per model below where the architecture is published. Full formula and assumptions: methodology.
| Precision | Weight size | Required VRAM | Cheapest live fit | GPUs needed | Est. $/hr (full fit) |
|---|---|---|---|---|---|
| BF16 | 2.5 GB | 3.0 GB | RTX 3060 | 1 | $0.110/hr |
| FP8 (quantized) | 1.2 GB | 1.5 GB | RTX 4000 SFF Ada | 1 | $0.198/hr |
| INT4 (quantized) | 0.6 GB | 0.7 GB | RTX 3060 | 1 | $0.110/hr |
A GPU is only matched to a row if its hardware supports that precision, and the primary recommendation is always a single-GPU fit when one exists.
INT4 requires a quantized checkpoint actually published for this model, check its Hugging Face page before relying on this row.
Cheapest way to run GLM-OCR at its published (BF16) precision: 1× RTX 3060, at $0.110/hr per GPU ($0.110/hr total). Quantizing to FP8 or INT4 (rows above) can cost less, but requires a compatible quantized checkpoint to exist for this model.
GLM-OCR: KV cache by context length
The KV cache is the memory the attention layers hold for every token of context, on top of the weights. It is not part of the flat 1.2x overhead in the table above, grows with context length and with every concurrent request, and is why a long-context deployment needs more VRAM than the table shows.
Grouped-query attention: every layer caches keys and values for a few shared KV heads. Cached per token: 65,536 bytes at 16-bit.
| Context | KV cache, one sequence |
|---|---|
| 4K | 0.25 GB |
| 32K | 2.0 GB |
| 128K | 8.0 GB |
Computed from the layer, head and window counts in the model's own configuration (zai-org/GLM-OCR), at 16 bits per cached value. Each concurrent sequence needs its own cache, on top of the weights.
GLM-OCR: common questions
How much VRAM does GLM-OCR need?
3.0 GB at BF16, 1.5 GB at FP8 (quantized), 0.7 GB at INT4 (quantized). All of those sit under 6 GB, the smallest capacity this page reasons about, so VRAM is not what limits where this model runs. The 2.5 GB of weights plus inference overhead is the whole requirement.
How many copies of GLM-OCR fit on one RTX 3060?
4, by VRAM alone. That card carries 12.0 GB and one copy needs 3.0 GB at BF16, on a live rate of $0.110/hr for the whole card. Throughput is not modelled here, so 4 copies is not 4 times the requests served.
Weight-to-VRAM math, the fit rules, and how live prices are normalized: full methodology.
More zai-org models
- GLM-ASR-Nano-2512 (2.3B, BF16)
Alternatives at this size
Other models for image-text-to-text within about a third of GLM-OCR's 1.3B parameters, from other model lines.
- moondream2 (1.9B, BF16)
- HunyuanOCR (1.1B, BF16)
- llava-onevision-qwen2-0.5b-ov-hf (894M, F16)
- InternVL2-1B (938M, BF16)
- MiniCPM-V-4.6 (1.3B, BF16)
More on GLM-OCR
Fits on an 8 GB GPU at BF16: every model that fits in 8 GB.
Best vision-language models: how GLM-OCR ranks against the rest.
Best OCR and document parsing models: how GLM-OCR ranks against the rest.
Related reading: H100 pricing and specs, How much VRAM you need for LLMs, Serving LLMs with vLLM, vLLM vs TensorRT-LLM vs SGLang, and Best GPU for LLM inference.