Measurements › Accuracy
Docs›Measurements

Accuracy

Hush's CPU output against NVIDIA's GPU reference, and the regression gates in CI.

Hush uses NVIDIA's original FP32 weights without change: no training, fine-tuning or quantization. This page compares Hush's CPU output with NVIDIA's own GPU code. For DeepFilterNet 3, see the end of this page.

Summary#

CheckResult
Seven saved NVIDIA regression casesPass on Windows x64, Linux x64 and macOS (M1), in CI
Eight short audio cases (8–48 kHz)Waveform SNR 113–118 dB to every GPU run
60 s continuous case, 48 kHzWaveform SNR 100.7 dB, peak error 6.9e-6
GPU-to-GPU spread, same 60 s caseSNR 118–121 dB, peak error 0.8–1.4e-6

The CPU output differs from the GPU output at about −100 dB or less: far below what anyone can hear. On long streams the difference is about 5 times the spread between two GPUs, so the output is not bit-identical to a GPU.

Regression gates#

gpu_reference.rs runs seven saved GPU cases on every CI run. Each quantity must reach the SNR and stay below the peak error.

QuantityShort tracesFour fused profiles
Enhanced log magnitude90 dB / 1e-590 dB / 1e-5
Enhanced phase (wrapped, rad)90 dB / 1e-382 dB / 2e-3
Temporal convolution state110 dB / 1e-4103 dB / 1e-4
Temporal SSM state110 dB / 1e-4100 dB / 1e-4

The speech waveform case uses 100 dB / 2e-6. The profiles cover 8, 16, 44.1 and 48 kHz, 3 to 12 layers and look-ahead 0 to 2.

GPU reference spread#

Two runs of the same FP32 model on different GPUs do not give identical output, because the order of floating-point additions differs. To find a fair target, NVIDIA's pinned code ran on T4 and A10G GPUs, twice each, from the same input spectra.

CaseCPU vs GPU: peak / SNRGPU vs GPU: peak / SNR
Silence, 8 kHz1.5e-10 / 91.8 dB1.9e-10 / 90.5 dB
Impulses, 16 kHz, look-ahead 17.0e-9 / 102.2 dB9.0e-9 / 100.5 dB
Clipping, 24 kHz3.0e-6 / 111.3 dB1.6e-6 / 116.0 dB
Speech, 8 kHz3.8e-7 / 115.8 dB2.1e-7 / 122.2 dB
Speech, 16 kHz, look-ahead 14.5e-7 / 117.5 dB2.5e-7 / 123.3 dB
Speech, 44.1 kHz, 8 layers, look-ahead 26.2e-7 / 113.9 dB4.2e-7 / 119.4 dB
Speech, 48 kHz6.3e-7 / 113.0 dB2.4e-7 / 122.4 dB
Overlapped speech, 32 kHz, look-ahead 23.7e-7 / 117.4 dB2.0e-7 / 123.5 dB
Continuous 60 s, 48 kHz6.9e-6 / 100.7 dB1.4e-6 / 118.1 dB

Where the long-stream difference comes from#

The SSM state has a long memory and integrates very small input differences over time; the convolution state remembers only 4 frames and stays flat. Making the CPU math more exact (correctly rounded exp and softplus, fused multiply-add, f64 accumulation) did not reduce the difference to the GPU. Copying the GPU's approximate math did. So the gap comes mostly from approximate math in NVIDIA's CUDA kernels, which all NVIDIA GPUs share.

Known differences#

  • On macOS, matrix products use Apple's Accelerate framework, whose results change slightly between macOS releases. The gates are validated on macOS 26 (CI and an M1 Mac mini). On the macOS 15 CI image, one fused case (8 kHz, 3 layers, reset) reaches a phase SNR of 78.4 dB and a peak phase error of 2.8e-3 rad, short of its 82 dB / 2e-3 gate; all other gates pass. The audio difference is still about −78 dB.
  • NVIDIA's code fails to reset at 22.05 kHz (cache shape). Hush runs 22.05 kHz, but there is no GPU reference for it.
  • Native STFT phase can take a different branch near ±π for very small bins.

Run the gates#

Shell
export HUSH_MODEL=$PWD/models/model.safetensors
cargo test -p hush-core --release --test gpu_reference -- --test-threads=1

DeepFilterNet 3#

Hush runs DeepFilterNet 3 with libDF 0.5.6, the Rust code of the official deep-filter command, with the same settings. Hush only removes the model's 30 ms delay from offline output and feeds the model in its 10 ms frames.

CheckResult
tests/deepfilter.rs: Hush against libDF called directly, 1.5 s of tones in noise, chunks that do not match framesBit-identical
824 VoiceBank-DEMAND files, Hush against the official deep-filter 0.5.6 binary for WindowsEqual on every file to within 1 step of 16-bit rounding (the binary writes 16-bit files)
Shell
export HUSH_DFN_MODEL=$PWD/models/DeepFilterNet3_onnx.tar.gz
cargo test -p hush-core --release --test deepfilter

Something unclear or out of date? Tell us or edit this page.