Text Generation
Transformers
Safetensors
English
a2d-qwen3
fill-mask
DLLM
diffusion-language-model
on-policy-distillation
post-training
conversational
Instructions to use divelab/OPDLM-1.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use divelab/OPDLM-1.7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="divelab/OPDLM-1.7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelWithLMHead model = AutoModelWithLMHead.from_pretrained("divelab/OPDLM-1.7B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use divelab/OPDLM-1.7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "divelab/OPDLM-1.7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "divelab/OPDLM-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/divelab/OPDLM-1.7B
- SGLang
How to use divelab/OPDLM-1.7B 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 "divelab/OPDLM-1.7B" \ --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": "divelab/OPDLM-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "divelab/OPDLM-1.7B" \ --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": "divelab/OPDLM-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use divelab/OPDLM-1.7B with Docker Model Runner:
docker model run hf.co/divelab/OPDLM-1.7B
| license: mit | |
| language: | |
| - en | |
| tags: | |
| - DLLM | |
| - diffusion-language-model | |
| - on-policy-distillation | |
| - post-training | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| base_model: Qwen/Qwen3-1.7B | |
| datasets: | |
| - divelab/opdlm_train_data | |
| arxiv: 2606.06712 | |
| # OPDLM-1.7B | |
| OPDLM-1.7B is a block diffusion language model (DLM) obtained by post-training an | |
| autoregressive language model (ARLM) into a diffusion language model via | |
| **on-policy distillation**. arXiv report: [arxiv.org/abs/2606.06712](https://arxiv.org/abs/2606.06712) | |
| ## Highlights | |
| - **Converted, not pretrained from scratch:** built from a strong ARLM, reusing its prior. | |
| - **Training-efficient:** orders of magnitude fewer tokens than from-scratch DLM training (same base ARLM). | |
| - **Inference-efficient:** parallel token decoding via block diffusion. | |
| ## Model Details | |
| - **Developed by:** DIVE Lab, Texas A&M University | |
| - **Base model:** [Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B) | |
| - **Model type:** Block diffusion language model (decoder-based) | |
| - **Block size:** 4 | |
| - **Parameters:** ~1.7B | |
| - **Language:** English | |
| - **License:** MIT | |
| ## Training | |
| - **Method:** On-policy distillation from a frozen ARLM teacher into a block DLM student. | |
| - **Conversion budget:** ~<fill in>B tokens | |
| - **Data:** [opdlm_train_data](https://huggingface.co/datasets/divelab/opdlm_train_data) | |
| ## Results | |
| For detailed results and benchmarks, please refer to our paper: [arxiv.org/abs/2606.06712](https://arxiv.org/abs/2606.06712) | |
| ## Citation | |
| ```bibtex | |
| @misc{su2026dataefficientautoregressivetodiffusionlanguagemodels, | |
| title={Data-Efficient Autoregressive-to-Diffusion Language Models via On-Policy Distillation}, | |
| author={Xingyu Su and Jacob Helwig and Shubham Parashar and Atharv Chagi and Lakshmi Jotsna and Degui Zhi and James Caverlee and Dileep Kalathil and Shuiwang Ji}, | |
| year={2026}, | |
| eprint={2606.06712}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.CL}, | |
| url={https://arxiv.org/abs/2606.06712}, | |
| } | |
| ``` |