LLaDA2.2-flash – InclusionAI's Open-Source Diffusion Language Model
Executive Summary:
LLaDA2.2-flash is a diffusion language model (dLLM) open-sourced by InclusionAI. It employs a Mixture-of-Experts (MoE) architecture with approximately 100B total parameters and natively supports a 128...
1. What is LLaDA2.2-flash
LLaDA2.2-flash is a diffusion language model (dLLM) open-sourced by InclusionAI. It employs a Mixture-of-Experts (MoE) architecture with approximately 100B total parameters and natively supports a 128K context window. The model generates complete sequences through multi-round parallel denoising, incorporating Levenshtein editing to enable sequence operations such as insertion, deletion, substitution, and retention. On seven Agent benchmarks, it achieves an average score of 53.83, closely approaching the 55.74 score of the same-scale autoregressive model Ling-2.6-flash, while maintaining a 1.64x decoding throughput advantage.
Technical Positioning and Domain: LLaDA2.2-flash belongs to the diffusion language model (dLLM) category in natural language processing. Unlike the mainstream autoregressive generation paradigm, it generates complete sequences step-by-step using a multi-round parallel denoising approach. The model is positioned for Agent task execution, long context processing, and complex scenarios requiring structured editing capabilities, showcasing unique technical advantages in areas such as code repair and tool calling.
Development Background: Developed by the InclusionAI team, which has deep expertise in diffusion models and efficient generation, LLaDA2.2-flash is the latest version in the LLaDA series. It aims to explore efficient generation pathways beyond autoregressive models and promote research and practical applications in the diffusion language model domain through open-sourcing.
Core Value: It addresses the limitations of autoregressive models in terms of generation speed and the lack of native sequence editing capabilities. The Levenshtein editing mechanism enables the model to perform four operations: KEEP, SUBSTITUTE, DELETE, and INSERT, allowing for structured self-correction in Agent tasks and significantly improving task success rates. Meanwhile, the MoE architecture and block routing mechanism ensure efficient inference and controllable memory usage even with long contexts.
Technical Features: Utilizes a MoE architecture with 256 routing experts, activating Top-48 experts per token; natively supports a 128K context window, achieved through continuous pre-training rather than positional extrapolation; diffusion decoding enables block-parallel generation, combined with Levenshtein editing for non-uniform sequence correction; the L-EBPO reinforcement learning algorithm jointly optimizes trajectory-level decisions and block-level editing actions, with environmental rewards derived from the correctness of tool calls and task completion rates.
2. Key Features
Diffusion-based Parallel Generation: Processes multiple Token positions simultaneously using block-parallel decoding, achieving high-throughput text generation. Unlike autoregressive models that generate Tokens sequentially, diffusion models can collaboratively optimize multiple positions in each denoising step, continuously refining the generation quality. This provides a clear efficiency advantage in long-text generation tasks.
Levenshtein Editing: Supports four editing operations—KEEP, SUBSTITUTE, DELETE, and INSERT—during the denoising process, breaking through the limitations of fixed-length replacements. The model uses the Longest Common Subsequence (LCS) to align the draft with the target, removing redundant Tokens via DELETE and creating positions to be filled via INSERT. This enables the model to correct non-equal-length sequences, delivering outstanding results in scenarios such as code repair.
Long Context Handling: Natively supports a 128K context window, expanded from 8K through continuous pre-training, without the need for position extrapolation. It is well-suited for complex scenarios involving long-range software engineering, multi-turn tool calling trajectories, and long document analysis, maintaining stable inference quality even with ultra-long sequences.
Agent Task Execution: Supports environment feedback tasks that require continuous error correction, such as code repair, API interaction, and multi-turn tool calling. By combining Levenshtein editing with L-EBPO reinforcement learning, the model can dynamically adjust parameters and add/remove fields within the Agent trajectory, adapting to complex workflow requirements.
MoE Efficient Inference: Utilizes a Mixture of Experts (MoE) architecture, controlling inference costs in long contexts through a block routing mechanism. It selects the Top-48 experts from a pool of 256 routing experts, and then performs Top-k routing within each Token block, ensuring the expert working set has a predictable O(C) upper bound. This significantly reduces HBM traffic and communication costs.
Multi-precision Inference Support: The model supports full-precision loading using BF16, and can further reduce memory usage and improve inference speed through FP8 quantization. Users can flexibly choose the precision level based on their hardware conditions. A full-precision model can be deployed on four A100-80GB GPUs, and FP8 quantization can increase throughput by an additional 18.6%, balancing deployment flexibility and performance.
3. How to Use
Environment Preparation and Hardware Requirements: Deployment of LLaDA2.2-flash requires at least 4 A100-80GB GPUs (or equivalent VRAM), supporting full-precision loading in BF16. If using FP8 quantization or processing long contexts of up to 128K tokens, additional VRAM should be reserved accordingly. It is recommended to use Linux as the operating system, and to install Python 3.8+, PyTorch 2.0+, and the Transformers library.
Model Download and Retrieval: Use the ModelScope SDK to execute
from modelscope import snapshot_download; model_dir = snapshot_download("inclusionAI/LLaDA2.2-flash")to automatically download the approximately 206GB model files. Alternatively, use Git LFS to clone the repository: first rungit lfs installto initialize large file support, then executegit clone https://modelscope.cn/models/inclusionAI/LLaDA2.2-flash.gitto pull the complete repository.Model Loading and Precision Settings: When loading the model using Transformers, call
AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True, device_map="auto"). It is essential to settrust_remote_code=Trueto enable custom diffusion decoding logic. Then executemodel = model.to(torch.bfloat16)to convert the model to BF16 precision, and callmodel.eval()to switch to evaluation/inference mode.Tokenizer Loading and Input Construction: Load the corresponding tokenizer synchronously using
AutoTokenizer.from_pretrained(model_path, trust_remote_code=True), ensuring that the tokenization rules fully match the model configuration. After constructing the user prompt, usetokenizer.apply_chat_template([{"role": "user", "content": prompt}], add_generation_prompt=True, tokenize=True, return_tensors="pt")to format the conversation into input tensors required by the model.Generation Parameter Configuration and Decoding: When calling
model.generate(), configure the key diffusion decoding parameters:block_length=32controls the number of parallel denoising tokens per step,threshold=0.5sets the denoising confidence threshold,editing_threshold=0.0disables active editing,temperature=0.0enables greedy decoding, andgen_length=512sets the maximum generation length. After generation is complete, usetokenizer.decode(generated_tokens[0], skip_special_tokens=True)to decode the token sequence into readable text.Result Output and Post-Processing: The decoded text can be directly output or saved. For batch processing, be sure to reset the model state before each generation. It is recommended to monitor VRAM usage in long context scenarios and adjust
block_lengthor enable FP8 quantization as needed to balance speed and resource consumption.
4. Pros and Cons Analysis
| Pros |
|---|
| High-throughput decoding: BF16 average decoding throughput reaches 1.64 times that of Ling-2.6-flash, and further improves by 18.6% after FP8 quantization, significantly enhancing generation efficiency, especially suitable for Agent tasks sensitive to latency. |
| Structured self-correction: Levenshtein editing supports insert, delete, and modify operations, increasing the SWE-bench Verified resolution rate from 35.8 to 44.4, an absolute gain of 8.6 percentage points, showing clear advantages in tasks such as code repair. |
| Native long context support: Continuously pre-trained to natively support 128K context, eliminating the need for position extrapolation, maintaining stable performance in long-range software engineering and multi-round tool calling tasks, avoiding performance degradation caused by extrapolation. |
| Open-source and reproducible: Uses the Apache-2.0 license, with code and training details publicly available, supporting full local reproduction, promoting research in diffusion language models within the academic community, and reducing experimental barriers. |
| Efficient MoE inference: The block routing mechanism keeps the working set of each Block expert within a fixed capacity, significantly reducing HBM traffic and communication costs, and achieving better inference efficiency than traditional MoE routing in long context scenarios. |
5. Comparative Analysis with Similar Tools
| Comparison Dimension | LLaDA2.2-flash | Ling-2.6-flash |
|---|---|---|
| Architecture Paradigm | Diffusion Language Model (dLLM) + MoE, parallel denoising generation across multiple rounds | Autoregressive (AR) + MoE, token-by-token generation from left to right |
| Sequence Editing Capability | Native support for Levenshtein editing (KEEP/SUBSTITUTE/DELETE/INSERT) | No native editing capability, requires external resampling or post-processing |
| Reinforcement Learning Strategy | L-EBPO algorithm, jointly optimizes trajectory-level decisions and intra-block editing actions | Standard RLHF or traditional reinforcement learning frameworks |
| Agent Benchmark Average Score | Average score of 53.83 across 7 Agent benchmarks | Average score of 55.74 across 7 Agent benchmarks |
| Decoding Throughput | BF16 throughput is 1.64 times that of Ling-2.6-flash, FP8 further increases by 18.6% | Limited by token-by-token generation, lower throughput |
| Context Window | Native 128K (expandable through continuous pre-training) | Training methodology not disclosed, likely supports 128K |
| Open Source License | Apache-2.0 | Not disclosed (Ling series typically commercial or restricted open source) |
Selection Recommendations: For Agent tasks (code repair, tool calling, multi-turn interaction), LLaDA2.2-flash stands out with its structured self-correction capability enabled by Levenshtein editing and a 1.64x throughput advantage over Ling-2.6-flash, making it particularly effective in scenarios requiring frequent generation and correction. Its native 128K context window is also well-suited for long-range software engineering tasks. If your team relies on the mature ecosystem and toolchain of autoregressive models and the Agent tasks do not require strong editing capabilities, Ling-2.6-flash has a slight edge in benchmark scores, though its open source license may be restrictive. Mixtral 8x22B, as a mature MoE autoregressive model, offers greater stability in general text generation and community support, but lacks native editing capabilities and has a smaller context window, making it unsuitable for ultra-long sequence tasks.
In academic research and experimental reproduction scenarios, LLaDA2.2-flash's full open source status (Apache-2.0) and publicly available training details make it an ideal foundation for exploring the diffusion language model approach. For production environments prioritizing low-latency deployment, the FP8-quantized version of LLaDA2.2-flash further leads in throughput, making it a strong candidate for cost-sensitive Agent applications.
6. Editor's Summary
LLaDA2.2-flash has achieved multiple substantive innovations in the field of diffusion language models. Its Levenshtein editing mechanism directly integrates sequence editing capabilities into the generation process, differing from the approach of autoregressive models that rely on external resampling or post-processing. This fundamentally grants the model native capabilities for insertion, deletion, and modification, as evidenced by an 8.6 percentage point improvement on the SWE-bench Verified benchmark. The combination of MoE architecture with block routing mechanisms allows models with 100B parameters to maintain controllable inference costs even with long contexts. The O(C) upper bound design for the expert working set has practical significance in engineering. The L-EBPO reinforcement learning algorithm jointly trains trajectory-level optimization with block-level editing actions, enabling the model to learn structured error-correction strategies from environmental feedback. This direction holds reference value for the development of Agent tasks.
In terms of practical value, LLaDA2.2-flash's high-throughput decoding (1.64 times that of similarly scaled autoregressive models) and native 128K context support make it directly competitive in Agent scenarios requiring rapid iteration and long-range processing. Although its average score on Agent benchmarks is slightly lower than that of Ling-2.6-flash, considering its unique editing capabilities and open-source nature, its actual performance may be more balanced in tasks such as code repair and tool calling. The model is suitable for development teams and researchers who require generation speed, structured editing capabilities, and are willing to invest in hardware resources. For individual developers, hardware requirements and model size are the main obstacles, but cloud services or quantized deployment can help alleviate these issues.
In terms of future development potential, diffusion language models are still in the early stages of exploration, and LLaDA2.2-flash has demonstrated the feasibility of this paradigm in Agent tasks. As the community continues to explore automatic hyperparameter tuning for diffusion decoding, more efficient quantization schemes, and additional application scenarios, its performance and usability are expected to improve further. InclusionAI's open-source strategy also lays a solid foundation for future iterations.
7. Application Scenarios
Software Engineering Agent: The model natively supports the insertion, deletion, and modification capabilities of Levenshtein edits, making it capable of handling complex programming tasks that require non-equal-length text editing, such as code repair, bug localization, and function completion. In the SWE-bench Verified benchmark, the editing capability increased the resolution rate from 35.8 to 44.4, enabling dynamic correction of erroneous logic in code.
Multi-turn Tool Calling: During API interactions and MCP protocol execution, the model can dynamically adjust parameters and add/remove fields, adapting to complex Agent workflows that require continuous error correction. Combined with the L-EBPO reinforcement learning framework, the model can learn and adjust its strategies based on feedback from tool calls, thereby improving task completion rates.
Long Document Processing: The native 128K context window allows the model to efficiently perform long-text analysis, report generation, and knowledge extraction without relying on position extrapolation. It is suitable for scenarios requiring full-text information retention, such as legal document review, technical documentation summarization, and research paper analysis.
Research and Experimental Reproduction: As an open-source MoE diffusion language model, LLaDA2.2-flash provides the academic community with a reproducible research foundation outside the autoregressive paradigm. Researchers can use its publicly available code, training details, and model weights to explore the application of diffusion generation paradigms in more NLP tasks.
8. FAQ
Q: What hardware is required to run LLaDA2.2-flash?
A: It is recommended to use at least 4 NVIDIA A100-80GB GPUs (or equivalent VRAM) to support full-precision BF16 loading. If FP8 quantization is used, VRAM requirements can be reduced by approximately 40%, but note that there will be a loss in precision. When processing long contexts of 128K tokens, VRAM usage increases further, so it is advised to reserve more resources.
Q: How to download the model? Is HuggingFace supported?
A: The official recommendation is to download via ModelScope using the command from modelscope import snapshot_download; model_dir = snapshot_download("inclusionAI/LLaDA2.2-flash"), which results in a file size of approximately 206GB. The model is currently mainly hosted on ModelScope, and a HuggingFace mirror has not yet been released. Please refer to the official repository for the most accurate information.
Q: What precision levels does the model support? How to switch between them?
A: The model natively supports full-precision BF16. To use it, simply execute model = model.to(torch.bfloat16) after loading. FP8 quantization requires additional quantization tools (such as TensorRT-LLM or custom scripts). The official version does not provide a ready-to-use quantized model, but the community has already implemented related practices.
Q: Compared to Ling-2.6-flash, which model is more suitable for Agent tasks?
A: LLaDA2.2-flash has a significant advantage in decoding throughput (1.64x higher), and the Levenshtein editing provides structured self-correction capabilities, making it perform better in tasks requiring editing, such as code repair. Ling-2.6-flash has a slightly higher average score on the Agent benchmark (55.74 vs. 53.83), but lacks native editing capabilities. The specific choice should be based on the balance between the need for editing capabilities and generation speed for the task at hand.
Q: Does the model support Chinese?
A: LLaDA2.2-flash is primarily optimized for English scenarios, and its performance on Chinese tasks is not detailed in public reports. Although the model architecture itself is not limited to any specific language, the training data is mainly in English, and the Chinese generation quality may not be as good as that of dedicated Chinese models. It is recommended to conduct small-scale testing first in Chinese scenarios.
Q: How to adjust diffusion decoding parameters to achieve better generation quality?
A: Key parameters include block_length (number of parallel denoising tokens, default 32; increasing this can improve throughput but may reduce quality), threshold (denoising confidence threshold, default 0.5; lowering this can increase diversity), and editing_threshold (active editing threshold, default 0.0 means disabled; when enabled, the model will actively perform Levenshtein editing). It is recommended to perform a grid search based on the task type. For code-related tasks, enabling editing is advisable, while for open-ended generation, lowering the threshold is recommended.
9. Project Links
- GitHub Repository: https://github.com/inclusionAI/LLaDA2.X
- ModelScope Model Page: https://modelscope.cn/models/inclusionAI/LLaDA2.2-flash
Related AI Model Articles

OpenMuse – CopilotKit Open-Source Personal AI Assistant
OpenMuse is an open-source personal AI assistant project developed by the CopilotKit team. Its core design philosophy is "giving an Agent a computer" — by combining a persistent browser, optional Linu...

In-Depth Review of Longcat-2.5-preview: Meituan's Next-Generation Multimodal Long-Range Agent Model
LongCat-2.5-preview is Meituan's latest next-generation large model. Building upon the 1.6T total parameters, approximately 48B active parameters, and native 1M token context of LongCat-2.0, it marks ...

Review of DeepSeek Harness Desktop: How the Official GUI Client Lowers the Bar for Agent Usage
DeepSeek Harness Desktop is the official graphical client launched by DeepSeek, designed to provide a visual interface for the originally command-line-based DeepSeek Harness framework. After users log...

Step Code – In-Depth Review of StepFun's Open-Source Terminal Programming Agent
Step Code is an open-source terminal programming agent launched by StepFun, licensed under the MIT License, which allows developers to complete the full workflow of code writing, debugging, execution,...
© All Rights Reserved. Some content on this site is partially generated by AI with human review.
