Run this model with HF Jobs

Run Shadow-Weave/PMM-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Shadow-Weave/PMM-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Shadow-Weave/PMM-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Shadow-Weave/PMM-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Shadow-Weave/PMM-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
PMM-4B / README.md
hiberrrr's picture
Update usage and code link
764d650 verified
|
Raw History Blame Contribute Delete
2.34 kB
---
license: apache-2.0
library_name: transformers
base_model: Qwen/Qwen3.5-4B
pipeline_tag: image-text-to-text
tags:
- long-video-understanding
- multimodal-memory
- agent
---
# PMM-4B
PMM-4B is the Root model of **Programmatic Multimodal Memory (PMM)**. It is fine-tuned from [Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) with SFT and RL. The Root reads the memory of a long video by writing code: it searches text memory, calls `see` on video clips, and gives sub-tasks to `ask`.
- Paper: [arXiv:2611.41408](https://arxiv.org/abs/2611.41408)
- Project page: https://shadow-weave.github.io/PMM/
- Code: https://github.com/Shadow-Weave/PMM
- Memory used in the paper: https://huggingface.co/datasets/Shadow-Weave/PMM-Memory
## Results
Accuracy (%) on the fixed 1,000-question subset (200 questions per benchmark), from the supplementary table on the 4B Root. MLVU uses M-Avg.
| Root | EgoLifeQA | HippoVlog | MLVU | LongVideoBench | VideoMME Long | Avg. |
|---|---|---|---|---|---|---|
| Qwen3.5-4B (zero-shot) | 46.00 | 73.00 | 55.23 | 64.00 | 61.50 | 59.95 |
| **PMM-4B** | 63.50 | 78.50 | 62.39 | 75.50 | 69.50 | 69.88 |
## Usage
Use the model through the [PMM code](https://github.com/Shadow-Weave/PMM). PMM applies the chat template itself and sends token IDs to the native `/generate` endpoint of SGLang, so serve the model with SGLang:
```sh
hf download Shadow-Weave/PMM-4B --local-dir PMM-4B
python -m pip install "sglang==0.5.22"
python -m sglang.launch_server --model-path PMM-4B --served-model-name Qwen/Qwen3.5-4B \
--tensor-parallel-size 1 --context-length 65538 --max-running-requests 16 \
--mem-fraction-static 0.7 --port 30000
```
Then pass `--root-url http://127.0.0.1:30000 --root-model PMM-4B` to `pmm ask` or `pmm eval`. `--root-model` must be the local directory. PMM also needs a Qwen3-VL-8B-Instruct submodel server; the code repository has the full commands and a HippoVlog example.
## License
Apache-2.0, the same as the base model.
## Citation
```bibtex
@article{shang2026pmm,
title = {Programmatic Multimodal Memory: Learning to Read Long Videos with Code},
author = {Shang, Xuanming and Han, Yuhang and Shu, Yan and Liu, Dingning and Ding, Li and Qiang, Tao and Shao, Zhiqi and Yang, Zequn and Wang, Yanfeng},
journal = {arXiv preprint arXiv:2611.41408},
year = {2026}
}
```