Round-trip tests expose a broken encoder
A round-trip test challenged the assumption that a codec was healthy because its decoder worked. The record compares the encoder-plus-decoder path and qualifies the new FP8 implementation on the named clips.
Key finding
The new 1.76GB FP8-E4M3 codec reached FP32-control parity in the measured round-trip test with its encoder intact.
Edited finding from the pinned experiment record. The report and figure metadata preserve the original workload and limits.
The boundary
INT8-SAFE round-trip SNR was about zero. Conclusions apply to the named clips and implementations.
Write-ups
Report moss-tts-awq/codec-roundtrip-fp8-2026-09-21/README.md
The question
A round-trip test challenged the assumption that a codec was healthy because its decoder worked. The record compares the encoder-plus-decoder path and qualifies the new FP8 implementation on the named clips.
From the original notebook
Five real reference clips (argentina-female-2121) pushed through every audio
codec variant on disk — encode → decode → measure (waveform SNR + WavLM x-vector
cosine vs the original) → side-by-side listening on the matrix site.
Variants: dense FP32 (control) · INT8-SAFE (HQ4-I8-SAFE) · NF4 blockwise · FP8-E4M3 blockwise (built in this experiment) — each as full round-trip and as “FP32 encodes → X decodes” (the production path).
Headline
- New FP8-E4M3 codec reaches parity with the FP32 control (SNR 10.7–12.5 dB, cos 0.951–0.994) at 1.76 GB with a working encoder — built with the same RTN blockwise recipe as NF4 (block=64, fp32 absmax; worst weight err 3.2e-2 vs NF4’s 0.119). “NF8” is not a real format; E4M3 is the standard 8-bit float.
- The INT8-SAFE encoder is broken, now with a number: full round-trip SNR ≈ 0 dB (cos 0.56–0.61) while its decoder is sample-parity with FP32 — the measured root cause of the earlier clone failure (FP32 reference encoding is mandatory).
- NF4 (0.96 GB) is the only sub-GB codec and works end-to-end, at ~1.5 dB cost vs control.
Contents
- docs/CODEC-ROUNDTRIP-REVIEW.md — tables, readings, caveats.
- docs/codecdemo_results.json — all 35 clip×variant measurements.
- docs/fp8_manifest.json — FP8 artifact manifest (620 modules, error stats).
scripts/— round-trip harness, FP8 converter, FP8 loader.
Reproduce
python convert_codec_fp8.py # builds weights/MOSS-Audio-Tokenizer-FP8 (1.76 GiB)
CUDA_VISIBLE_DEVICES=2 python roundtrip_codecs.py # -> codecdemo/ + results json
Codec checkpoints are workstation-local ($WORKSTATION/MOSS-TTS/weights/MOSS-Audio-Tokenizer*,
INT8 artifact in $WORKSTATION/MOSS-TTS/experiments/hq4-int8/artifacts/codec_safe_v1).
Boundaries
5 clips, one speaker. SNR/cosine are waveform/speaker proxies, not perceptual codec scores (MUSHRA-style listening would be next). Using the FP8 encoder for clone references is untested — audio parity does not imply identical tokens, and conditioning sensitivity is documented. Anti-overwrite guards on all outputs.
Keep exploring
Original experiment record. Workstation paths have been generalized. Detailed measurements below retain their original workload and validation boundaries.
Supporting notebooks
More in Speech & codecs
MOSS on a 3090: Q2 failed, AWQ4 stayed closer
Every profile began with the pinned BF16 generator. The comparison reused fixed reference codes and an FP32 decoder for the main quality measurements, keeping codec changes separate from generator quantization.
AWQ4 stayed close to the BF16 reference on WavLM and character errors; the sensitivity Q2 candidate was rejected.
Drama3: BF16 decoded the same codes about three times faster
The experiment replayed saved Spanish and English codes representing 21.5481 and 15.8824 seconds of audio. It compared FP32, BF16, mixed BF16 and two INT8 decoder variants on one RTX 3090.
BF16 reduced median decoder time from 390.07 to 129.54 ms in Spanish and from 292.42 to 96.88 ms in English.
Keeping FP32 and moving Supertonic to Triton
Rather than reduce the CPU graph precision again, this follow-up used NVIDIA Triton’s ONNX backend with CUDA execution and the unchanged FP32 graphs. The paired comparison retained both speed and acoustic checks.
The paired GPU test cut median first-audio time to about 0.35 seconds while preserving the measured ASR results.