deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (hnrss.org)

Apple's LensVLM-9B compresses long contexts into images and expands only relevant pages

Apple has released LensVLM-9B, a vision-language model that renders long documents as compressed images and restores only the relevant pages when it needs detail.

Apple's LensVLM-9B compresses long contexts into images and expands only relevant pages

A different route to long context

Apple's machine learning research team has published LensVLM-9B, a nine-billion-parameter vision language model that takes an unusual swing at the long-context problem. Instead of stretching a language model's input window to ingest whole documents as text, the model reads a heavily compressed image of the text and restores individual pages to their uncompressed form only when they turn out to be relevant. The approach, outlined in the model card on Hugging Face and picked up on the Hacker News front page, is what the accompanying paper calls selective context expansion.

How the compression loop works

According to the model card, LensVLM first scans compressed renderings of a document — the release supports 5x, 10x and 15x compression settings, selected as a flag at run time. When the model judges that a page matters for the question at hand, it calls on tools it has learned to use, which expand that page back to its full, uncompressed form so it can be read closely. The intuition is close to how a person works through a thick report: skim everything at thumbnail scale, then open the pages that count.

The released model is a 9B-parameter vision language model built on Qwen; the license notes on Hugging Face describe the weights as including Apple's modifications to the Qwen model. The work is documented in a paper titled "LensVLM: Selective Context Expansion for Compressed Visual Representation of Text" (arXiv:2605.07019), authored by Roy Xie, Dan Friedman, Donghan Yu, Bowen Pan and colleagues.

What is available to run

The code lives in Apple's apple-aiml-research/ml-lensvlm repository on GitHub, and the model card walks through a demo: clone the repository, install the requirements, and run the demo script against apple/LensVLM-9B. For custom documents, users pass a text file and a question alongside a compression setting; the card's own example uses 10x. Notably, the model card itself reports no benchmark numbers — it points to the repository README for data preparation and evaluation, so anyone weighing accuracy claims will need to consult the paper or the repo.

Licensing

Two licenses are in play. The model weights and other machine learning files ship under the Apple Machine Learning Research Model License, while the accompanying source code is distributed under the Apple Sample Code License. Neither is a conventional permissive open-source license, so anyone hoping to use LensVLM in a product should read the terms carefully before building on it.

Why it matters

Most of the long-context arms race has concentrated on bigger windows: extend attention, shrink the key-value cache, accept the cost. LensVLM proposes the opposite bargain — make context cheap by default and expensive only where needed. If the evaluations hold up, a pipeline that pays full attention to a handful of expanded pages instead of an entire document could meaningfully cut the cost of question answering over large corpora.

It is also an interesting data point for the text-as-image line of thinking. The model treats pixels as a compressed storage format for words and decompresses on demand, effectively turning context into something a model fetches rather than something it must hold in memory. The obvious open question is how reliably a vision model reads tightly compressed glyphs, and the answer lives in the paper's evaluations rather than the model card. That Apple shipped the weights publicly at all, under a research-oriented license, makes the experiment reproducible for anyone curious enough to run it.

  • #apple
  • #machine-learning
  • #vision-language-models
  • #long-context
  • #open-weights

Related posts