Lembas treats video RAG as a token budget, reports accuracy gains

Lembas treats video RAG as a token budget, reports accuracy gains

A paper listed on Hugging Face introduces Lembas, a plug-and-play framework for video retrieval-augmented generation (RAG), aimed at helping vision-language models (VLMs) understand long videos efficiently. The authors start from the point that this task requires finding the relevant evidence while keeping the number of tokens the model processes to a minimum. Existing video RAG methods rely on frame selection and token compression, but in the authors' view they overlook how much each additional token is worth.

Lembas treats video RAG as a problem of allocating tokens over frames and subtitles under one shared budget. Its key idea has two parts: the value of a token diminishes within each item, and it decreases further as similar evidence receives more tokens. The framework captures both effects in a single objective and solves it with an efficient iterative water-filling algorithm that, according to the authors, has a provable convergence guarantee.

The method also covers multi-turn conversations. There, Lembas reuses tokens already processed in earlier turns and refines its estimate of relevance using the VLM's attention at no extra cost.

In the authors' evaluations, Lembas improves accuracy by up to 7.2 percentage points over state-of-the-art baselines at comparable compute. On multi-turn video understanding, it reaches up to 1.5 percentage points higher accuracy with 1.7 to 17.3 times fewer TFLOPs.

Key facts

  • Lembas is a plug-and-play framework that frames video RAG as token allocation over frames and subtitles under a shared budget.
  • It models diminishing token value both within each item and across similar evidence, in a single objective.
  • An iterative water-filling algorithm solves that objective, with what the authors describe as a provable convergence guarantee.
  • Reported accuracy gain: up to 7.2 percentage points over state-of-the-art baselines at comparable compute.
  • In multi-turn video understanding: up to 1.5 points higher accuracy with 1.7 to 17.3 times fewer TFLOPs.

Why it matters

Long videos force a trade-off for vision-language models: the system has to find the relevant evidence while processing as few tokens as possible. The authors argue that current video RAG methods, built on frame selection and token compression, miss the question of what each extra token adds. Lembas makes that question the center of the design. A token is worth less as its item receives more of them, and less again when similar evidence is already getting tokens.

Who it affects

The work is most relevant to researchers and engineers who build long-video understanding on top of vision-language models, especially with retrieval over frames and subtitles. Multi-turn use is a specific target: Lembas is designed to reuse tokens processed in earlier turns of a conversation.

How to use it

The authors describe Lembas as plug-and-play. In outline, it takes a shared token budget, divides it among frames and subtitles with an iterative water-filling algorithm, and in follow-up turns reuses earlier tokens while refining relevance with the model's attention. No code release or availability is mentioned in the source text.

How solid is it

These are the authors' own results, and this account rests on the paper's abstract. The headline figures are up to 7.2 percentage points of accuracy at comparable compute, and up to 1.5 points with 1.7 to 17.3 times fewer TFLOPs in multi-turn tests. The convergence guarantee for the algorithm is described as provable. The benchmarks, baselines and vision-language models used are not named in the abstract.

Risks and caveats

Both accuracy figures are maximums, and no average or typical gain is given. The two results should be read separately: the 7.2-point gain is stated at comparable compute with no compute saving attached, while the 1.7 to 17.3 times reduction in TFLOPs applies to multi-turn video understanding. The abstract does not say which baseline the multi-turn comparison is made against, and it discusses no limitations.

“Our key insight is that the value of a token diminishes within each item and decreases further as similar evidence receives more tokens.”

— Lembas paper abstract