CoolFace
Modelpublic

interfaze-ai/diffusion-gemma-asr-small

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
12likes
Model Card

diffusion-gemma-asr-small

๐Ÿ“ Links: Blog ยท Demo Space ยท Code

Audio-native, multilingual speech recognition that transcribes through DiffusionGemma's own discrete-diffusion decoder โ€” not autoregressive, not an external ASR decoder. Audio is projected directly into the Gemma embedding space, and the transcript is produced by parallel diffusion denoising (~8โ€“16 steps), giving real-time-plus throughput where cost is set by the number of denoising steps, not the length of the transcript.

This repo ships the trained adapter only (projector + LoRA, ~42M params โ€” 0.16% of the model). The frozen 26B DiffusionGemma backbone and the frozen whisper-small encoder load from their own repos.

How it works

raw audio โ”€โ–บ whisper-small encoder (frozen) โ”€โ–บ projector (trained, ~19M)
          โ”€โ–บ scatter into <audio> token slots of DiffusionGemma's encoder
          โ”€โ–บ DiffusionGemma decoder denoises a 192-token canvas (bidirectional, cross-attends audio)
          โ”€โ–บ transcript
  • โ€”Backbone: google/diffusiongemma-26B-A4B-it โ€” frozen, small LoRA adapters on encoder/decoder attention.
  • โ€”Audio frontend: openai/whisper-small encoder โ€” frozen feature extractor (NOT a decoder).
  • โ€”Grounding: trained with three losses โ€” uniform-diffusion (the generator), an AR auxiliary, and a CTC loss on the projector via the frozen `lm_head` (the key unlock that makes the audio embeddings transcript-predictive).

Usage

Install

bash
pip install torch peft soundfile librosa huggingface_hub \
  "transformers @ git+https://github.com/huggingface/transformers.git"   # DiffusionGemma support

Transcribe in Python

python
import sys, soundfile as sf
from huggingface_hub import snapshot_download

repo = snapshot_download("interfaze-ai/diffusion-gemma-asr-small")   # this adapter (~170 MB)
sys.path.insert(0, repo)
from inference import load, transcribe                       # bundled in this repo

# Loads frozen DiffusionGemma-26B + whisper-small + this adapter (downloads bases on first run).
model, tok, fe = load(f"{repo}/diffusion_asr_small.pt", device="cuda")

wav, sr = sf.read("audio.wav")        # 16 kHz mono float32 (inference.py resamples if needed)
print(transcribe(wav, model, tok, fe, max_steps=16))

Or from the command line

bash
python inference.py audio.wav        # run inside the downloaded repo dir

Long audio is split at silence (the encoder has a 30 s window, like Whisper). max_steps trades speed for accuracy โ€” 8 is near-best and fastest, 16 is the default.

Languages & accuracy

Trained on FLEURS (6 languages) + LibriSpeech (en) + VoxPopuli (en/de/fr/es). WER/CER are Whisper-normalized (Open-ASR / Artificial-Analysis convention), 16 diffusion steps:

benchmarkmetricscore
LibriSpeech test-clean (en)WER6.6%
FLEURS EnglishWER15.7%
VoxPopuli EnglishWER18.5%
FLEURS HindiCER15.8%
FLEURS MandarinCER29.6%

Among diffusion / non-autoregressive ASR it leads (6.6% on LibriSpeech vs Whisfusion's 8.3%, with a smaller encoder). It trails autoregressive Whisper โ€” a training-data gap (~219 h seen), not architecture.

Files

  • โ€”diffusion_asr_small.pt โ€” trained adapter ({"projector": ..., "lora": ...})
  • โ€”model.py, audio.py โ€” model definition (self-contained)
  • โ€”inference.py โ€” runnable example (load + segment + transcribe)
  • โ€”requirements.txt

Requirements / licensing

  • โ€”Needs transformers from main (DiffusionGemma support) + torch, peft.
  • โ€”Base models load from their own repos under their licenses: google/diffusiongemma-26B-A4B-it (Gemma terms) and openai/whisper-small (MIT).
  • โ€”This adapter: Apache-2.0.

Limitations

  • โ€”Per-segment window is โ‰ค30 s (encoder limit) โ€” long audio is chunked at silence, same as Whisper.
  • โ€”Mandarin is the weakest language; more data is the lever.

Cite as

bibtex
@misc{khurdula2026audionativespeechrecognitionfrozen,
      title={Audio-Native Speech Recognition with a Frozen Discrete-Diffusion Language Model}, 
      author={Harsha Vardhan Khurdula and Abhinav Kumar Singh and Yoeven D Khemlani and Vineet Agarwal},
      year={2026},
      eprint={2607.13013},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2607.13013}, 
}