Chunked Prefill, clearly explained
Datalab has released Surya OCR, a 650-million-parameter model designed for document intelligence and optical character recognition. The model achieves an 83.3% score on the olmocr benchmark, ranking as the top model under 3 billion parameters. It provides multi-lingual support across 91 languages and can execute on CPU, GPU, and MPS hardware, reaching processing speeds of 5 pages per second on an RTX 5090. In addition to text recognition, Surya OCR extracts layout structure, processes handwriting and mathematical equations, and extracts and captions embedded images and diagrams. Every LLM inference request is divided into a compute-heavy prefill phase and a memory-bandwidth-bound decode phase. Without chunked prefill, large incoming prompts monopolize GPU execution and interrupt ongoing token decoding for other users. Chunked prefill solves this head-of-line blocking by dividing long prompts into smaller token segments that are interleaved with active decode steps. While this technique prevents streaming stalls, configuring chunk size requires balancing inter-token latency against time to first token. llm-checker is a command-line tool designed to help users determine which large language models can run on their specific computer hardware. The setup involves installing the package via npm, scanning local hardware configurations, and generating tailored model recommendations by task category. This provides a streamlined three-step workflow for assessing local machine capacity for running AI models.
Read the original ↗Contents
Surya OCR: SOTA model for document intelligence
Datalab has released Surya OCR, a 650-million-parameter model designed for document intelligence and optical character recognition. The model achieves an 83.3% score on the olmocr benchmark, ranking as the top model under 3 billion parameters. It provides multi-lingual support across 91 languages and can execute on CPU, GPU, and MPS hardware, reaching processing speeds of 5 pages per second on an RTX 5090. In addition to text recognition, Surya OCR extracts layout structure, processes handwriting and mathematical equations, and extracts and captions embedded images and diagrams.
- Surya OCR has 650M parameters and was released by Datalab.
- It scores 83.3% on the olmocr benchmark, ranking highest among models with fewer than 3 billion parameters.
- The model supports 91 languages and functions across CPU, GPU, and MPS backends.
- It achieves an inference speed of 5 pages per second on an RTX 5090.
- Capabilities include full document layout analysis, image/diagram extraction and captioning, as well as support for handwriting, math, forms, and tables.
Chunked Prefill, clearly explained
Every LLM inference request is divided into a compute-heavy prefill phase and a memory-bandwidth-bound decode phase. Without chunked prefill, large incoming prompts monopolize GPU execution and interrupt ongoing token decoding for other users. Chunked prefill solves this head-of-line blocking by dividing long prompts into smaller token segments that are interleaved with active decode steps. While this technique prevents streaming stalls, configuring chunk size requires balancing inter-token latency against time to first token.
- LLM execution consists of a compute-intensive prefill phase and a memory-bandwidth-bound decode phase.
- Unchunked prefill for large prompts causes head-of-line blocking that pauses active token streams for other concurrent requests.
- Chunked prefill splits long prompts into smaller token ranges to interleave prompt processing with active decoding.
- Smaller chunk sizes minimize inter-token latency spikes, whereas larger chunk sizes optimize time to first token.
- Chunks that are too small create performance overhead by repeatedly reading previously generated KV cache states.
- In vLLM V1, the tradeoff between chunk sizes is primarily controlled by the --max-num-batched-tokens parameter.
The easiest way to find out which models you can run on your computer
llm-checker is a command-line tool designed to help users determine which large language models can run on their specific computer hardware. The setup involves installing the package via npm, scanning local hardware configurations, and generating tailored model recommendations by task category. This provides a streamlined three-step workflow for assessing local machine capacity for running AI models.
- llm-checker can be installed globally using npm via the command 'npm install -g llm-checker'.
- Hardware capabilities are analyzed using the 'llm-checker hw-detect' command.
- Model recommendations can be queried based on specific use cases, such as coding, using 'llm-checker recommend --category coding'.