LensVLM-9B logo

LensVLM-9B

Visit

Apple's 9B vision-language model reads documents as compressed images, then expands only the pages that matter, holding accuracy to 4.3x compression.

Share:
View alternatives

LensVLM-9B

LensVLM-9B is a 9B vision-language model released by Apple on 2026-09-22, published on Hugging Face with the accompanying paper and inference code. Its idea is simple to state and hard to pull off: stop feeding long documents to a model as tokens, render them as images instead, and let the model decide which pages deserve the expensive uncompressed treatment.

The compression knob is unusual. Vision encoders map a fixed-size image to a fixed number of visual tokens, so shrinking the rendered resolution shrinks the token cost. Apple's paper explains why that fails on its own: as compression rises, characters shrink below what the vision encoder can actually resolve, and accuracy collapses. LensVLM is the fix.

How It Works

The model is post-trained to work in two steps:

  1. Scan. Read the whole document as compressed page images, cheap in tokens.
  2. Expand selectively. Call learned tools to pull just the relevant pages back to their uncompressed form, either as re-rendered text or as a high-resolution image.

Training teaches the model when to expand and which tool to use. Apple's analysis found that training makes visual compression robust to rendering choices, and that as compression grows the model leans more on expanded content than on unreliable reading of tiny text. It also produced practical guidance: text expansion is the better choice for rendered text, while high-resolution image expansion suits native documents whose layout carries the answer.

What the Paper Reports

Metric Result
Base model Qwen3.5-9B-Base
Accuracy at 4.3x effective compression Comparable to the full-text upper bound
Up to 10.1x compression Beats retrieval-based, text-compression, and visual-compression baselines
Benchmarks Seven text QA benchmarks
Beyond text QA Generalizes to multimodal document and code understanding
License Apple Machine Learning Research Model License (code under Apple Sample Code License)

The claim worth paying attention to is the shape of the curve rather than any single number: the gap over other approaches widens as compression increases. That is the opposite of how most long-context tricks behave.

Community Traction

As of 2026-09-24, the model card shows 147 likes and 455 downloads, and the accompanying code repository has around 50 stars. Those are modest numbers by frontier model standards and normal for a research release, but the paper climbed to the front page of Hacker News the day after release, which suggests the technique is more interesting to practitioners than the download count implies.

Use Cases

  • Long-document QA. Question answering over annual reports, manuals, or contracts where full-text context is the expensive part of the bill.
  • Retrieval-free RAG. Instead of chunking, embedding, and retrieving, hand the model a compressed visual rendering and let it expand what it needs. Apple benchmarked exactly this comparison.
  • Layout-sensitive documents. Forms and tables where the visual arrangement carries meaning, using high-resolution expansion for the pages that matter.
  • Code and documents together. The release notes generalization to code understanding as well as multimodal documents.

Getting Started

git clone https://github.com/apple-aiml-research/ml-lensvlm
cd ml-lensvlm
pip install -r requirements.txt
python scripts/run_demo.py --model apple/LensVLM-9B

For your own document:

python demo.py \
  --model apple/LensVLM-9B \
  --text_file document.txt \
  --question "What is the main finding?" \
  --compression 10x

Compression is configurable at 5x, 10x, and 15x. Start at 10x, then check whether the answers you care about still survive, because the accuracy curve is workload-specific even when the average looks good.

Limitations

  • A research release, not a product. There is no hosted endpoint. You run the weights yourself, with the code from Apple's repository.
  • Apple's own license. The weights use the Apple Machine Learning Research Model License, and the code uses the Apple Sample Code License. Neither is a standard open source license, so read them before commercial use.
  • Accuracy is measured against a full-text upper bound, not against a frontier model. LensVLM is efficient, and it is still a 9B model answering questions about compressed images.
  • Compression is lossy by design. The expansion tools recover the pages the model asks for. Pages it decides not to expand stay compressed, and that decision is where errors will come from.
  • The paper predates the weights. The arXiv preprint is from May 2026; the weights and code landed in September.

FAQ

Is LensVLM-9B open source?

The weights are publicly downloadable and the code is public, under Apple's own research and sample code licenses rather than an OSI-approved license. Check the terms for your use case.

Do I need a GPU to run it?

You need hardware that can serve a 9B vision-language model. The repository's demo script is the supported path.

How is this different from OCR plus a text model?

OCR turns pages into text first, which throws away layout and costs a separate pass. LensVLM keeps the page as an image and pays extra tokens only for the pages it expands.

Does it replace retrieval?

Not necessarily. Apple compares against retrieval-based baselines and reports better accuracy at high compression, which means it is an alternative to retrieval for some workloads rather than a strict replacement.

Alternatives

  • Mistral OCR 4.1: document parsing to structured text when you want text, not compressed pages.
  • Qwen-VL: a general vision-language family for image understanding without the compression trick.
  • Ling 3.0 Flash VL: a smaller multimodal option for cost-sensitive pipelines.

Conclusion

LensVLM-9B treats context as a rendering decision rather than a token budget, and the selective expansion step is what makes the idea work. It is a research release with a non-standard license and no hosted endpoint, so it is not a drop-in replacement for an API. For teams whose bill is dominated by long documents, it is the most interesting published alternative to retrieval to test this quarter.

Comments

No comments yet. Be the first to comment!