multimodalart's picture
multimodalart HF Staff
Upload folder using huggingface_hub
5099351 verified
|
Raw
History Blame Contribute Delete
2.42 kB

A newer version of the Gradio SDK is available: 6.24.0

Upgrade
metadata
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.

It runs the LoRA finetunes from gevaertlab/diffusiongemma-radiology-vqa on top of the image-conditioned discrete-diffusion backbone 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 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.