Instructions to use GSAI-ML/iLLaDA-8B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GSAI-ML/iLLaDA-8B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GSAI-ML/iLLaDA-8B-Instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("GSAI-ML/iLLaDA-8B-Instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GSAI-ML/iLLaDA-8B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GSAI-ML/iLLaDA-8B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GSAI-ML/iLLaDA-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GSAI-ML/iLLaDA-8B-Instruct
- SGLang
How to use GSAI-ML/iLLaDA-8B-Instruct 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 "GSAI-ML/iLLaDA-8B-Instruct" \ --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": "GSAI-ML/iLLaDA-8B-Instruct", "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 "GSAI-ML/iLLaDA-8B-Instruct" \ --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": "GSAI-ML/iLLaDA-8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GSAI-ML/iLLaDA-8B-Instruct with Docker Model Runner:
docker model run hf.co/GSAI-ML/iLLaDA-8B-Instruct
Add pipeline tag, library name, and link to paper
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
-
|
| 6 |
# iLLaDA-8B-Instruct
|
| 7 |
|
| 8 |
iLLaDA is an 8B fully bidirectional masked diffusion language model trained from scratch with 12T pre-training tokens, an 8192-token context length, variable-length generation, and confidence-based scoring for multiple-choice evaluation.
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
## Architecture
|
| 12 |
|
|
@@ -35,4 +54,15 @@ Inference and evaluation codes: https://github.com/ML-GSAI/LLaDA.
|
|
| 35 |
| MATH | 56.7 | 42.2 | 39.2 | 75.5 |
|
| 36 |
| HumanEval | 65.9 | 49.4 | 55.5 | 84.8 |
|
| 37 |
| MBPP | 58.0 | 41.0 | 58.8 | 79.2 |
|
| 38 |
-
| Average | 67.1 | 54.5 | 60.2 | 77.1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
---
|
| 6 |
|
|
|
|
| 7 |
# iLLaDA-8B-Instruct
|
| 8 |
|
| 9 |
iLLaDA is an 8B fully bidirectional masked diffusion language model trained from scratch with 12T pre-training tokens, an 8192-token context length, variable-length generation, and confidence-based scoring for multiple-choice evaluation.
|
| 10 |
+
|
| 11 |
+
For more details, please refer to the paper: [Improved Large Language Diffusion Models](https://huggingface.co/papers/2606.25331).
|
| 12 |
+
|
| 13 |
+
Inference and evaluation codes can be found in the [LLaDA GitHub Repository](https://github.com/ML-GSAI/LLaDA).
|
| 14 |
+
|
| 15 |
+
## How to Use
|
| 16 |
+
|
| 17 |
+
You can load the model and tokenizer using the `transformers` library:
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
import torch
|
| 21 |
+
from transformers import AutoModel, AutoTokenizer
|
| 22 |
+
|
| 23 |
+
# Load the tokenizer and model
|
| 24 |
+
tokenizer = AutoTokenizer.from_pretrained('GSAI-ML/iLLaDA-8B-Instruct', trust_remote_code=True)
|
| 25 |
+
model = AutoModel.from_pretrained('GSAI-ML/iLLaDA-8B-Instruct', trust_remote_code=True, torch_dtype=torch.bfloat16)
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
For customized generation and evaluation scripts (such as `generate.py` and `chat.py`), please visit the official [GitHub repository](https://github.com/ML-GSAI/LLaDA).
|
| 29 |
|
| 30 |
## Architecture
|
| 31 |
|
|
|
|
| 54 |
| MATH | 56.7 | 42.2 | 39.2 | 75.5 |
|
| 55 |
| HumanEval | 65.9 | 49.4 | 55.5 | 84.8 |
|
| 56 |
| MBPP | 58.0 | 41.0 | 58.8 | 79.2 |
|
| 57 |
+
| Average | 67.1 | 54.5 | 60.2 | 77.1 |
|
| 58 |
+
|
| 59 |
+
## Citation
|
| 60 |
+
|
| 61 |
+
```bibtex
|
| 62 |
+
@article{nie2025large,
|
| 63 |
+
title={Large Language Diffusion Models},
|
| 64 |
+
author={Nie, Shen and Zhu, Fengqi and You, Zebin and Zhang, Xiaolu and Ou, Jingyang and Hu, Jun and Zhou, Jun and Lin, Yankai and Wen, Ji-Rong and Li, Chongxuan},
|
| 65 |
+
journal={arXiv preprint arXiv:2502.09992},
|
| 66 |
+
year={2025}
|
| 67 |
+
}
|
| 68 |
+
```
|