Instructions to use bingyang-lei/Qwen3-8B-Thinking-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-Thinking-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-Thinking-Draft-OPD", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("bingyang-lei/Qwen3-8B-Thinking-Draft-OPD", trust_remote_code=True) model = AutoModel.from_pretrained("bingyang-lei/Qwen3-8B-Thinking-Draft-OPD", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bingyang-lei/Qwen3-8B-Thinking-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-Thinking-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-Thinking-Draft-OPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bingyang-lei/Qwen3-8B-Thinking-Draft-OPD
- SGLang
How to use bingyang-lei/Qwen3-8B-Thinking-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-Thinking-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-Thinking-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-Thinking-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-Thinking-Draft-OPD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bingyang-lei/Qwen3-8B-Thinking-Draft-OPD with Docker Model Runner:
docker model run hf.co/bingyang-lei/Qwen3-8B-Thinking-Draft-OPD
Qwen3-8B-Thinking-Draft-OPD
This repository contains Qwen3-8B-Thinking-Draft-OPD, a draft model for speculative decoding.
- Paper: Draft-OPD: On-Policy Distillation for Speculative Draft Models
- Repository: https://github.com/bingyang-lei/Draft-OPD
- Project Page: https://www.haodilei.top/draft-opd/
Model Details
- Target Model:
Qwen3-8B(enable_thinking=True) - Model type: Draft model for speculative decoding
- Architecture: Same as the original DFlash draft model
- Post-training method: Draft-OPD (On-Policy Distillation)
Performance and Training Method
Draft-OPD 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. This allows the drafter to learn from target feedback on both accepted and rejected proposals, focusing training on the draft-induced errors that limit speculative acceptance.
Experiments show that Draft-OPD achieves over 5× lossless acceleration for thinking models across diverse tasks, improving over EAGLE-3 and DFlash by 23% and 13% respectively.
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
- 14