--- title: DiffusionGemma Radiology VQA emoji: ๐Ÿฉป colorFrom: red colorTo: pink sdk: gradio sdk_version: 6.19.0 python_version: "3.12" app_file: app.py pinned: false short_description: Radiology VQA & report infill with a discrete-diffusion LLM startup_duration_timeout: 1h --- # DiffusionGemma ยท Radiology VQA & Interactive Report Infill Interactive demo for the paper [*Discrete Diffusion Language Models for Interactive Radiology Report Drafting*](https://huggingface.co/papers/2607.01436). It runs the LoRA finetunes from [`gevaertlab/diffusiongemma-radiology-vqa`](https://huggingface.co/gevaertlab/diffusiongemma-radiology-vqa) on top of the image-conditioned discrete-diffusion backbone [`google/diffusiongemma-26B-A4B-it`](https://huggingface.co/google/diffusiongemma-26B-A4B-it) (`DiffusionGemmaForBlockDiffusion`). ## What you can do - **Visual Question Answering** โ€” upload a medical scan (X-ray / CT / MRI), ask a question, get an answer. Pick the adapter trained on the dataset closest to your image style: VQA-RAD, SLAKE, or VQA-Med. - **Bidirectional report infill** โ€” the signature capability of discrete diffusion. Write a partial report with a `[BLANK]` marker; the model fills the hole using **both** the text before *and after* it (a true autoregressive model can only see the left context). This mirrors the paper's any-order infill sampler hook. ## How it works DiffusionGemma generates text by iteratively denoising a fixed "canvas" of tokens with bidirectional attention, rather than left-to-right one token at a time. The infill mode clamps known token positions to fixed values every denoising step (per [`models/infill.py`](https://github.com/mxvp/discrete_diffusion_RRG) in the reference implementation) so the model only fills the masked span. ## Stack - **Backbone**: `google/diffusiongemma-26B-A4B-it` (25.2B total / 3.8B active MoE). - **Adapters**: `gevaertlab/diffusiongemma-radiology-vqa` (`diffusion-{vqarad,slake,vqamed}`). - **Hardware**: ZeroGPU `xlarge` โ€” the 26B checkpoint (~49 GB bf16) needs the full card. - A custom `transformers` wheel providing the DiffusionGemma architecture is bundled in this repo and installed at runtime by `app.py` (Spaces installs `requirements.txt` before the repo files are copied in, so a local-path wheel can't be referenced there). ## Note Research demo only โ€” **not** a medical device and not for clinical use.