Text Generation
Transformers
Safetensors
English
a2d-qwen3
fill-mask
DLLM
diffusion-language-model
on-policy-distillation
post-training
conversational
Instructions to use divelab/OPDLM-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use divelab/OPDLM-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="divelab/OPDLM-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelWithLMHead model = AutoModelWithLMHead.from_pretrained("divelab/OPDLM-8B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use divelab/OPDLM-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "divelab/OPDLM-8B" # 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-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/divelab/OPDLM-8B
- SGLang
How to use divelab/OPDLM-8B 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-8B" \ --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-8B", "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-8B" \ --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-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use divelab/OPDLM-8B with Docker Model Runner:
docker model run hf.co/divelab/OPDLM-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,13 +12,13 @@ pipeline_tag: text-generation
|
|
| 12 |
base_model: Qwen/Qwen3-8B
|
| 13 |
datasets:
|
| 14 |
- divelab/opdlm_train_data
|
|
|
|
| 15 |
---
|
| 16 |
-
|
| 17 |
# OPDLM-8B
|
| 18 |
|
| 19 |
OPDLM-8B is a block diffusion language model (DLM) obtained by post-training an
|
| 20 |
autoregressive language model (ARLM) into a diffusion language model via
|
| 21 |
-
**on-policy distillation**.
|
| 22 |
|
| 23 |
## Highlights
|
| 24 |
- **Converted, not pretrained from scratch:** built from a strong ARLM, reusing its prior.
|
|
@@ -40,7 +40,6 @@ autoregressive language model (ARLM) into a diffusion language model via
|
|
| 40 |
- **Data:** [opdlm_train_data](https://huggingface.co/datasets/divelab/opdlm_train_data)
|
| 41 |
|
| 42 |
## Evaluation
|
| 43 |
-
|
| 44 |
| Benchmark | Score |
|
| 45 |
|-------------|-------|
|
| 46 |
| MMLU | 70.9 |
|
|
@@ -65,6 +64,6 @@ Decoding: static (one token per step)
|
|
| 65 |
eprint={2606.06712},
|
| 66 |
archivePrefix={arXiv},
|
| 67 |
primaryClass={cs.CL},
|
| 68 |
-
url={https://arxiv.org/abs/2606.06712},
|
| 69 |
-
|
| 70 |
```
|
|
|
|
| 12 |
base_model: Qwen/Qwen3-8B
|
| 13 |
datasets:
|
| 14 |
- divelab/opdlm_train_data
|
| 15 |
+
arxiv: 2606.06712
|
| 16 |
---
|
|
|
|
| 17 |
# OPDLM-8B
|
| 18 |
|
| 19 |
OPDLM-8B is a block diffusion language model (DLM) obtained by post-training an
|
| 20 |
autoregressive language model (ARLM) into a diffusion language model via
|
| 21 |
+
**on-policy distillation**. arXiv report: [arxiv.org/abs/2606.06712](https://arxiv.org/abs/2606.06712)
|
| 22 |
|
| 23 |
## Highlights
|
| 24 |
- **Converted, not pretrained from scratch:** built from a strong ARLM, reusing its prior.
|
|
|
|
| 40 |
- **Data:** [opdlm_train_data](https://huggingface.co/datasets/divelab/opdlm_train_data)
|
| 41 |
|
| 42 |
## Evaluation
|
|
|
|
| 43 |
| Benchmark | Score |
|
| 44 |
|-------------|-------|
|
| 45 |
| MMLU | 70.9 |
|
|
|
|
| 64 |
eprint={2606.06712},
|
| 65 |
archivePrefix={arXiv},
|
| 66 |
primaryClass={cs.CL},
|
| 67 |
+
url={https://arxiv.org/abs/2606.06712},
|
| 68 |
+
}
|
| 69 |
```
|