--- title: Programmatic Multimodal Memory emoji: 🎞️ colorFrom: purple colorTo: red sdk: gradio sdk_version: 6.33.0 app_file: app.py short_description: Answer long-video questions by reading memory with code python_version: "3.12" startup_duration_timeout: 1h models: - Shadow-Weave/PMM-9B - Qwen/Qwen3-VL-8B-Instruct - distil-whisper/distil-large-v3.5 --- # Programmatic Multimodal Memory (PMM) Demo of [Programmatic Multimodal Memory: Learning to Read Long Videos with Code](https://huggingface.co/papers/2611.41408) ([code](https://github.com/Shadow-Weave/PMM), [PMM-9B](https://huggingface.co/Shadow-Weave/PMM-9B)). 1. **Write-time memory** – the video is captioned every 10 s (Qwen3-VL-8B-Instruct, WorldMM prompts from the PMM repo), speech is transcribed (distil-whisper-large-v3.5), and the captions are summarised into 30 s / 3 min / 10 min / 1 h layers. 2. **Read-time with code** – PMM-9B (the trained Root) writes Python in the original PMM REPL worker to search the memory, calling `see` (Qwen3-VL-8B on raw frames) and `llm_query` when needed, until it submits an option letter. Differences from the paper setup: Root served with 🤗 transformers greedy decoding instead of SGLang; the memory writer is Qwen3-VL-8B instead of GPT-5-mini/Qwen 27B; only the first 5 minutes of a video are used. Example clips are CC0 videos from [linoyts/repo-to-space-example-videos](https://huggingface.co/datasets/linoyts/repo-to-space-example-videos), concatenated into short multi-scene videos.