Instructions to use Alexislhb/StreamAPD-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alexislhb/StreamAPD-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Alexislhb/StreamAPD-9B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Alexislhb/StreamAPD-9B") model = AutoModelForMultimodalLM.from_pretrained("Alexislhb/StreamAPD-9B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Alexislhb/StreamAPD-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Alexislhb/StreamAPD-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alexislhb/StreamAPD-9B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Alexislhb/StreamAPD-9B
- SGLang
How to use Alexislhb/StreamAPD-9B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Alexislhb/StreamAPD-9B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alexislhb/StreamAPD-9B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Alexislhb/StreamAPD-9B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alexislhb/StreamAPD-9B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Alexislhb/StreamAPD-9B with Docker Model Runner:
docker model run hf.co/Alexislhb/StreamAPD-9B
StreamAPD-9B
Project Page: https://alexios-hub.github.io/StreamAPD-Page/ ยท Collection: Alexislhb/StreamAPD ยท Code: Alexios-hub/StreamAPD
StreamAPD-9B is a self-distilled online streaming video-language model adapted from Qwen/Qwen3.5-9B via StreamAPD (Self-Improving Offline Video LLMs for Online Interaction via Agentic Policy Distillation).
Without architectural modifications, external stronger teacher annotations, or extra memory modules, StreamAPD-9B extends the base vocabulary with two special decision tokens so that it jointly decides when to speak and what to answer in a single autoregressive pass:
| Decision Token | Token ID | Behavior |
|---|---|---|
</Silence> |
248077 |
Remain silent and continue observing incoming video frames |
</Response> |
248078 |
Respond immediately with the answer text that follows |
Benchmark Results (Paper Table 1)
Across 9 streaming video benchmarks (10 metrics), self-distilled StreamAPD-9B improves Qwen3.5-9B Overall performance from 35.70 to 48.84 (+13.13):
| Benchmark | Qwen3.5-9B | StreamAPD-9B | Gain |
|---|---|---|---|
| OVO-Bench | 61.24 | 66.33 | +5.10 |
| StreamingBench Real-Time | 84.76 | 88.36 | +3.60 |
| OVBench | 46.70 | 60.17 | +13.47 |
| ODVBench | 56.52 | 63.63 | +7.10 |
| StreamingBench Proactive | 27.20 | 55.60 | +28.40 |
| PhoStream | 36.77 | 42.00 | +5.23 |
| OmniMMI | 14.80 | 25.93 | +11.13 |
| ViSpeak-Bench (0โ5) | 0.82 | 2.00 | +1.18 |
| SPOT-Bench | 3.76 | 15.24 | +11.49 |
| IPIBench | 8.89 | 31.09 | +22.20 |
| Overall | 35.70 | 48.84 | +13.13 |
Usage with vLLM
Serve the checkpoint with its bundled tokenizer, processor, and chat template (keep skip_special_tokens=False and return_token_ids=True when parsing decision tokens):
python -m vllm.entrypoints.openai.api_server \
--model Alexislhb/StreamAPD-9B \
--served-model-name streamapd-9b \
--dtype bfloat16 --generation-config vllm \
--max-model-len 65536 \
--limit-mm-per-prompt '{"image":768,"video":0}' \
--chat-template-content-format openai
License
Weights and configuration are distributed under the Apache-2.0 license, inheriting from Qwen/Qwen3.5-9B.
- Downloads last month
- -