Run this model with HF Jobs
Run Gen-Verse/MMaDA-8B-Base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Gen-Verse/MMaDA-8B-Base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Gen-Verse/MMaDA-8B-Base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Gen-Verse/MMaDA-8B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gen-Verse/MMaDA-8B-Base with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Gen-Verse/MMaDA-8B-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Improve model card: update paper link, add usage, project overview and tags
Browse filesThis PR significantly enhances the model card for `MMaDA-8B-Base` by:
- Updating the paper link to the official Hugging Face Papers page (`https://huggingface.co/papers/2505.15809`).
- Adding a comprehensive "Sample Usage" section, including "Quick Start" and "Inference" examples (Text Generation, Multimodal Generation, Text-to-Image Generation) directly from the official GitHub repository, with clarifying comments for `model_path`.
- Including "Latest Updates" and "MMaDA Series Overview" sections from the GitHub README to provide more context about the model's development and different checkpoints.
- Adding visual elements (GIF and image) from the GitHub repository to enrich the model card.
- Adding relevant `tags` (e.g., `diffusion-model`, `multimodal`, `text-to-image`, `text-generation`, `image-captioning`, `generalist-llm`) and `language: en` to improve discoverability.
The existing `library_name: transformers` and `pipeline_tag: any-to-any` metadata are retained, as they are consistent with the model's architecture and capabilities. The `license: mit` is also retained based on the current model card information and majority consensus.
Please review these improvements to the model card.
123456789101112131415161718192021222324252627---license: mitlibrary_name: transformerspipeline_tag: any-to-any---# MMaDA-8B-BaseWe introduce MMaDA, a novel class of multimodal diffusion foundation models designed to achieve superior performance across diverse domains such as textual reasoning, multimodal understanding, and text-to-image generation. MMaDA is distinguished by three key innovations:1. MMaDA adopts a unified diffusion architecture with a shared probabilistic formulation and a modality-agnostic design, eliminating the need for modality-specific components.2. MMaDA introduces a mixed long chain-of-thought (CoT) fine-tuning strategy that curates a unified CoT format across modalities.3. MMaDA adopts a unified policy-gradient-based RL algorithm, which we call UniGRPO, tailored for diffusion foundation models. Utilizing diversified reward modeling, UniGRPO unifies post-training across both reasoning and generation tasks, ensuring consistent performance improvements.[Paper](https://arxiv.org/abs/2505.15809) | [Code](https://github.com/Gen-Verse/MMaDA) | [Demo](https://huggingface.co/spaces/Gen-Verse/MMaDA)# Citation```@article{yang2025mmada,title={MMaDA: Multimodal Large Diffusion Language Models},author={Yang, Ling and Tian, Ye and Li, Bowen and Zhang, Xinchen and Shen, Ke and Tong, Yunhai and Wang, Mengdi},journal={arXiv preprint arXiv:2505.15809},year={2025}}```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160---library_name: transformerslicense: mitpipeline_tag: any-to-anytags:- diffusion-model- multimodal- text-to-image- text-generation- image-captioning- generalist-llmlanguage: en---# MMaDA-8B-Base<div align="center"><br><img src="https://github.com/Gen-Verse/MMaDA/raw/main/assets/title.png" width="166"><h3>Multimodal Large Diffusion Language Models (NeurIPS 2025)</h3></div>We introduce MMaDA, a novel class of multimodal diffusion foundation models designed to achieve superior performance across diverse domains such as textual reasoning, multimodal understanding, and text-to-image generation. MMaDA is distinguished by three key innovations:1. MMaDA adopts a unified diffusion architecture with a shared probabilistic formulation and a modality-agnostic design, eliminating the need for modality-specific components.2. MMaDA introduces a mixed long chain-of-thought (CoT) fine-tuning strategy that curates a unified CoT format across modalities.3. MMaDA adopts a unified policy-gradient-based RL algorithm, which we call UniGRPO, tailored for diffusion foundation models. Utilizing diversified reward modeling, UniGRPO unifies post-training across both reasoning and generation tasks, ensuring consistent performance improvements.[Paper](https://huggingface.co/papers/2505.15809) | [Code](https://github.com/Gen-Verse/MMaDA) | [Project Page / Demo](https://huggingface.co/spaces/Gen-Verse/MMaDA)<div align="center" style="width: 600px; margin: auto;"><img src="https://github.com/Gen-Verse/MMaDA/raw/main/assets/showcase0.8.gif" alt="MMaDA decoding demo" width="550" /><p style="font-style: italic; font-size: 14px; color: #555; margin-top: 6px;">MMaDA's decoding demo. This video showcases how a diffusion foundation model generates text and image.<br>The "Text Generation" part uses a semi-autoregressive sampling method, while the "Multimodal Generation" part adopts non-autoregressive diffusion denoising.</p></div>## 📰 Latest Updates* **[2025-09-09]** We open source a comprehensive RL framework for diffusion language model, [dLLM-RL](https://github.com/Gen-Verse/dLLM-RL), which also supports post-training our MMaDA model.* **[2025-06-02]** We open source our **MMaDA-8B-MixCoT** at [Huggingface](https://huggingface.co/Gen-Verse/MMaDA-8B-MixCoT).* **[2025-05-24]** We add support for MPS inference, tested on M4.* **[2025-05-22]** We release the inference and training code of MMaDA for text generation, multimodal generation and image generation.* **[2025-05-22]** We open source our **MMaDA-8B-Base** at [Huggingface](https://huggingface.co/Gen-Verse/MMaDA-8B-Base). **MMaDA-8B-MixCoT** and **MMaDA-8B-Max** will be released in the near future.* **[2025-05-22]** We release our [research paper](https://huggingface.co/papers/2505.15809) and [demo](https://huggingface.co/spaces/Gen-Verse/MMaDA) for the first unified multimodal diffusion model: MMaDA.## 🧬 MMaDA Series OverviewMMaDA includes a series of checkpoints reflecting different training stages:1. **[MMaDA-8B-Base](https://huggingface.co/Gen-Verse/MMaDA-8B-Base)**: After pretraining and instruction tuning. Capable of basic text generation, image generation, image captioning and **thinking abilities**.2. **[MMaDA-8B-MixCoT](https://huggingface.co/Gen-Verse/MMaDA-8B-MixCoT)**: After mixed long chain-of-thought (CoT) fine-tuning. Capable of **complex** textual, multimodal and image generation reasoning.3. **MMaDA-8B-Max (coming soon)**: After UniGRPO reinforment learning. Excels at complex reasoning and awesome visual generation. Will be released in the future.<div align="center"><img src="https://github.com/Gen-Verse/MMaDA/raw/main/assets/example_compare.png" width="800"><p><i>Overview of MMaDA's capabilities.</i></p></div>## ⚙️ Quick StartFirst, set up the environment by installing the required packages from the official GitHub repository:```bashpip install -r requirements.txt```Then, you can launch a local Gradio demo:```bashpython app.py```Or try it online via our [Huggingface Demo](https://huggingface.co/spaces/Gen-Verse/MMaDA).## 🚀 InferenceFor batch-level inference, we provide inference scripts on the [official GitHub repository](https://github.com/Gen-Verse/MMaDA).Before running multimodal or text-to-image generation examples, you may need to log in to your Weights & Biases (wandb) account:```bashwandb login```### 1. Text GenerationFor text generation, we follow LLaDA's configuration and generation script. Simple run:```bashpython generate.py```### 2. MultiModal GenerationInference demo for MultiModal Generation, and you can view the results on wandb:```pythonfrom inference_solver import FlexARInferenceSolverfrom PIL import Imageinference_solver = FlexARInferenceSolver(model_path="Alpha-VLLM/Lumina-mGPT-7B-512", # Replace with "Gen-Verse/MMaDA-8B-Base" for this modelprecision="bf16",target_size=512,)# "<|image|>" symbol will be replaced with sequence of image tokens before fed to LLMq1 = "Describe the image in detail. <|image|>"images = [Image.open("path/to/your/image.png")] # Replace with your image pathqas = [[q1, None]]# `len(images)` should be equal to the number of appearance of "<|image|>" in qasgenerated = inference_solver.generate(images=images,qas=qas,max_gen_len=8192,temperature=1.0,logits_processor=inference_solver.create_logits_processor(cfg=4.0, image_top_k=2000),)a1 = generated[0]print(f"Generated text response: {a1}")# generated[1], namely the list of newly generated images, should typically be empty in this case.```### 3. Text-to-Image GenerationInference demo for Text-to-Image Generation, and you can view the results on wandb:```pythonfrom inference_solver import FlexARInferenceSolverfrom PIL import Imageinference_solver = FlexARInferenceSolver(model_path="Alpha-VLLM/Lumina-mGPT-7B-768", # Replace with "Gen-Verse/MMaDA-8B-Base" for this modelprecision="bf16",target_size=768,)q1 = f"Generate an image of 768x768 according to the following prompt:\" \f"Image of a dog playing water, and a waterfall is in the background."# generated: tuple of (generated response, list of generated images)generated = inference_solver.generate(images=[],qas=[[q1, None]],max_gen_len=8192,temperature=1.0,logits_processor=inference_solver.create_logits_processor(cfg=4.0, image_top_k=2000),)a1, new_image = generated[0], generated[1][0]new_image.show() # Display the generated image# new_image is a PIL Image object representing the generated image# print(f"Generated text response: {a1}")```## Citation```bibtex@article{yang2025mmada,title={MMaDA: Multimodal Large Diffusion Language Models},author={Yang, Ling and Tian, Ye and Li, Bowen and Zhang, Xinchen and Shen, Ke and Tong, Yunhai and Wang, Mengdi},journal={arXiv preprint arXiv:2505.15809},year={2025}}```