inclusionAI/LLaDA2.0-Uni
- License
- apache-2.0
- Size
- not mirrored yet
No official torrent yet β requesting it tells the flock what to host next. You cannot seed a catalog-only page.
Cataloged from inclusionAI/LLaDA2.0-Uni
All models by inclusionAI βNo official torrent yet β requesting it tells the flock what to host next. You cannot seed a catalog-only page.
Cataloged from inclusionAI/LLaDA2.0-Uni
All models by inclusionAI β

[π Technical Report ] β [π Github ]β [π€ FP8 Version ]
AGI Research Center, Inclusion AI
LLaDA2.0-Uni is a unified diffusion Large Language Model (dLLM) based on Mixture-of-Experts (MoE) that seamlessly integrates multimodal understanding and generation within a single model. It supports:


Note: Full installation instructions and CLI scripts are available in the GitHub repository.
[!Note] π‘ Faster decoding β Use the decoder-turbo (distilled decoder) for ~10Γ faster image decoding (8 steps instead of 50) with minimal quality loss:
SPRINT accelerates inference by combining KV cache reuse, adaptive unmasking, and threshold-based batch acceptance:
image_keep_ratio, text_keep_ratio) allow fine-grained control β e.g., retaining all image/text tokens for quality while still benefiting from cache reuse.low_confidence, top_k_margin, or neg_entropy) and transfers the top-k most confident tokens, where k is adaptively set as ceil(remaining_masked / steps_left). This allows easy positions to be resolved quickly while concentrating compute on harder tokens.threshold are accepted in batch, further reducing the number of denoising iterations needed.Image Understanding with Sprint:
Text-to-Image with Sprint:
[!Note] Sprint is supported for Simple CFG and no-CFG modes. When using Editing CFG (three-way guidance with
cfg_text_scale/cfg_image_scale), Sprint automatically falls back to baseline.
π‘ While only ~1B parameters are activated per token during inference, all 16B MoE parameters must be loaded into memory. The diffusion decoder is only needed for image generation/editing and is released afterwards.
We are working on integrating SGLang for high-throughput serving and optimized inference. Stay tuned!
This project is licensed under the terms of the Apache License 2.0.
git clone https://github.com/inclusionAI/LLaDA2.0-Uni && cd LLaDA2.0-Uniconda create -n llada2_uni python=3.10 -yconda activate llada2_unipip install torch torchvision --index-url https://download.pytorch.org/whl/cu124pip install flash-attn --no-build-isolationpip install -r requirements.txtimport torchfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom decoder import decode_vq_tokens
model_path = "inclusionAI/LLaDA2.0-Uni"tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained( model_path, device_map="cuda", torch_dtype="bfloat16", trust_remote_code=True).eval()model.tokenizer = tokenizer
# Generate image tokensresult = model.generate_image( "A modern Scandinavian kitchen with white cabinetry, marble countertops, and a single orchid on the island. A Nordic woman with sleek blonde ponytail, wearing an oversized sweater and dainty silver necklaces, stirs a matcha bowl with a bamboo whisk, eyes sparkling with quiet joy. Shot with 50mm, f/2.5, diffused window light, cool white balance, low saturation, clean skin retouch. Mood: serene, wholesome, hygge.", image_h=1024, image_w=1024, steps=8, cfg_scale=2.0,)
# Decode to PIL image (default: 50-step ODE)image = decode_vq_tokens(result["token_ids"], result["h"], result["w"], model_path, "cuda")image.save("output.png")image = decode_vq_tokens( result["token_ids"], result["h"], result["w"], model_path, "cuda", num_steps=8, decode_mode="decoder-turbo",)import torchfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom decoder import decode_vq_tokens
model_path = "inclusionAI/LLaDA2.0-Uni"tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained( model_path, device_map="cuda", torch_dtype="bfloat16", trust_remote_code=True).eval()model.tokenizer = tokenizer
# Generate image tokens with thinking processresult = model.generate_image( "A fox with thick, dense, fluffy fur in a winter setting, possibly surrounded by snow.", image_h=1024, image_w=1024, mode="thinking", steps=8, cfg_scale=2.0, thinking_steps=32, thinking_gen_length=4096,)
# Print thinking traceprint("Thinking:", result["thinking"])
# Decode to PIL imageimage = decode_vq_tokens(result["token_ids"], result["h"], result["w"], model_path, "cuda", num_steps=8, decode_mode="decoder-turbo",)image.save("output_thinking.png")import torchfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom encoder.image_tokenizer import ImageTokenizerfrom decoder.smart_img_process import smart_resize_images
model_path = "inclusionAI/LLaDA2.0-Uni"tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained( model_path, device_map="cuda", torch_dtype="bfloat16", trust_remote_code=True).eval()model.tokenizer = tokenizer
# Encode image to discrete tokensimage_tokenizer = ImageTokenizer(model_path=model_path, device="cuda")pil_image = smart_resize_images(["./assets/understanding_example.png"])[0]info = image_tokenizer.encode_with_info(pil_image)image_tokens = [x + model.config.image_token_offset for x in info["token_ids"]]_, h, w = info["grid_thw"]
# Understand the imageresponse = model.understand_image( image_tokens, h, w, question="Describe this image in detail.", steps=32, gen_length=2048,)print(response)import torchfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom encoder.image_tokenizer import ImageTokenizerfrom decoder.utils import generate_crop_size_list, var_center_cropfrom decoder import decode_vq_tokensfrom PIL import Image
model_path = "inclusionAI/LLaDA2.0-Uni"tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained( model_path, device_map="cuda", torch_dtype="bfloat16", trust_remote_code=True).eval()model.tokenizer = tokenizer
# Encode source imageimage_tokenizer = ImageTokenizer(model_path=model_path, device="cuda")crop_size_list = generate_crop_size_list((512 // 32) ** 2, 32)pil_image = var_center_crop(Image.open("./assets/edit_example.png").convert("RGB"), crop_size_list=crop_size_list)info = image_tokenizer.encode_with_info(pil_image)image_tokens = [x + model.config.image_token_offset for x in info["token_ids"]]_, h, w = info["grid_thw"]
# Edit the imageresult = model.edit_image( image_tokens, h, w, instruction="Change the background to a beach.", steps=8, cfg_text_scale=4.0,)
# Decode to PIL imageedited_image = decode_vq_tokens(result["token_ids"], result["h"], result["w"], model_path, "cuda", num_steps=8, decode_mode="decoder-turbo",)edited_image.save("edited.png")response = model.understand_image( image_tokens, h, w, question="Describe this image in detail.", steps=32, gen_length=4096, use_sprint=True, threshold=0.93, keep_ratio=0.5, cache_warmup_steps=1, image_keep_ratio=1.0, text_keep_ratio=1.0,)result = model.generate_image( "A modern Scandinavian kitchen with white cabinetry, marble countertops, and a single orchid on the island. A Nordic woman with sleek blonde ponytail, wearing an oversized sweater and dainty silver necklaces, stirs a matcha bowl with a bamboo whisk, eyes sparkling with quiet joy. Shot with 50mm, f/2.5, diffused window light, cool white balance, low saturation, clean skin retouch. Mood: serene, wholesome, hygge.", image_h=1024, image_w=1024, cfg_scale=2.0, use_sprint=True, block_length=32, steps=8, keep_ratio=0.5, cache_warmup_steps=1,)LLaDA2-Uni/βββ config.json # Model configurationβββ modeling_llada2uni_moe.py # Model implementation (trust_remote_code)βββ configuration_llada2uni_moe.py # Config classβββ tokenizer.json # Tokenizerβββ model-00001-of-00013.safetensors # MoE backbone weights (sharded, bf16)βββ ...βββ model-00013-of-00013.safetensorsβββ model.safetensors.index.jsonβββ image_tokenizer/β βββ config.jsonβ βββ image_tokenizer.safetensors # SigLIP-VQ encoderβ βββ sigvq_embedding.pt # SigVQ embedding + projectorβ βββ preprocessor_config.jsonβββ decoder/β βββ config.jsonβ βββ decoder_model.safetensors # Diffusion decoder (bf16, 12GB)βββ decoder-turbo/β βββ config.jsonβ βββ decoder_model.safetensors # Distilled few-step decoder (bf16, 12GB)βββ vae/ βββ config.json βββ diffusion_pytorch_model.safetensors@article{LLaDA2Uni,title = {LLaDA2.0-Uni: Unifying Multimodal Understanding and Generation with Diffusion Large Language Model},author = {Tiwei Bie and Haoxing Chen and Tieyuan Chen and Zhenglin Cheng and Long Cui and Kai Gan and Zhicheng Huang and Zhenzhong Lan and Haoquan Li and Jianguo Li and Tao Lin and Qi Qin and Hongjun Wang and Xiaomei Wang and Haoyuan Wu and Yi Xin and Junbo Zhao},journal = {arXiv preprint arXiv:2604.20796},year = {2026}}