Apple's LensVLM-9B compresses long documents into images and expands only what matters
The 9B-parameter model, published on Hugging Face on September 21, 2026, turns text into compressed images and only decodes at high resolution the passages the user's question actually needs.
Apple published LensVLM-9B on Hugging Face on September 21, 2026, a vision-language model (VLM) with 9 billion parameters built on top of Qwen3.5-9B. The model's proposal tackles a well-known problem for anyone running LLMs in production with large documents: processing long context in plain text is expensive, because every token consumes attention and memory. LensVLM inverts the logic: it first looks at the entire document as a sequence of compressed images and only decodes, at full resolution, the pages that the user's question requires.
The model is described on the Hugging Face page and detailed in the paper "LensVLM: Selective Context Expansion for Compressed Visual Representation of Text" (arXiv 2605.07019), authored by Roy Xie, Dan Friedman, Donghan Yu, Bowen Pan, Christopher Fifty, Jang-Hyun Kim, Xianzhi Du, Zhe Gan, Vivek Rathod, and Bhuwan Dhingra. The reference code is in the ml-lensvlm repository, on Apple's GitHub.
The problem the model tries to solve
In a typical VLM, each text token occupies a position in the attention sequence, and inference cost grows with the size of the context. An alternative that other research groups had already been exploring is rendering text as an image: an image of an entire page can be represented with far fewer visual tokens than the same page in text tokens, because the model learns to "read" the image instead of processing it character by character. The gain is obvious, but so is the risk: over-compressing a text image degrades legibility, and the model can simply get fine details wrong, like numbers, proper names, or specific passages of a contract.
LensVLM handles this trade-off in a specific way: it uses learned tools to decide, during the response generation itself, which compressed pages need to be expanded back into a higher-fidelity version before answering. In other words, the model doesn't treat the entire document with the same level of detail: it scans everything at low resolution and only "zooms in" where the question demands it.
How compression is configured in practice
The repository offers a straightforward demo script:
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-9BTo run against your own document, the call exposes the compression parameter directly:
python demo.py \
--model apple/LensVLM-9B \
--text_file document.txt \
--question "What is the main finding?" \
--compression 10xThe documented options are 5x, 10x, and 15x. This means whoever integrates the model has explicit control over the trade-off between how many visual tokens the document will occupy and how much detail remains available before the selective expansion step kicks in. The model card doesn't publish accuracy numbers per compression level: anyone who wants to evaluate this in practice needs to run the evaluation pipeline described in the repository's README, which also includes data preparation instructions.
What changes on the engineering side
For anyone already running VLMs in production, three technical points from the model card deserve attention before putting LensVLM on the pipeline:
- Base and architecture: the model is a finetune of Qwen3.5-9B, loaded via
transformerswithAutoModelForMultimodalLMandAutoProcessor. The weights are in BF16, totaling around 9.41 billion parameters and 18.8 GB on disk (unfragmented, no sharding). That puts it in the range of 24 GB+ GPUs for comfortable inference, depending on the batch size and context length used. - Chat template with vision tokens: the
chat_templatepublished in the repository uses markers such as<|vision_start|>,<|image_pad|>, and<|vision_end|>to interleave images and video in the conversation, and it already comes ready for function calls (<tool_call>) in the same format used by other models in the Qwen family. Anyone who already has a tool-calling stack running with Qwen should be able to reuse most of the integration. - Preprocessing pipeline: since the model expects text rendered as an image, the step left to whoever implements it is transforming the document (PDF, plain text, etc.) into the compressed images before sending it to the model. This is not a trivial detail, and it's where the repository's
demo.pyscript comes in as a reference.
The cost gain promised by the technique only materializes if this rendering step is cheap and deterministic; otherwise, the benefit of cheaper inference tokens can be canceled out by the extra preprocessing cost. The paper is the source for understanding the details of the selective expansion methodology, something the Hugging Face model card doesn't detail beyond describing the general behavior.
License: read before deploying to production
The point that deserves double attention from any team evaluating LensVLM is the license. The model's weights, including Apple's modifications to the Qwen architecture, are under the Apple Machine Learning Research Model License (identified as license:apple-amlr in the repository's tags), a license distinct from conventional open licenses like Apache 2.0 or MIT that usually accompany community models. The code that comes with the model (the demo and inference scripts) is distributed separately, under the Apple Sample Code License. This means two different licenses cover weights and code, and teams considering direct commercial use need to read the full terms of each before integrating LensVLM into a product, rather than assuming it's an open model in the traditional sense.
Adoption numbers and what remains open
As of publication time, the Hugging Face repository logged 233 downloads in the past month and 85 likes, numbers typical of a freshly published research model, not one already widely adopted in production. This is expected: LensVLM was released just a few days ago (the repository was created on September 21, 2026 and last updated on September 22), and it hasn't yet gone through the scrutiny of teams outside Apple running real workloads.
What remains open, at least based on the material published so far: cost and accuracy comparisons against traditional RAG approaches with text chunking, concrete token-savings numbers per compression level on public benchmarks, and reports from teams that have actually run the model outside Apple's research environment. For engineering teams currently dealing with the cost of inference on long documents (contracts, technical reports, extensive knowledge bases), LensVLM is, for now, an interesting architectural lead and code worth studying, rather than a production-ready replacement.
Translated from the Brazilian Portuguese original · Read the original
Nvidia in talks to buy or expand investment in Reflection AI, FT reports
According to the Financial Times, Nvidia is weighing options ranging from putting in more capital to acquiring Reflection AI, maker of the open model Beam, aimed at code and agents.