Labels: bug, export, parity, priority:medium
File: src/tether/decompose.py:212-226 (decompose_rmsnorm), :257 (prepare_for_export); correct dispatcher unused at :56 (swap_rmsnorm_variants) / :36 (DecomposedGemmaRMSNorm)
Description. The public prepare_for_export/decompose_rmsnorm apply Llama-style DecomposedRMSNorm to every RMSNorm, ignoring Gemma's (1 + weight) parameterization that DecomposedGemmaRMSNorm exists to handle. Production exporters hand-pick the right class, but the public API and its tests bless the wrong behavior.
Why it matters. Anyone calling prepare_for_export(model) on a PaliGemma backbone (pi0/pi05) gets silently wrong normalization → a runnable-but-incorrect ONNX. A latent trap for contributors following the public API.
Tasks.
Dedup. #21 is a pi0 attention patch — different. Not covered.
CI / TOOLING / PACKAGING / DOCS
Labels:
bug,export,parity,priority:mediumFile:
src/tether/decompose.py:212-226(decompose_rmsnorm),:257(prepare_for_export); correct dispatcher unused at:56(swap_rmsnorm_variants) /:36(DecomposedGemmaRMSNorm)Description. The public
prepare_for_export/decompose_rmsnormapply Llama-styleDecomposedRMSNormto every RMSNorm, ignoring Gemma's(1 + weight)parameterization thatDecomposedGemmaRMSNormexists to handle. Production exporters hand-pick the right class, but the public API and its tests bless the wrong behavior.Why it matters. Anyone calling
prepare_for_export(model)on a PaliGemma backbone (pi0/pi05) gets silently wrong normalization → a runnable-but-incorrect ONNX. A latent trap for contributors following the public API.Tasks.
decompose_rmsnorm/prepare_for_exportthrough the same class-name dispatch asswap_rmsnorm_variants(Gemma →DecomposedGemmaRMSNorm), or delete the legacy functions if dead.Dedup. #21 is a pi0 attention patch — different. Not covered.
CI / TOOLING / PACKAGING / DOCS