LightOnOCR-3 4B VRAM requirements
LightOnOCR-3 4B needs about 3.59 GB of VRAM at Q4_K_M with 8K context, so it fits an 8 GB card such as the RTX 4060 8GB. LightOnOCR-3 4B has 4.5B parameters (LightOn's OCR model on the Qwen3.5-4B vision-language architecture; 333,514,240 of them are the vision encoder). With the same 8K context and one request it needs 5.43 GB at FP8 and 10.1 GB at FP16/BF16. The published weights take 8.46 GB (BF16). The smallest setup here that holds it at Q4_K_M with an 8K context is the RTX 4060 8GB; on one 24 GB RTX 3090 / 4090 it runs with its full 256K-token context.
3.59 GB at Q4_K_M, 8K context, one request
- FP8
- 5.43 GB
- FP16 / BF16
- 10.1 GB
- Published weights
- 8.46 GB
- Smallest setup, Q4_K_M
- RTX 4060 8GB
Worked example: LightOnOCR-3 4B with 32K tokens
Inputs: LightOnOCR-3 4B · Q4_K_M weights · 32,768 tokens of context · one request · FP16 KV cache
- Weights (4.5B at Q4_K_M)
- 2.56 GB
- KV cache (32 KB per token)
- 1.00 GB
- Buffers and runtime (0.5 GB + 10%)
- 876 MB
- Total
- 4.41 GB
The smallest setup here that holds it is the RTX 4060 8GB, with about 3.59 GB to spare. Change the inputs in the calculator
What makes LightOnOCR-3 4B's memory use different
24 of its 32 layers keep a fixed-size linear-attention state, so the cache grows by 32 KB per token where caching every layer would take 128 KB.
Per token of context it adds 32 KB of FP16 cache; Granite 4.2 3B (3.7B), the nearest-sized model here with plain full attention, adds 80 KB, so LightOnOCR-3 4B needs 40% as much.
How much VRAM does LightOnOCR-3 4B need?
LightOnOCR-3 4B needs 3.59 GB at Q4_K_M, 5.72 GB at Q8_0 and 10.1 GB at FP16 with 8,192 tokens of context and one request. Each total below is the weights plus the FP16 KV cache and the runtime overhead (0.5 GB plus 10%), and each row opens the calculator with that setting. What the GGUF names mean.
| Precision | Weights | Total | Smallest setup |
|---|---|---|---|
| As published (BF16) | 8.46 GB | 10.1 GB | RTX 3060 12GB |
| FP16 / BF16 | 8.46 GB | 10.1 GB | RTX 3060 12GB |
| FP8 / INT8 | 4.23 GB | 5.43 GB | RTX 4060 8GB |
| INT4 (AWQ / GPTQ) | 2.25 GB | 3.25 GB | RTX 4060 8GB |
| GGUF Q8_0 | 4.49 GB | 5.72 GB | RTX 4060 8GB |
| GGUF Q6_K | 3.47 GB | 4.59 GB | RTX 4060 8GB |
| GGUF Q5_K_M | 3.00 GB | 4.07 GB | RTX 4060 8GB |
| GGUF Q4_K_M | 2.56 GB | 3.59 GB | RTX 4060 8GB |
| GGUF IQ4_XS | 2.30 GB | 3.30 GB | RTX 4060 8GB |
| GGUF Q3_K_M | 2.07 GB | 3.05 GB | RTX 4060 8GB |
| GGUF IQ3_XXS | 1.74 GB | 2.69 GB | RTX 4060 8GB |
| GGUF Q2_K | 1.77 GB | 2.72 GB | RTX 4060 8GB |
Fine-tuning LightOnOCR-3 4B? LightOnOCR-3 4B VRAM for LoRA, QLoRA and full training.
LightOnOCR-3 4B GGUF files, mmproj and memory per page
LightOnOCR-3 4B is LightOn’s OCR model, under Apache 2.0: given a page image and an empty prompt it writes the page as Markdown, and with the prompt grounding it puts a label and a bounding box before every block. A page costs little cache because only 8 of the 32 layers keep one. A US Letter page rendered at 2048 px on the long side, the size LightOn’s client uses for the 4B, becomes 1568 × 2048 pixels and 3,136 image tokens; with the 1,158 output tokens of an average plain transcription that is 4,294 tokens and 134 MB of FP16 cache, 143 MB with grounding’s 1,433. At 1540 px the image is 1,776 tokens; at the 5-megapixel cap behind LightOn’s best olmOCR-Bench score, about 4,800. Each page in flight also holds the 24 linear-attention layers’ fixed state, 48 MB in FP32.
LightOn publishes only the BF16 safetensors (9,078,620,536 bytes, vision encoder included). The GGUF files below are community conversions made with stock llama.cpp, which converts this architecture’s vision encoder too; ModelVRAM has not checked their OCR output. Each file holds the language model, and OCR also needs the vision projector (mmproj). llama.cpp v0.6.0’s -hf downloads it from the same repo, picking the one closest in bits to the model file: the 366,894,656-byte (350 MB) Q8_0 mmproj for every file up to Q8_0 and the 672,423,488-byte (641 MB) F16 one for F16. mradermacher’s i1 repo, the most downloaded, has no mmproj: take one from the static repo and pass it with --mmproj.
LightOn measured up to 3.36 pages per second for the 4B on one H100 with vLLM 0.30.0 and pages rendered at 1540 px (LightOn’s blog, 2026-10-08). For a smaller card, LightOnOCR-3-0.8B (1,706,030,528 bytes in BF16, the same architecture) scores 85.5 on olmOCR-Bench against the 4B’s 86.3, and LightOnOCR-3-1B (2,011,367,464 bytes, the LightOnOCR-2 architecture) 84.5. The 4B’s GGUF files, with the totals this page’s method gives:
| Quant | File | Size | 8K | 32K | 128K |
|---|---|---|---|---|---|
| Q3_K_M | mradermacher/ | 2.11 GB2,262,064,512 bytes | 3.09 GB | 3.92 GB | 7.22 GB |
| IQ4_XS | mradermacher/ | 2.36 GB2,529,031,552 bytes | 3.37 GB | 4.19 GB | 7.49 GB |
| Q4_K_M | mradermacher/ | 2.52 GB2,708,804,992 bytes | 3.55 GB | 4.38 GB | 7.68 GB |
| i1-Q4_K_M | mradermacher/ | 2.52 GB2,708,805,248 bytes | 3.55 GB | 4.38 GB | 7.68 GB |
| Q5_K_M | mradermacher/ | 2.86 GB3,074,987,392 bytes | 3.93 GB | 4.75 GB | 8.05 GB |
| Q6_K | mradermacher/ | 3.23 GB3,464,056,192 bytes | 4.32 GB | 5.15 GB | 8.45 GB |
| Q8_0 | mradermacher/ | 4.17 GB4,482,403,712 bytes | 5.37 GB | 6.19 GB | 9.49 GB |
| F16 | mradermacher/ | 7.85 GB8,424,394,112 bytes | 9.41 GB | 10.2 GB | 13.5 GB |
The totals leave out the mmproj: add 350 MB for the Q8_0 projector or 641 MB for F16. prithivMLmods/
Run LightOnOCR-3 4B with vLLM or llama.cpp
LightOn serves the model with vLLM and these flags, from the LightOnOCR client’s README,
which pins vLLM 0.30.0 with transformers 5.16.1. 18,000 tokens leave room for the largest image
the processor accepts (16,384 tokens) and its output, 563 MB of
cache for one request. Without --max-model-len, vLLM plans for the configured 262,144
tokens, 8.00 GB of cache for one request: more than a 12 or 16 GB card has left after the
8.46 GB of BF16 weights.
vllm serve lightonai/LightOnOCR-3-4B --limit-mm-per-prompt '{"image": 1}' --max-model-len 18000 --default-chat-template-kwargs '{"enable_thinking": false}' --mm-processor-cache-gb 0 --no-enable-prefix-caching --port 8010 On a smaller card, llama.cpp runs the Q4_K_M file with its Q8_0 mmproj. With the same 18,000 tokens that comes to 4.22 GB by this page’s method, which leaves 3.78 GB of an 8 GB card for the vision encoder’s working memory while it reads a page.
llama-server -hf mradermacher/LightOnOCR-3-4B-GGUF:Q4_K_M -c 18000 --temp 0.1
Send one page image per request, with no text for plain Markdown or the word grounding for blocks with boxes; vLLM
batches concurrent requests. LightOn recommends temperature 0.1 rather than greedy decoding. ModelVRAM has not run either command on a GPU.
LightOnOCR-3 4B at 8K, 32K, 128K and 256K (full) tokens of context
8 of its 32 layers use full attention and 24 are linear-attention layers with no growing cache. Each extra token of context adds 32 KB of FP16 cache per request. The last column is the smallest setup here, one card or a group, that holds it at Q4_K_M. How the KV cache works.
| Context | KV cache, FP16 | Total at Q4_K_M | Total at Q8_0 | Smallest setup, Q4_K_M |
|---|---|---|---|---|
| 8K tokens | 256 MB | 3.59 GB | 5.72 GB | RTX 4060 8GB |
| 32K tokens | 1.00 GB | 4.41 GB | 6.54 GB | RTX 4060 8GB |
| 128K tokens | 4.00 GB | 7.71 GB | 9.84 GB | RTX 4060 8GB |
| 256K tokens | 8.00 GB | 12.1 GB | 14.2 GB | RTX 4060 Ti 16GB |
How fast LightOnOCR-3 4B writes
Tokens per second for one request with 8,192 tokens of context, estimated from memory bandwidth. A dash means it does not fit on one card. Try other settings in the speed calculator.
| Hardware | Bandwidth | Q4_K_M | FP8 |
|---|---|---|---|
| RTX 3060 12GB | 360 GB/s | 60–86 | 39–55 |
| RTX 4090 | 1,008 GB/s | 144–223 | 98–146 |
| RTX 5090 | 1,792 GB/s | 219–365 | 157–245 |
| M4 Max Mac (128 GB) | 546 GB/s | 87–127 | 57–82 |
| M3 Ultra Mac Studio (512 GB) | 819 GB/s | 122–185 | 82–120 |
| H100 SXM | 3,350 GB/s | 319–588 | 243–414 |
| H200 | 4,800 GB/s | 379–748 | 301–545 |
Longest context on one GPU
How many tokens of context LightOnOCR-3 4B fits on a single card with one request, an FP16 KV cache and 0.5 GB left free. "Full" means the model's whole context window fits.
| GPU | Memory | Q4_K_M | Q8_0 | FP8 |
|---|---|---|---|---|
| RTX 3060 | 12 GB | 238K | 176K | 184K |
| RTX 4060 Ti 16GB | 16 GB | 256K (full) | 256K (full) | 256K (full) |
| RTX 3090 / 4090 | 24 GB | 256K (full) | 256K (full) | 256K (full) |
| RTX 5090 | 32 GB | 256K (full) | 256K (full) | 256K (full) |
| A100 40GB | 40 GB | 256K (full) | 256K (full) | 256K (full) |
| Mac, 64 GB unified memory | 48 GB | 256K (full) | 256K (full) | 256K (full) |
| L40S / RTX 6000 Ada | 48 GB | 256K (full) | 256K (full) | 256K (full) |
| A100 / H100 80GB | 80 GB | 256K (full) | 256K (full) | 256K (full) |
| Mac, 128 GB unified memory | 96 GB | 256K (full) | 256K (full) | 256K (full) |
| H200 | 141 GB | 256K (full) | 256K (full) | 256K (full) |
| B200 | 180 GB | 256K (full) | 256K (full) | 256K (full) |
Model details
- Parameters
- 4.5B (4,539,265,536); LightOn's OCR model on the Qwen3.5-4B vision-language architecture; 333,514,240 of them are the vision encoder
- Layers
- 8 of its 32 layers use full attention and 24 are linear-attention layers with no growing cache
- Attention cache
- 4 KV heads × 256
- Context length
- 262,144 tokens
- Published weights
- 8.46 GB (BF16)
- On Hugging Face
- lightonai/
LightOnOCR-3-4B - Reported benchmarks
- None published in the model card for GPQA, MMLU-Pro or LiveCodeBench.
Why this estimate looks this way
At Q4_K_M and an 8K-token context, LightOnOCR-3 4B uses 2.56 GB for weights, 256 MB for its FP16 KV cache and 800 MB for estimated runtime overhead, totaling 3.59 GB. The overhead is a 0.5 GB base plus 10% of weights and cache.
Its attention layout matters for long context: 8 of its 32 layers use full attention and 24 are linear-attention layers with no growing cache. The FP16 cache grows by about 32 KB per additional token per request.
Only the 8 full-attention layers keep a KV cache. The 24 linear-attention layers hold a fixed state per request (48 MB in FP32), left to the overhead allowance, as is the vision encoder’s working memory while it reads a page. A page takes about 1,800 to 4,800 image tokens depending on its render size, plus its output: 1,158 tokens on average for plain transcription, 1,433 with grounding.
The architecture and published checkpoint size come from the model's config.json and weight files. These are estimates rather than measured peak memory; inference engines can reserve extra buffers or preallocate the full configured cache.
LightOnOCR-3 4B next to similar-sized models
The three models here closest to it in parameter count, at Q4_K_M with 8,192 tokens of context.
| Model | Parameters | Total | KV per token | Smallest setup |
|---|---|---|---|---|
| LightOnOCR-3 4B | 4.5B | 3.59 GB | 32 KB | RTX 4060 8GB |
| Spark-X2.5 4B | 4.1B | 3.47 GB | 36 KB | RTX 4060 8GB |
| Nemotron 3 Nano 4B | 4.0B | 3.10 GB | 16 KB | RTX 4060 8GB |
| Granite 4.2 3B | 3.7B | 3.46 GB | 80 KB | RTX 4060 8GB |
LightOnOCR-3 4B VRAM questions
How much VRAM do I need to run LightOnOCR-3 4B locally?
About 3.59 GB at Q4_K_M with an 8K context and one request, by the bits-per-weight estimate, and 10.1 GB at BF16. The smallest setup listed here that holds Q4_K_M is the RTX 4060 8GB.
How much more VRAM does LightOnOCR-3 4B need for 32K or 128K tokens of context?
Its FP16 KV cache is 256 MB at 8K, 1.00 GB at 32K, 4.00 GB at 128K for one request, so 128K adds 3.75 GB over 8K, plus 10% overhead. A q8_0 cache
Badge for your model card
Paste it into a Hugging Face or GitHub README; it shows the Q4_K_M total above and links to this page. Q8_0 and FP16 badges.
Numbers read from the model files on Hugging Face on . Compare it with other models in the reproducible model and GPU report.