Streaming-dLLM  by xiaoshideta

Accelerating diffusion language models with suffix pruning and dynamic decoding

Created 7 months ago
421 stars

Top 69.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Streaming-dLLM is a training-free framework designed to accelerate diffusion language models such as Dream, LLaDA, and Open Pangu. It targets researchers and practitioners aiming for significantly faster inference speeds without compromising model accuracy. The framework offers substantial throughput gains, making large diffusion models more practical for real-time applications.

How It Works

The core innovation lies in "Suffix Pruning and Dynamic Decoding." Suffix pruning approximates future token regions by retaining only the nearest neighboring context within a sliding window, effectively reducing redundant computations. Dynamic decoding further optimizes the generation process. This approach intelligently prunes the attention scope, leading to substantial speedups without requiring model retraining. A specialized extension also adapts this methodology for block-causal diffusion models.

Quick Start & Requirements

Installation involves cloning the repository, creating a Conda environment with Python 3.10.19, installing dependencies via pip install -r requirements.txt, and activating the environment. Users must download model weights for Dream, LLaDA, LLaDA-1.5, and Open Pangu separately using provided links. Inference is initiated via model-specific shell scripts (e.g., eval_dream.sh) or Python scripts (e.g., generate_streaming.py for Open Pangu).

Highlighted Details

The framework achieves 3.7×–13.3× speedup over vanilla backbones across benchmarks including HumanEval, GSM8K, MBPP, and MATH. Compared to state-of-the-art acceleration methods, it provides an additional 1.5×–2.3× speedup for generation lengths of 512 tokens, while maintaining comparable or improved accuracy. For the Open Pangu model, it demonstrates up to a 1.6× throughput increase with enhanced accuracy.

Maintenance & Community

The provided README does not detail specific maintenance schedules, active contributors, or community channels such as Discord or Slack.

Licensing & Compatibility

The README does not explicitly state the project's license. It acknowledges contributions from Fast-dLLM, LLaDA, Dream, and Open Pangu; their individual licenses would require separate verification for compatibility, particularly for commercial use or integration into closed-source projects.

Limitations & Caveats

This framework is designed for accelerating existing diffusion LLMs and does not introduce new model architectures. Its performance benefits may vary depending on the specific model and task, especially for architectures not explicitly covered by the block-causal extension.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), Hanlin Tang Hanlin Tang(CTO Neural Networks at Databricks; Cofounder of MosaicML), and
1 more.

diffusion by mosaicml

0%
718
Diffusion model training code
Created 3 years ago
Updated 1 month ago
Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral) and Jiaming Song Jiaming Song(Chief Scientist at Luma AI).

tomesd by dbolya

0%
1k
Speed-up tool for Stable Diffusion
Created 3 years ago
Updated 2 years ago
Starred by Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), and
8 more.

EAGLE by SafeAILab

0%
2k
Speculative decoding research paper for faster LLM inference
Created 2 years ago
Updated 6 months ago
Feedback? Help us improve.