Centro di Sonologia Computazionale
IEEE IS2 2026 · Cannes, France

A Quantized Native Runtime for On-Device Semantic Audio Generation

Matteo Spanio  ·  Antonio Rodà

Centro di Sonologia Computazionale (CSC), Dept. of Information Engineering, University of Padova

7×faster cold start1.6 s vs 11.6 s, same checkpoints
0.13 sper 10 s clip, warmRTX 3070; official stack 0.146 s
2.3×less Pi memory at 8-bit1.9 → 0.84 GB, within re-seed noise
1.2 Bparams on a Raspberry Pi 5medium model, 4-bit, 8 GB board

What aria is

Open-weight music models are now good enough for interactive tools and edge devices, but their reference implementations assume a Python/PyTorch stack and a discrete GPU. aria is a dependency-free runtime in about 7.7k lines of C and CUDA that runs the complete Stable Audio 3 text-to-music pipeline (tokenizer, T5Gemma text encoder, diffusion transformer, autoencoder) on ordinary GPUs, CPU-only machines and a Raspberry Pi 5.

Diagram: the same Stable Audio 3 checkpoints move from a framework-bound PyTorch stack (11.6–22.2 s cold start, out of memory at load on 8 GB, 15–48 s compile per clip length) to a single aria binary (1.6–2.9 s cold start, 0.13 s warm, both models on a Raspberry Pi 5). Steering can be injected at the DiT residual stream, the latent, or the text conditioning.
Same checkpoints, moved from a framework-bound serving stack to one binary on hardware people own. Because the runtime owns every tensor, activation steering becomes a built-in feature, injected at ① the DiT residual stream, ② the latent, or ③ the text conditioning.

Listen

Every clip on this page was generated by aria from the Stable Audio 3 small-music checkpoint (8 steps, 10 s unless noted) and loudness-normalized as in the paper's evaluation.

Text to music

solo piano piece

seed 11

orchestral film score cue

seed 11

synthwave track

seed 11

bossa nova with nylon guitar

seed 11

Precision ladder: same prompt, same seed

The transformer stored at four precisions, everything else fixed (GPU, fp16 decoder). Prompt “blues shuffle with electric guitar”, seed 2, whose 4-bit change in prompt adherence sits near the median of the 72 clips in the study. Memory is the Raspberry Pi 5 peak.

fp16

reference · 1198 MB

q8

8-bit weights · 836 MB

W8A8

8-bit arithmetic · 836 MB · fastest GPU mode

q4

4-bit weights · 776 MB

Sonic seasoning: steering one clip toward a taste

Music shifts perceived taste: consonant, high-pitched legato reads as sweet, dissonant low music as bitter. aria adds a taste direction (difference-in-means over 377 human-rated clips, on Hugging Face) to one transformer block while generating. Prompt “lo-fi hip hop beat”, seed 22, same noise in every clip. Δ is the change in the wav2taste score against the unsteered clip.

unsteered

α = 0

sweet

block 16, α = 0.3 · Δ +0.12

sour

block 19, α = 0.1 · Δ +0.54

bitter

block 19, α = 0.1 · Δ +0.41

Not cherry-picked: this prompt and seed sit near the median taste shift on all three axes. Salty and spicy are omitted because they stay weak even inside the clean window.

Too far: over-steering

Push the strength to α = 1 and the music falls apart, yet the taste regressor still scores sour and bitter up. This is why aria's operating points are chosen with independent checks (CLAP, FAD), never with the steered metric alone.

sweet, α = 1

Δ −0.21

sour, α = 1

Δ +0.27, but degraded

bitter, α = 1

Δ +0.26, but degraded

Results

Runtime vs. the official PyTorch stack

small-musicmedium
10 s clip, 8 steps, steering ontime (s)VRAM (MB)time (s)VRAM (MB)
aria GPU, warm0.1313950.374215
SA3 GPU, warm0.14623300.4435948
aria cold start1.6–2.9–
SA3 cold start11.58–22.23–
aria CPU-only (20 threads)2.5–9.8–

RTX 3070 (8 GB) with an i9-10900KF. Warm = model already resident on both sides; cold = process spawn + weight load + one generation. The official stack's compiler recompiles for each new clip length (14.5–48.1 s), and its medium loader briefly needs ~7.1 GB, overflowing an 8 GB card.

