divelab/opdlm_train_data
Viewer • Updated • 61.8k • 175
Run divelab/OPDLM-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs and TRL to fine-tune https://huggingface.co/divelab/OPDLM-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/divelab/OPDLM-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to evaluate https://huggingface.co/divelab/OPDLM-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to create a 4-bit version of https://huggingface.co/divelab/OPDLM-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use divelab/OPDLM-4B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="divelab/OPDLM-4B")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModelWithLMHead
model = AutoModelWithLMHead.from_pretrained("divelab/OPDLM-4B", device_map="auto")How to use divelab/OPDLM-4B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "divelab/OPDLM-4B"
# 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-4B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/divelab/OPDLM-4B
How to use divelab/OPDLM-4B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "divelab/OPDLM-4B" \
--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-4B",
"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-4B" \
--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-4B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use divelab/OPDLM-4B with Docker Model Runner:
docker model run hf.co/divelab/OPDLM-4B
OPDLM-4B 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
For detailed results and benchmarks, please refer to our paper: arxiv.org/abs/2606.06712
@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},
}