Skip to main content

1. Model Introduction

LLaDA 2.1 is a series of large-scale discrete diffusion language models (dLLMs) developed by the InclusionAI team at Ant Group. Unlike traditional autoregressive models that generate text left-to-right one token at a time, LLaDA 2.1 uses a diffusion-based approach — drafting tokens in parallel and refining them through iterative denoising, enabling self-correction during generation. Key Features:
  • Token Editing (T2T + M2T): Combines Mask-to-Token (M2T) and Token-to-Token (T2T) editing, allowing the model to not only unmask tokens but also revise already-generated tokens mid-flight
  • Dual Decoding Modes: Speed Mode (S) for maximum throughput with T2T refinement, and Quality Mode (Q) for conservative thresholds and higher benchmark scores
  • MoE Architecture: Both variants use Mixture-of-Experts architecture for efficient scaling
  • First Large-Scale RL for dLLMs: Implements the first reinforcement learning framework specifically designed for diffusion language models, improving reasoning and instruction-following
  • Lightning-Fast Decoding: Up to 892 tokens/s on HumanEval+ for the 100B model
Available Models:
ModelParametersArchitectureContext LengthHuggingFace
LLaDA2.1-mini16BMoE (20 layers, 16 attention heads)32,768 tokensinclusionAI/LLaDA2.1-mini
LLaDA2.1-flash100BMoE32,768 tokensinclusionAI/LLaDA2.1-flash
License: Apache 2.0. Please refer to the official LLaDA2.X repository for details.

2. SGLang Installation

SGLang offers multiple installation methods. You can choose the most suitable installation method based on your hardware platform and requirements. Please refer to the official SGLang installation guide for installation instructions.

3. Model Deployment

This section provides deployment configurations optimized for different hardware platforms and use cases.

3.1 Basic Configuration

Interactive Command Generator: Use the configuration selector below to automatically generate the appropriate deployment command for your hardware platform, model size, and decoding mode. SGLang supports serving LLaDA-2.1 on NVIDIA H100, H200, B200, and AMD MI300X, MI325X, MI355X GPUs.

3.2 Configuration Tips

dLLM-Specific Parameters:
ParameterDescriptionRecommended Value
--dllm-algorithmDiffusion decoding algorithmJointThreshold
--trust-remote-codeRequired for LLaDA model loadingAlways enabled
--mem-fraction-staticStatic memory fraction for KV cache0.8
--max-running-requestsMaximum concurrent requests1 (for best quality)
--attention-backendAttention computation backendflashinfer
Decoding Mode Comparison:
ModeThresholdSpeedQualityBest For
Quality Mode (Q)ConservativeModerateHigher benchmark scoresAccuracy-critical tasks
Speed Mode (S)AggressiveVery fast, relies on T2T editingSlightly lowerThroughput-critical tasks
Hardware Requirements:
  • LLaDA2.1-mini (16B): ~47 GB VRAM, runs on a single GPU (TP=1)
  • LLaDA2.1-flash (100B): Requires multi-GPU setup (TP=4 on H100/H200, TP=2 on B200)

4. Model Invocation

4.1 Deployment

Start the server using the command generated above, for example:
Command

4.2 Basic Usage

For basic API usage and request examples, please refer to: Simple Completion Example:
Example
Output Example:
Output

4.3 Advanced Usage

4.3.1 Streaming

Example
Output Example:
Output

4.3.2 Code Generation

Example
Output Example:
Output

5. Benchmark

This section uses industry-standard configurations for comparable benchmark results.

5.1 Speed Benchmark

Test Environment:
  • Hardware: NVIDIA B200 (4x)
  • SGLang Version: 0.5.8+

5.1.1 LLaDA2.1-mini

Model Deployment:
Command
  • Latency Benchmark
Command
  • Latency Result:
Output
  • Throughput Benchmark
Command
  • Throughput Result:
Output

5.1.2 LLaDA2.1-flash

Model Deployment:
Command
  • Latency Benchmark
Command
  • Latency Result:
Output
  • Throughput Benchmark
Command
  • Throughput Result:
Output

5.2 Accuracy Benchmark

5.2.1 GSM8K Benchmark

Command
Results:
Output