Run this model with HF Jobs
Run apple/dStreamer 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 to fine-tune https://huggingface.co/apple/dStreamer. 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/apple/dStreamer 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.
Instructions to use apple/dStreamer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use apple/dStreamer with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download apple/dStreamer --local-dir dStreamer
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Model card: online RLVR and serving throughput
Browse filesFiles changed (2)
- README.md+22-19
- assets/serving_frontier.pngAdded
19 unmodified lines20212223242526272829303132333435363727282930313233343536373839404142383940414243444546474849505118 unmodified lines70717267686973747519 unmodified lines <a href="https://apple-aiml-research.github.io/ml-dStreamer/"><img src="https://img.shields.io/badge/Blog-interactive-3fb950"></a></p>
DStreamer is a lossless, diffusion-based speculative decoding method. Its drafter is a small adapterthat reads the target model's KV cache and drafts a whole window in one pass, so it needs **no draftKV cache**. Output is identical to the target model's own decoding. The drafter is trained with diffusioninitialization, consistency distillation and acceptance-aligned reinforcement learning.
## Online RLVR: 1.93–2.15× faster training
During RLVR the policy keeps changing, so **DStreamer++** keeps updating the drafter on the samerollouts. Rollouts stay exact samples from the current policy: **1.93–2.15×** end-to-end speedup onQwen3-4B, 8B and 14B, with final policy quality preserved.
<p align="center"> <a href="https://apple-aiml-research.github.io/ml-dStreamer/"><img src="https://raw.githubusercontent.com/apple-aiml-research/ml-dStreamer/main/assets/rlvr.gif" width="94%" alt="Online RLVR: a frozen drafter's speedup decays as the policy changes; DStreamer++ keeps it, and the training reward is unchanged"></a></p>
DStreamer is a lossless, diffusion-based speculative decoding method. Its drafter is a small adapterthat reads the target model's KV cache and drafts a whole window in one pass, with no separate draftmodel or draft KV cache. Output is identical to the target model's own decoding.
<table align="center"> <tr> <td align="center" width="33%"><h2>3.8×</h2>serving throughput<br><sub>vs. autoregressive decoding, vLLM</sub></td> <td align="center" width="33%"><h2>1.93–2.15×</h2>faster RLVR training<br><sub>Qwen3-4B / 8B / 14B, final quality preserved</sub></td> <td align="center" width="33%"><h2>0</h2>extra KV cache<br><sub>for the drafter</sub></td> </tr></table>
**How it is trained.** DStreamer trains the drafter in three stages: **diffusion initialization**,**consistency distillation**, and **acceptance-aligned reinforcement learning** that rewards drafts thetarget accepts. During RLVR the policy keeps changing, so **DStreamer++** keeps updating the drafter onthe same rollouts; the rollouts stay exact samples from the current policy.## Serving throughput
Qwen3-4B under vLLM continuous batching on GSM8K, with concurrency swept from 64 to 1024. Each curve plotsaggregate system throughput against per-request output rate. DStreamer traces the outer frontier relativeto EAGLE-3 and DFlash (block sizes 4 and 16) across the evaluated range. At matched per-request rate itreaches up to **3.8×** the aggregate throughput of autoregressive decoding, with **zero draft KV cache**:the adapter reads the target model's own KV cache.
<p align="center"> <img src="https://huggingface.co/apple/dStreamer/resolve/main/assets/serving_frontier.png" width="80%" alt="Serving frontier on GSM8K, Qwen3-4B in vLLM: system throughput vs per-request throughput for DStreamer, DFlash, EAGLE-3 and autoregressive decoding at concurrencies 64 to 1024"></p>
## Checkpoints
18 unmodified linesbash vllm-port/scripts/run_dstreamer_vllm.sh --adapter checkpoints/qwen3-4b-k4/adapter.pt --cudagraphs```
<p align="center"> <img src="https://raw.githubusercontent.com/apple-aiml-research/ml-dStreamer/main/assets/demo.gif" width="94%" alt="Autoregressive decoding, EAGLE-3, DFlash and DStreamer on 256 concurrent requests in vLLM"></p>
**Apple silicon (MLX):**
README.md+22-19
assets/serving_frontier.pngAdded
