Apple's LensVLM-9B Reads Long Documents at 4.3x Compression
Apple's new 9B vision-language model reads compressed page thumbnails first, then zooms into only the pages it needs to answer your question.
Takeaways
- Apple released LensVLM-9B, a Qwen3.5-9B finetune for compressed visual document understanding.
- Renders text pages as thumbnails, then calls a
read_pagetool to expand only relevant pages. - Matches full-text accuracy at 4.3x compression, beats retrieval baselines up to 10.1x.
- Supports configurable 5x, 10x, and 15x compression ratios at inference time.
- Available under Apple ML Research license; works with Transformers, vLLM, and SGLang.
- Full paper and code published by Apple's ML research team.
Apple has released LensVLM-9B, an open-weights vision-language model designed for question answering across long documents. Built on Qwen3.5-9B-Base, the 9-billion-parameter model scans compressed page images, identifies likely sources, and invokes tools to retrieve selected pages at full resolution.
Long PDFs consume substantial context when every page is tokenized as text. LensVLM reduces that cost by using page images as a compact visual index, then spending additional tokens only on material relevant to the question. Apple reports accuracy comparable to a full-text baseline at 4.3x effective compression across seven text question-answering benchmarks.
| Detail | LensVLM-9B |
|---|---|
| Base model | Qwen3.5-9B-Base |
| Parameters | 9 billion |
| Primary task | Long-document question answering |
| Compression settings | 5x, 10x, and 15x |
| Weight format | BF16, approximately 18.8 GB |
| License | Apple Machine Learning Research License |
Pages become a visual index
LensVLM renders document text into images because a vision encoder converts each fixed-size input into a bounded sequence of visual tokens. Packing more text into an image raises the compression ratio without creating a correspondingly long text-token sequence.
Higher compression eventually makes characters too small for reliable recognition. LensVLM handles that limit with a learned tool-calling loop rather than forcing the vision encoder to decode every compressed line.
- The model receives compressed page images and a question.
- It scans the thumbnails for pages likely to contain the answer.
- It calls an expansion tool for selected pages.
- It answers using the expanded text or higher-resolution images.
Apple’s source repository illustrates the first pass with a stack of page images and a natural-language question:
<|user|> [15 page images]
Question: What government position was held by the woman
who portrayed Corliss Archer in the film Kiss and Tell?
<|assistant|> <think>... Page 10 contains text mentioning
"American actress, singer" ...</think>
The configured 5x, 10x, or 15x ratio controls the compressed first pass. Effective compression also accounts for pages expanded during tool use, so the final ratio depends on how many pages the model retrieves for each query.
Compression holds up on seven benchmarks
Apple’s research paper compares LensVLM with full-text input, retrieval systems, text compression, and visual-compression methods across seven text question-answering benchmarks.
| Comparison | Reported result |
|---|---|
| Full-text baseline | Comparable accuracy at 4.3x effective compression |
| Retrieval and compression baselines | Higher accuracy at up to 10.1x effective compression |
| Evaluation scope | Seven text question-answering benchmarks |
A 4.3x effective ratio means the model processes about 23% of the baseline context after accounting for expanded pages. The 10.1x result indicates that selective visual scanning can outperform pipelines that depend on a separate retriever to choose relevant passages.
Expansion follows the document type
Rendered prose works best with text expansion, which returns readable source text after the model chooses a page. Native documents with meaningful spatial structure can use high-resolution image expansion instead. Tables, forms, diagrams, and layout-dependent PDFs retain information that OCR text may discard.
The choice affects both accuracy and cost. Text expansion produces compact, searchable context, while image expansion preserves visual relationships at a higher processing cost. A mixed document can use both tools during the same question-answering loop.
Serving options cover local and hosted inference
Developers can load LensVLM through a Transformers image-to-text pipeline:
from transformers import pipeline
pipe = pipeline(
"image-text-to-text",
model="apple/LensVLM-9B",
)
vLLM can expose the model through an OpenAI-compatible endpoint:
vllm serve apple/LensVLM-9B
- Transformers: direct Python inference and prototyping
- vLLM: an OpenAI-compatible serving endpoint
- SGLang: higher-throughput server deployment
- GGUF and MLX: community conversions for llama.cpp and Apple Silicon
The 18.8 GB figure covers the BF16 weight files rather than total runtime memory. Deployment also requires capacity for activations, image inputs, the KV cache, expanded pages, and serving overhead. Community quantizations can reduce memory use, although their accuracy and feature support may differ from Apple’s release.
The repository’s document-QA demo accepts a text file, a question, and a 5x, 10x, or 15x compression flag. PDF applications need a preparation step that preserves page boundaries and produces the image inputs expected by the model.
Best results come from sparse evidence
LensVLM targets workloads where a question depends on a few pages inside a much larger document or corpus. Suitable applications include:
- Question answering over reports, contracts, manuals, and research papers
- Search across documentation or source files rendered into page images
- Retrieval workflows where relevant passages are difficult to select with embeddings alone
- Forms, tables, and figure-heavy documents that benefit from visual expansion
The savings shrink when answers depend on many pages, compressed thumbnails omit critical visual cues, or the model repeatedly expands incorrect pages. Tool calls also add inference rounds, making end-to-end latency a separate concern from token reduction. The research license requires review before commercial or production use.
Measure the full tool loop
A useful production evaluation should compare LensVLM with the existing full-text or retrieval pipeline on the same documents and questions. The key measurements are:
- Answer accuracy on domain-specific questions
- Recall of pages containing the supporting evidence
- Average number of expanded pages per query
- Total visual and text tokens, including tool results
- End-to-end latency, throughput, and peak memory
LensVLM’s practical advantage depends on preserving answer quality while expanding only a small fraction of the source. Apple’s reported 4.3x result provides a benchmark, while each document set will determine whether the model’s visual triage reduces cost in deployment.