divelab/opdlm_train_data
Viewer • Updated • 61.8k • 16
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")How to use divelab/OPDLM-8B with vLLM:
# 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?"
}
]
}'docker model run hf.co/divelab/OPDLM-8B
How to use divelab/OPDLM-8B with SGLang:
# 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?"
}
]
}'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?"
}
]
}'How to use divelab/OPDLM-8B with Docker Model Runner:
docker model run hf.co/divelab/OPDLM-8B
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?"
}
]
}'OPDLM-8B 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
| Benchmark | Score |
|---|---|
| MMLU | 70.9 |
| MMLU-Pro | 53.7 |
| GPQA-Diamond | 36.1 |
| IFEval | 50.1 |
| GSM8K | 87.1 |
| MATH500 | 71.2 |
| AIME-24 | 14.7 |
| AIME-25 | 12.4 |
| HumanEval | 59.8 |
| MBPP | 48.7 |
Decoding: static (one token per step)
@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},
}
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?" } ] }'