Programmatic Multimodal Memory trains a 9B model to read long videos with code

A paper on Hugging Face introduces Programmatic Multimodal Memory (PMM), a way to answer questions about videos that run for hours or days. The problem it targets: the evidence for a question may be a few seconds buried in a recording far longer than any model can read at once.
The authors say most memory systems decide what matters at write time. Before any question arrives, they consolidate the video into compressed memory banks or structured graphs, and in doing so lose details that later questions need. PMM defers that decision to read time. It writes a multi-scale temporal memory of timestamped captions and transcripts once, without consolidation, and keeps it aligned with the raw video.
The authors say single-round retrieval misses much of the evidence, so PMM uses a Root model that reads the memory with code over multiple turns in a persistent Python REPL. Its programs filter records across days, query a frozen submodel in batches, and inspect raw frames on demand. That leaves the Root deciding what matters. The authors note that small open-weight models struggle zero-shot to coordinate code search and frame inspection, so they train Qwen3.5-9B as the Root, using evidence-grounded supervised fine-tuning followed by outcome-reward reinforcement learning.
The resulting system, PMM-9B, gains 12.1 points over its zero-shot version. It outperforms every open-source model and agent baseline on all five personal-memory and long-video benchmarks. It also beats standalone GPT-5 and Gemini 2.5 Pro on average, and by nearly 20 points on week-long EgoLifeQA. On cost in input tokens, open-source baselines that use more input tokens per question than PMM-9B are all less accurate, and those that use fewer score at least 16.6 points lower. A project page is at https://shadow-weave.github.io/PMM/.
Key facts
- PMM writes a multi-scale memory of timestamped captions and transcripts once, without consolidation, and keeps it aligned with the raw video.
- A Root model reads that memory with code over multiple turns in a persistent Python REPL, filtering records across days, querying a frozen submodel in batches and inspecting raw frames on demand.
- The Root is Qwen3.5-9B, trained with evidence-grounded supervised fine-tuning and outcome-reward reinforcement learning; PMM-9B gains 12.1 points over its zero-shot version.
- PMM-9B outperforms every open-source model and agent baseline on all five personal-memory and long-video benchmarks.
- The authors report it beats standalone GPT-5 and Gemini 2.5 Pro on average, and by nearly 20 points on week-long EgoLifeQA.
Why it matters
Long recordings, such as days of first-person video, are too big for any model to read in one pass, so every system has to decide what to keep. The common approach compresses the video up front and risks throwing away details a later question needs. PMM takes the opposite bet: keep the full timestamped caption and transcript record, and let a model decide what to look at when the question arrives. The authors report that a 9B open-weight model trained this way beats standalone GPT-5 and Gemini 2.5 Pro on average across the benchmarks.
Who it affects
The work is aimed at researchers building long-video question answering and personal-memory systems, where the question may concern events spread over days. It is also relevant to anyone working on agents that act through code, since the Root is a small open-weight model trained to use a Python REPL as its main tool.
How to use it
The abstract describes the recipe rather than a product. Write timestamped captions and transcripts of the video once, keep them aligned with the raw frames, and let a Root model query them with code over several turns. Because small open-weight models struggle zero-shot to coordinate code search and frame inspection, the authors train the Root with supervised fine-tuning and then reinforcement learning on outcome reward. The project page is at https://shadow-weave.github.io/PMM/. No release of code, weights or data is stated; only a project page URL is given.
How solid is it
This is a preprint abstract, and every result is the authors' own claim. The claims are broad: first place among open-source models and agent baselines on all five benchmarks, and a win over GPT-5 and Gemini 2.5 Pro on average. The abstract does not name the five benchmarks except EgoLifeQA, and gives no absolute accuracy scores. It does not say which metric the 12.1-point gain is measured in, or whether it is an average over benchmarks. It also does not say whether the nearly 20-point EgoLifeQA margin is over GPT-5, Gemini 2.5 Pro, or both. No author names or institutions are given.
Risks and caveats
Several things cannot be checked from the abstract. No token counts, latency or cost figures are given, so the cost of multi-turn code reading is unknown. The only efficiency comparison is against open-source baselines: those using more input tokens per question than PMM-9B are all less accurate, and those using fewer score at least 16.6 points lower. The comparison with GPT-5 and Gemini 2.5 Pro is on average, so PMM-9B may not lead on every benchmark. No limitations or failure cases are described.
“We instead defer this decision to read time.”
— From the paper's abstract