Instructions to use GSAI-ML/iLLaDA-8B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GSAI-ML/iLLaDA-8B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GSAI-ML/iLLaDA-8B-Base", 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-Base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GSAI-ML/iLLaDA-8B-Base 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-Base" # 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-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GSAI-ML/iLLaDA-8B-Base
- SGLang
How to use GSAI-ML/iLLaDA-8B-Base 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-Base" \ --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-Base", "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-Base" \ --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-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GSAI-ML/iLLaDA-8B-Base with Docker Model Runner:
docker model run hf.co/GSAI-ML/iLLaDA-8B-Base
Improve model card: add pipeline tag, library name, and paper link
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
# iLLaDA-8B-Base
|
| 6 |
|
| 7 |
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.
|
|
|
|
|
|
|
| 8 |
Inference and evaluation codes: https://github.com/ML-GSAI/LLaDA.
|
| 9 |
|
| 10 |
## Architecture
|
|
@@ -36,4 +40,29 @@ Inference and evaluation codes: https://github.com/ML-GSAI/LLaDA.
|
|
| 36 |
| MATH | 38.4 | 31.4 | 39.6 | 41.1 |
|
| 37 |
| HumanEval | 50.0 | 35.4 | 57.9 | 56.7 |
|
| 38 |
| MBPP | 57.8 | 40.0 | 56.2 | 63.6 |
|
| 39 |
-
| Average | 63.9 | 51.1 | 61.4 | 63.3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
---
|
| 6 |
|
| 7 |
# iLLaDA-8B-Base
|
| 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 |
+
It was introduced in the paper [Improved Large Language Diffusion Models](https://huggingface.co/papers/2606.25331).
|
| 11 |
+
|
| 12 |
Inference and evaluation codes: https://github.com/ML-GSAI/LLaDA.
|
| 13 |
|
| 14 |
## Architecture
|
|
|
|
| 40 |
| MATH | 38.4 | 31.4 | 39.6 | 41.1 |
|
| 41 |
| HumanEval | 50.0 | 35.4 | 57.9 | 56.7 |
|
| 42 |
| MBPP | 57.8 | 40.0 | 56.2 | 63.6 |
|
| 43 |
+
| Average | 63.9 | 51.1 | 61.4 | 63.3 |
|
| 44 |
+
|
| 45 |
+
## How to use
|
| 46 |
+
|
| 47 |
+
You can load and use the model with `transformers` as follows:
|
| 48 |
+
|
| 49 |
+
```python
|
| 50 |
+
import torch
|
| 51 |
+
from transformers import AutoModel, AutoTokenizer
|
| 52 |
+
|
| 53 |
+
tokenizer = AutoTokenizer.from_pretrained('GSAI-ML/iLLaDA-8B-Base', trust_remote_code=True)
|
| 54 |
+
model = AutoModel.from_pretrained('GSAI-ML/iLLaDA-8B-Base', trust_remote_code=True, torch_dtype=torch.bfloat16)
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
Refer to the [GitHub repository](https://github.com/ML-GSAI/LLaDA) for generation scripts such as `generate.py`.
|
| 58 |
+
|
| 59 |
+
## Citation
|
| 60 |
+
|
| 61 |
+
```bibtex
|
| 62 |
+
@article{nie2026illada,
|
| 63 |
+
title={Improved Large Language Diffusion Models},
|
| 64 |
+
author={Nie, Shen and Min, Qiyang and Xu, Shaoxuan and Huang, Zihao and Song, Yuxuan and Shan, Yong and Lin, Yankai and Zhao, Wayne Xin and Li, Chongxuan and Wen, Ji-Rong},
|
| 65 |
+
journal={arXiv preprint arXiv:2606.25331},
|
| 66 |
+
year={2026}
|
| 67 |
+
}
|
| 68 |
+
```
|