divelab/opdlm_train_data
Viewer • Updated • 61.8k • 1
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
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.
| 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)
[FILL: BibTeX once the paper/arXiv is up]