Instructions to use bingyang-lei/Qwen3-8B-Ins-Draft-OPD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bingyang-lei/Qwen3-8B-Ins-Draft-OPD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bingyang-lei/Qwen3-8B-Ins-Draft-OPD", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("bingyang-lei/Qwen3-8B-Ins-Draft-OPD", trust_remote_code=True) model = AutoModel.from_pretrained("bingyang-lei/Qwen3-8B-Ins-Draft-OPD", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bingyang-lei/Qwen3-8B-Ins-Draft-OPD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bingyang-lei/Qwen3-8B-Ins-Draft-OPD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bingyang-lei/Qwen3-8B-Ins-Draft-OPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bingyang-lei/Qwen3-8B-Ins-Draft-OPD
- SGLang
How to use bingyang-lei/Qwen3-8B-Ins-Draft-OPD 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 "bingyang-lei/Qwen3-8B-Ins-Draft-OPD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bingyang-lei/Qwen3-8B-Ins-Draft-OPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "bingyang-lei/Qwen3-8B-Ins-Draft-OPD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bingyang-lei/Qwen3-8B-Ins-Draft-OPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bingyang-lei/Qwen3-8B-Ins-Draft-OPD with Docker Model Runner:
docker model run hf.co/bingyang-lei/Qwen3-8B-Ins-Draft-OPD
Use Docker
docker model run hf.co/bingyang-lei/Qwen3-8B-Ins-Draft-OPDQwen3-8B-Ins-Draft-OPD
This repository contains Qwen3-8B-Ins-Draft-OPD, a draft model for speculative decoding.
The model is post-trained from z-lab/Qwen3-8B-DFlash-b16. It keeps the overall architecture and inference interface consistent with the original DFlash draft model, while further adapting the draft model through the Draft-OPD post-training method.
- Paper: Draft-OPD: On-Policy Distillation for Speculative Draft Models
- Project Page: https://www.haodilei.top/draft-opd/
- Repository: https://github.com/bingyang-lei/Draft-OPD
Model Details
- Target Model:
Qwen3-8B(enable_thinking=False) - Model type: Draft model for speculative decoding
- Architecture: Same as the original DFlash draft model
- Post-training method: Draft-OPD
Performance and Training Method
Draft-OPD (On-Policy Distillation) trains speculative draft models with on-policy target feedback. Instead of only learning from fixed target-generated trajectories, the drafter is supervised on draft-induced states exposed during speculative verification, including the positions where draft proposals are rejected.
Experiments show that Draft-OPD achieves over 5x lossless acceleration for thinking models across diverse tasks, improving over previous methods like EAGLE-3 and DFlash.
For detailed training procedures, evaluation settings, and performance results, please refer to the paper.
Citation
If you find our work useful, please consider citing our paper:
@misc{lei2026draftopdonpolicydistillationspeculative,
title={Draft-OPD: On-Policy Distillation for Speculative Draft Models},
author={Haodi Lei and Yafy Li and Haoran Zhang and Shunkai Zhang and Qianjia Cheng and Xiaoye Qu and Ganqu Cui and Bowen Zhou and Ning Ding and Yun Luo and Yu Cheng},
year={2026},
eprint={2605.29343},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2605.29343},
}
- Downloads last month
- 65
Model tree for bingyang-lei/Qwen3-8B-Ins-Draft-OPD
Base model
z-lab/Qwen3-8B-DFlash-b16
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "bingyang-lei/Qwen3-8B-Ins-Draft-OPD"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bingyang-lei/Qwen3-8B-Ins-Draft-OPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'