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
|
@@ -22,26 +22,24 @@ autoregressive language model (ARLM) into a diffusion language model via
|
|
| 22 |
|
| 23 |
## Highlights
|
| 24 |
- **Converted, not pretrained from scratch:** built from a strong ARLM, reusing its prior.
|
| 25 |
-
- **Training-efficient:** ~
|
| 26 |
- **Inference-efficient:** parallel token decoding via block diffusion.
|
| 27 |
|
| 28 |
## Model Details
|
| 29 |
-
- **Developed by:**
|
| 30 |
- **Base model:** [Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B)
|
| 31 |
- **Model type:** Block diffusion language model (decoder-based)
|
| 32 |
-
- **Block size:**
|
| 33 |
- **Parameters:** ~8B
|
| 34 |
- **Language:** English
|
| 35 |
- **License:** MIT
|
| 36 |
|
| 37 |
## Training
|
| 38 |
- **Method:** On-policy distillation from a frozen ARLM teacher into a block DLM student.
|
| 39 |
-
- **Conversion budget:**
|
| 40 |
- **Data:** [opdlm_train_data](https://huggingface.co/datasets/divelab/opdlm_train_data)
|
| 41 |
|
| 42 |
## Evaluation
|
| 43 |
-
[CONFIRM all numbers — these are from our table for OPDLM-8B (non-thinking);
|
| 44 |
-
fill the thinking variant separately if releasing it]
|
| 45 |
|
| 46 |
| Benchmark | Score |
|
| 47 |
|-------------|-------|
|
|
@@ -56,7 +54,7 @@ fill the thinking variant separately if releasing it]
|
|
| 56 |
| HumanEval | 59.8 |
|
| 57 |
| MBPP | 48.7 |
|
| 58 |
|
| 59 |
-
Decoding:
|
| 60 |
|
| 61 |
## Citation
|
| 62 |
```bibtex
|
|
|
|
| 22 |
|
| 23 |
## Highlights
|
| 24 |
- **Converted, not pretrained from scratch:** built from a strong ARLM, reusing its prior.
|
| 25 |
+
- **Training-efficient:** ~0.066B tokens of conversion vs. ~50B tokens for from-scratch DLM training (same base ARLM).
|
| 26 |
- **Inference-efficient:** parallel token decoding via block diffusion.
|
| 27 |
|
| 28 |
## Model Details
|
| 29 |
+
- **Developed by:** DIVE Lab, Texas A&M University
|
| 30 |
- **Base model:** [Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B)
|
| 31 |
- **Model type:** Block diffusion language model (decoder-based)
|
| 32 |
+
- **Block size:** 4
|
| 33 |
- **Parameters:** ~8B
|
| 34 |
- **Language:** English
|
| 35 |
- **License:** MIT
|
| 36 |
|
| 37 |
## Training
|
| 38 |
- **Method:** On-policy distillation from a frozen ARLM teacher into a block DLM student.
|
| 39 |
+
- **Conversion budget:** ~0.066B tokens
|
| 40 |
- **Data:** [opdlm_train_data](https://huggingface.co/datasets/divelab/opdlm_train_data)
|
| 41 |
|
| 42 |
## Evaluation
|
|
|
|
|
|
|
| 43 |
|
| 44 |
| Benchmark | Score |
|
| 45 |
|-------------|-------|
|
|
|
|
| 54 |
| HumanEval | 59.8 |
|
| 55 |
| MBPP | 48.7 |
|
| 56 |
|
| 57 |
+
Decoding: static (one token per step)
|
| 58 |
|
| 59 |
## Citation
|
| 60 |
```bibtex
|