Add model card and link to paper
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-4.0
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
pipeline_tag: text-classification
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# NI Sampling: Accelerating Discrete Diffusion Sampling by Token Order Optimization
|
| 7 |
+
|
| 8 |
+
This repository contains the trained indicator for **Neural Indicator Sampling (NI Sampling)**, a framework designed to accelerate the sampling process of discrete diffusion Large Language Models (dLLMs).
|
| 9 |
+
|
| 10 |
+
NI Sampling utilizes a neural indicator to decide which tokens should be sampled at each step, leveraging correct predictions to reduce the number of sampling iterations by an order of magnitude. Experiments on models like LLaDA and Dream show up to 14.3x acceleration with negligible performance drop.
|
| 11 |
+
|
| 12 |
+
- **Paper:** [NI Sampling: Accelerating Discrete Diffusion Sampling by Token Order Optimization](https://huggingface.co/papers/2604.18471)
|
| 13 |
+
- **Code:** [GitHub Repository](https://github.com/imagination-research/NI-Sampling)
|
| 14 |
+
|
| 15 |
+
## Overview
|
| 16 |
+
|
| 17 |
+
Neural Indicator Sampling (NI Sampling) is a novel framework designed to accelerate the sampling process of diffusion Large Language Models (LLMs). By training a lightweight neural indicator, we can dynamically predict which tokens should be sampled at each step, significantly reducing redundant computations while maintaining high generation quality.
|
| 18 |
+
|
| 19 |
+
## Evaluation
|
| 20 |
+
|
| 21 |
+
To evaluate the indicator on benchmarks using the official implementation, you can use commands like the following:
|
| 22 |
+
|
| 23 |
+
```bash
|
| 24 |
+
# GSM8K
|
| 25 |
+
accelerate launch --main_process_port 11450 --num_processes 1 eval_llada.py --tasks gsm8k --model llada_dist --model_args model_path='GSAI-ML/LLaDA-8B-Instruct',gen_length=256,steps=256,block_length=64,prob_threshold=0.95,indicator_path="indicator_LLaDA.pth",indicator_threshold=0.89,use_indicator=True
|
| 26 |
+
|
| 27 |
+
# HumanEval
|
| 28 |
+
accelerate launch --main_process_port 11450 --num_processes 1 eval_llada.py --tasks humaneval --model llada_dist --confirm_run_unsafe_code --model_args model_path='GSAI-ML/LLaDA-8B-Instruct',gen_length=256,steps=256,block_length=32,prob_threshold=0.95,indicator_path="indicator_LLaDA.pth",indicator_threshold=0.89,use_indicator=True
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
## Citation
|
| 32 |
+
|
| 33 |
+
```bibtex
|
| 34 |
+
@inproceedings{liuni,
|
| 35 |
+
title={NI Sampling: Accelerating Discrete Diffusion Sampling by Token Order Optimization},
|
| 36 |
+
author={Liu, Enshu and Ning, Xuefei and Wang, Yu and Lin, Zinan},
|
| 37 |
+
booktitle={The Fourteenth International Conference on Learning Representations}
|
| 38 |
+
}
|
| 39 |
+
```
|