Quantization is close to free at 8-bit

Scatter of Raspberry Pi peak memory against FAD versus fp16: q8 and W8A8 sit inside the re-seed noise band at about 836 MB; fp16 at 1198 MB; q4 at 776 MB with FAD 126, outside the band.
Shaded band: the FAD a mere fp16 re-seed induces. Marker area: taste-vector change.
small-musicfp16q8W8A8q4
GPU warm (s)0.130.200.100.22
VRAM (MB)1510119011901128
Pi 5 peak (MB)1198836836776
ΔCLAP (±0.004)ref+0.002−0.001−0.020
FAD (44.0)ref18.617.7125.8
Δtaste (0.153)ref0.0350.0440.199

In brackets: the re-seed noise floor of each check. 8-bit stays inside all three; W8A8 (8-bit arithmetic on integer tensor cores) is the fastest GPU mode. 4-bit crosses every floor, but it is what puts the 1.2 B medium model on an 8 GB Pi (~200 s; 0.9 GB resident).

Steering is real, inside a narrow window

Three stacked panels against steering strength alpha for sour at block 19: the wav2taste target peaks at alpha 0.15 and stays high; CLAP is positive only at alpha 0.1 then drops to about minus 5; FAD rises from 561 to over 1000.
Sour, block 19. Target and CLAP rise together only at α = 0.1; past it the target keeps climbing while CLAP collapses and FAD explodes.

A learned taste regressor is the steering target, so it can be gamed. Every operating point is gated by three independent oracles: CLAP similarity to a taste prompt, FAD, and audio drift.

  • Genuine control for sweet, sour and bitter, confirmed by CLAP and replicated on ten held-out prompts (sour: Δ +0.42, p = 2.9×10⁻¹¹).
  • The metric's maximum lies inside the degradation regime. A layer scan ranked by the target alone picks the final block for the intense tastes; the oracle panel rejects it as degradation.
  • Steering beats a trained LoRA under the same panel: no training, a 4–6 KB vector instead of 10.4 MB per axis, no inference overhead, and removable at α = 0 with bit-identical output.

Live steering while streaming

Steering scale alpha stepped from 0 up to 0.5 and back to 0 across 12 stream chunks; the sweet score rises from 0.29 to about 0.5 and falls back to 0.18 with a lag.

The model stays warm and steering lives inside the captured graph, so control can change mid-stream. Ramping sweet 0 → 0.5 → 0 across a 12-chunk stream, the per-chunk taste score tracks the schedule (Spearman ρ = 0.78, p = 0.003), lagging on the way down as each continuation inherits context. On the Raspberry Pi 5 a steered clip costs the same as an unsteered one (32.9 vs 32.8 s).

the stream in the plot

sweet ramped 0 → 0.5 → 0 · 28 s

Run it

Linux: a C11 compiler, make, libm and OpenMP. Windows: build.bat with MSVC. CUDA is optional. Full instructions in the README.

git clone https://github.com/matteospanio/aria && cd aria
make                                   # CPU build (make cuda CUDA_ARCH=sm_86 for NVIDIA)
./download_model.sh small-music        # gated on Hugging Face: accept the license first
python scripts/export_tokenizer.py models/small-music

./aria -m models/small-music -p "warm romantic piano, slow, tender" -d 15 -s 8 --seed 0 -o out.wav
./aria -m models/small-music -p "..." --precision q4 -o out.wav      # 4-bit DiT

hf download matteospanio/aria --local-dir directions               # taste-steering vectors
./aria -m models/small-music -p "lo-fi hip hop beat" --seed 22 -o sour.wav \
       --steer residual:19:directions/small/sour.atns:0.1:0-7

Cite

@misc{spanio2026quantizednativeruntimeondevice,
  title         = {A Quantized Native Runtime for On-Device Semantic Audio Generation},
  author        = {Matteo Spanio and Antonio Rodà},
  year          = {2026},
  eprint        = {2607.08526},
  archivePrefix = {arXiv},
  primaryClass  = {cs.SD},
  url           = {https://arxiv.org/abs/2607.08526},
}