Saltar al contenido
ModelVerificadoExterno
Descargar

Sparse Nsnet2 Checkpoints

Best-PESQ checkpoints from the eco8-neaixt compression sweep: NSNet2 speech enhancement with the FC and GRU layers swappable between dense, Butterfly, block-diagonal, and genuine two-factor Monarch factorizations.

TipoOtherVersiónRevision a1769f8Publicador@claroche1Ccalidad

Fuente del modelo

Tipo
Other
Tamaño del archivo
126 KB–13,9 MB
Versión
vRevision a1769f8
Actualizado
3 oct 2026
Publicador
@claroche1
Descargas
0
Fuente
Hugging Face

Descripción de la fuente

sparse-nsnet2 — checkpoints

Best-PESQ checkpoints from the eco8-neaixt compression sweep: NSNet2 speech enhancement with the FC and GRU layers swappable between dense, Butterfly, block-diagonal, and genuine two-factor Monarch factorizations.

Trained on VoiceBank-DEMAND-16k, n_fft 512, batch 256. PESQ on the full 824-utterance test split.

⚠️ Two corrections you should read before quoting these numbers

1. Naming: the old monarch_* runs were NOT Monarch. They are a single block-diagonal factor (one block-diagonal matrix per projection, zero cross-block mixing). A genuine Monarch is a two-factor construction (block-diagonal × permutation × block-diagonal) with full cross-channel mixing. The old runs have therefore been renamed to blockdiag_*, and the monarch_* names now hold genuinely Monarch models:

old name (was mislabeled)nowmonarch_* today
monarch_8→ blockdiag_8genuine 2-factor Monarch
monarch_full→ blockdiag_fullgenuine 2-factor Monarch
monarch_fc→ blockdiag_fcgenuine 2-factor Monarch
wide_monarch→ wide_blockdiaggenuine 2-factor Monarch

If you previously pinned monarch_8, you now get a different (genuinely Monarch) model — the block-diagonal one you had is at blockdiag_8.

2. int8: the previously published int8 ONNX never quantized the structured weights. The structure-preserving export lowers each block-diagonal / Monarch matmul to an Einsum, and onnxruntime ships no QDQ handler for Einsum — so quantize_static skipped those nodes entirely. Only activations and the residual dense MatMuls were int8; the dominant weights stayed FP32. Every int8 file here has been re-quantized with the structured weights genuinely int8 (fixed in nsnet2/qdq_einsum_quantizer.py upstream). The "int8 is loss-free" property does survive the fix — but it had never actually been tested before it.

Results (int8 = genuinely quantized weights)

Genuine two-factor Monarch

runparamsFP32 PESQint8 PESQΔ (FP32→int8)
wide_monarch3.64 M2.8812.884−0.003
monarch_80.55 M2.8612.856+0.005
monarch_fc2.38 M2.8432.831+0.012
monarch_full1.10 M2.8382.846−0.009

Block-count sweep, both families (nblocks 5 → 40)

One knob varies. Every run below is the *_8 architecture — hidden 400, fc 600, both FCs and both GRU projections structured — with only nblocks changed, so parameters move and nothing else does. Dense baseline for reference: 2.845 FP32 / 2.834 int8 at 2.78 M.

nblocksblockdiag paramsFP32int8Δint8monarch paramsFP32int8Δint8
50.563 M2.8262.793+0.0330.880 M2.8522.858−0.007
80.355 M2.8322.825+0.0070.553 M2.8612.856+0.005
100.285 M2.7722.744+0.0280.443 M2.8492.842+0.007
200.146 M2.7192.627+0.0920.225 M2.8492.854−0.005
400.077 M2.6082.455+0.1530.117 M2.8372.8370.000

Block-diagonal collapses as blocks narrow; Monarch does not. Over nblocks 5→40 blockdiag loses 0.218 PESQ in FP32, and its int8 penalty grows from 0.033 to 0.153 (0.338 total in int8 terms). Monarch moves 0.015 in FP32 and stays int8-loss-free throughout — exactly 0.000 at nblocks 40.

The separating variable is connectivity, not capacity. A block-diagonal factor never mixes across blocks, so raising nblocks splits the network into narrower non-communicating bands; Monarch's permutation restores full cross-channel reach in one step. Two checks:

  • At matched parameters: blockdiag_5 (0.563 M) 2.826 vs monarch_8 (0.553 M) 2.861 — +0.035 for Monarch at equal size.
  • Monarch wins while smaller: monarch_40 (0.117 M) beats blockdiag_20 (0.146 M) by 0.130 FP32 and 0.227 int8.

monarch_40 reaches dense parity with 24× fewer parameters (2.837 vs 2.845, inside metric noise) and is loss-free in int8, where the dense baseline itself gives up 0.012. It is the model to take unless you have a reason not to.

Param-matched dense controls

Structured-vs-structured comparisons cannot tell "Monarch's mixing is what matters" apart from "any model of this width would do". The control is a plain narrower dense NSNet2 at the same parameter count (dense_h*, hidden and fc scaled together at the original 1.5 ratio, each within ~1% of its pair):

paramsblock-diagonaldenseMonarchdense−monarch
0.88 M—2.806†2.852−0.046
0.55 M2.8262.8402.861−0.021
0.44 M—2.8152.849−0.034
0.23 M2.7192.7842.849−0.065
0.12 M—2.7512.837−0.086
0.08 M2.6082.749——

† dense_h216 was originally published from a single seed-1234 run at 2.783, the worst of three. Repeat seeds (dense_h216_s2345, dense_h216_s3456, both in this repo) score 2.814 and 2.821, giving 2.806 ± 0.017 (n=3); the pairing's gap falls from −0.069 to −0.046. Note h216's seed sd is 2.4× that of the other dense arms, and it reaches the same training loss as the smaller h168 while scoring worse — consistent with lr=0.003 being too hot for the widest dense arm.

Monarch beats dense at all five matched sizes (mean −0.055), and the gap widens as models shrink. The small-end ordering is Monarch > dense > block-diagonal — so blockdiag_40 does not fail because 0.077 M is too small for the task; a dense model of that exact size scores 2.749 against its 2.608.

Dense quantizes cleanly at every width (|Δ| ≤ 0.017), so int8 robustness does not separate dense from Monarch; that failure is specific to narrow block-diagonal.

Confirmed with repeat seeds (three each: 1234, 2345, 3456) on the two pairings that carry the argument:

pairingMonarch (n=3)dense (n=3)gapoverlap?
0.12 M2.832 ± 0.0092.753 ± 0.002+0.079none (+0.067)
0.55 M2.858 ± 0.0032.833 ± 0.008+0.025none (+0.016)

In both, the worst Monarch run beats the best dense run, and the advantage grows as models shrink. Seed noise is sd 0.002–0.009, an order of magnitude below the effect. Note that dense's scatter across sizes (0.089 band, the 0.55 M arm beating the 0.88 M one) is therefore real rather than noise — dense NSNet2 trains inconsistently at these widths in a way Monarch does not.

Latency: the trade-off runs the other way

All seven small-model arms below were re-timed back-to-back in one session on an idle box, so these RTFs are directly comparable (the RTF figures elsewhere in this file were collected across different days and are not).

paramsmodelint8 PESQint8 RTF
0.12 Mmonarch_402.8370.013
0.12 Mdense_h682.7540.007
0.23 Mmonarch_202.8540.013
0.23 Mdense_h1002.7940.011
0.08 Mblockdiag_402.4550.008
0.08 Mdense_h522.7450.005

At matched parameters the dense model is faster at every small size — 1.9× at 0.12 M, 1.2× at 0.23 M. Monarch's Einsum lowering carries a fixed overhead that stops paying for itself as the models shrink; parameter count and latency are not the same axis.

So the deployment choice at 0.12 M is a real trade, not a free win: +0.083 PESQ (Monarch) against ~1.9× lower CPU latency and no torch-structured / gru-qat dependency (dense). On embedded targets the case is worse still — Monarch measured ~3× slower than dense on the RT595, and raising the block count made the STM32N6 NPU slower. Monarch wins the science; dense may well win the product.

Block-diagonal, dense, butterfly

runparamsFP32 PESQint8 PESQΔ (FP32→int8)
wide_blockdiag2.36 M2.8642.847+0.016
baseline (dense)2.78 M2.8452.833+0.012
blockdiag_80.36 M2.8322.825+0.007
blockdiag_full0.70 M2.8272.843−0.016
blockdiag_fc2.14 M2.8052.787+0.018
butterfly_2blocks0.36 M2.8052.202+0.602
butterfly_fc1.99 M2.7992.494+0.306
butterfly_ortho0.19 M2.7802.577+0.203
butterfly_full0.19 M2.7722.128+0.644

Key findings

  • Quality saturates — this model class is architecture-bound, not capacity-bound. Across three structure families and ~10× parameters, every configuration lands in a 2.83–2.88 band, non-monotonically: the 0.55 M monarch_8 (2.861) beats both the 1.10 M monarch_full and the 2.38 M monarch_fc. Going 7× from monarch_8 to wide_monarch buys +0.020 PESQ. NSNet2 predicts a magnitude mask and reuses the noisy phase, which caps PESQ regardless of how expressive the mask predictor is. The dense model was already over-parameterized — which is exactly why aggressive structuring is nearly free. For deployment, take the smallest (blockdiag_8 / monarch_20). The block-count sweep extends this: 4× parameters across nblocks 5→20 moves PESQ by 0.012, within run-to-run noise.
  • Genuine Monarch beats block-diagonal, but marginally (+0.011...+0.038 FP32 at matched nblocks) and it costs parameters — its second factor makes it larger. Consistent with the saturation above.
  • Monarch quantizes loss-free at every block count tested (|Δ| ≤ 0.012 over nblocks 4–40). Block-diagonal only up to nblocks 8 (|Δ| ≤ 0.018) — at 20 and 40 the penalty is 0.092 and 0.153. The older unqualified "block-diagonal quantizes loss-free" claim was tested only on wide blocks, with the weights genuinely quantized.
  • Butterfly with randn init degrades catastrophically under int8 (Δ up to 0.644). Use init=ortho: butterfly_ortho loses 0.203 to int8 vs 0.644 for butterfly_full — same architecture, same data, only the init differs.

Layout

One subdirectory per run: the generator (g_best), the streaming FP32 ONNX, the static int8 ONNX, and the exact config.json it was trained with.

baseline/          blockdiag_5/     monarch_5/       butterfly_fc/
blockdiag_fc/      blockdiag_8/     monarch_8/       butterfly_full/
blockdiag_full/    blockdiag_10/    monarch_10/      butterfly_ortho/
wide_blockdiag/    blockdiag_20/    monarch_20/      butterfly_2blocks/
wide_monarch/      blockdiag_40/    monarch_40/
monarch_fc/

  each: {g_best, g_best_fp32.onnx, g_best.onnx,...

Fuentes

1 fuente
Hugging FacePrincipalVersión a1769f8f08d6c013d45b15874954e55e4466c316
huggingface.co/claroche1/sparse-nsnet2-checkpoints/tree/a1769f8f08d6c013d45b15874954e55e4466c316

Verificado 3 oct

Artefactos del modelo

54 artefactos

baseline/g_best_fp32.onnx

onnx · 10,6 MB · SHA-256 81292578df18…cabb · Hugging Face

Descargar

baseline/g_best.onnx

onnx · 2,78 MB · SHA-256 66e5b8f4a540…0afd · Hugging Face

Descargar

blockdiag_10/g_best_fp32.onnx

onnx · 1,11 MB · SHA-256 8301fee8be42…a4b8 · Hugging Face

Descargar

blockdiag_10/g_best.onnx

onnx · 354 KB · SHA-256 fafeabebea43…38a7 · Hugging Face

Descargar

blockdiag_20/g_best_fp32.onnx

onnx · 592 KB · SHA-256 4bc6d61ee74f…c204 · Hugging Face

Descargar

blockdiag_20/g_best.onnx

onnx · 216 KB · SHA-256 afb01f0b8017…0789 · Hugging Face

Descargar

blockdiag_40/g_best_fp32.onnx

onnx · 322 KB · SHA-256 4c2527ae35f0…4d39 · Hugging Face

Descargar

blockdiag_40/g_best.onnx

onnx · 148 KB · SHA-256 b340c0c2c812…e606 · Hugging Face

Descargar

blockdiag_5/g_best_fp32.onnx

onnx · 2,17 MB · SHA-256 beb3851eb5b9…e1b7 · Hugging Face

Descargar

blockdiag_5/g_best.onnx

onnx · 628 KB · SHA-256 37d8b9052145…1d8b · Hugging Face

Descargar

blockdiag_8/g_best_fp32.onnx

onnx · 1,38 MB · SHA-256 ceaa0e96895f…ce73 · Hugging Face

Descargar

blockdiag_8/g_best.onnx

onnx · 423 KB · SHA-256 b179824dcf6e…1e86 · Hugging Face

Descargar

blockdiag_fc/g_best_fp32.onnx

onnx · 8,18 MB · SHA-256 f105f2a4d8d2…b5f6 · Hugging Face

Descargar

blockdiag_fc/g_best.onnx

onnx · 2,15 MB · SHA-256 264bb5059e53…b4b2 · Hugging Face

Descargar

blockdiag_full/g_best_fp32.onnx

onnx · 2,70 MB · SHA-256 c49a7c864861…6894 · Hugging Face

Descargar

blockdiag_full/g_best.onnx

onnx · 766 KB · SHA-256 a666da906fcc…866e · Hugging Face

Descargar

butterfly_2blocks/g_best_fp32.onnx

onnx · 1,55 MB · SHA-256 285afd772ee4…d8af · Hugging Face

Descargar

butterfly_2blocks/g_best.onnx

onnx · 802 KB · SHA-256 df45fd5ae9f1…2244 · Hugging Face

Descargar

butterfly_fc/g_best_fp32.onnx

onnx · 7,66 MB · SHA-256 f52b948e0f9b…6728 · Hugging Face

Descargar

butterfly_fc/g_best.onnx

onnx · 2,10 MB · SHA-256 9a4d9953d294…d3b9 · Hugging Face

Descargar

butterfly_full/g_best_fp32.onnx

onnx · 845 KB · SHA-256 5422e6e3d6f4…18fc · Hugging Face

Descargar

butterfly_full/g_best.onnx

onnx · 465 KB · SHA-256 7bef3f4279db…d492 · Hugging Face

Descargar

butterfly_ortho/g_best_fp32.onnx

onnx · 845 KB · SHA-256 3eaa20b37a33…0823 · Hugging Face

Descargar

butterfly_ortho/g_best.onnx

onnx · 465 KB · SHA-256 b8f8c940840c…c8eb · Hugging Face

Descargar

dense_h100/g_best_fp32.onnx

onnx · 879 KB · SHA-256 162c182991be…c71d · Hugging Face

Descargar

dense_h100/g_best.onnx

onnx · 280 KB · SHA-256 13b9ed264006…25d4 · Hugging Face

Descargar

dense_h148/g_best_fp32.onnx

onnx · 1,69 MB · SHA-256 a85c607fa1e2…9f29 · Hugging Face

Descargar

dense_h148/g_best.onnx

onnx · 504 KB · SHA-256 8107b0f240f3…5855 · Hugging Face

Descargar

dense_h168/g_best_fp32.onnx

onnx · 2,12 MB · SHA-256 d8e588bd1601…5340 · Hugging Face

Descargar

dense_h168/g_best.onnx

onnx · 618 KB · SHA-256 47b7de7685bc…9c8f · Hugging Face

Descargar

dense_h216/g_best_fp32.onnx

onnx · 3,35 MB · SHA-256 be636c55031c…64fb · Hugging Face

Descargar

dense_h216/g_best.onnx

onnx · 942 KB · SHA-256 a7008f7438a9…fa43 · Hugging Face

Descargar

dense_h52/g_best_fp32.onnx

onnx · 307 KB · SHA-256 24d68bce0c81…4ec5 · Hugging Face

Descargar

dense_h52/g_best.onnx

onnx · 126 KB · SHA-256 11723f2761d2…a419 · Hugging Face

Descargar

dense_h68/g_best_fp32.onnx

onnx · 466 KB · SHA-256 f8c8b57d57ea…f939 · Hugging Face

Descargar

dense_h68/g_best.onnx

onnx · 170 KB · SHA-256 e71cf1128574…5a4d · Hugging Face

Descargar

monarch_10/g_best_fp32.onnx

onnx · 1,72 MB · SHA-256 4f9a194bc337…b7d3 · Hugging Face

Descargar

monarch_10/g_best.onnx

onnx · 553 KB · SHA-256 d63d2b56ad3b…a560 · Hugging Face

Descargar

monarch_20/g_best_fp32.onnx

onnx · 910 KB · SHA-256 1ca0f2802c80…bb0f · Hugging Face

Descargar

monarch_20/g_best.onnx

onnx · 337 KB · SHA-256 f8c73b0de34d…57d2 · Hugging Face

Descargar

monarch_40/g_best_fp32.onnx

onnx · 486 KB · SHA-256 0318f13771de…c3b4 · Hugging Face

Descargar

monarch_40/g_best.onnx

onnx · 230 KB · SHA-256 121ea3098c69…713d · Hugging Face

Descargar

monarch_5/g_best_fp32.onnx

onnx · 3,39 MB · SHA-256 9a8b383e6d25…5816 · Hugging Face

Descargar

monarch_5/g_best.onnx

onnx · 985 KB · SHA-256 4f04861d3e15…41e7 · Hugging Face

Descargar

monarch_8/g_best_fp32.onnx

onnx · 2,14 MB · SHA-256 94d37f1c9ba9…1b3f · Hugging Face

Descargar

monarch_8/g_best.onnx

onnx · 662 KB · SHA-256 37174cc619ec…9b61 · Hugging Face

Descargar

monarch_fc/g_best_fp32.onnx

onnx · 9,10 MB · SHA-256 82d9cac18e0c…81e8 · Hugging Face

Descargar

monarch_fc/g_best.onnx

onnx · 2,39 MB · SHA-256 0f03d3c0cb74…8ef2 · Hugging Face

Descargar

monarch_full/g_best_fp32.onnx

onnx · 4,22 MB · SHA-256 7df98544d085…bd8e · Hugging Face

Descargar

monarch_full/g_best.onnx

onnx · 1,17 MB · SHA-256 f06d4607c1ff…d0e2 · Hugging Face

Descargar

wide_blockdiag/g_best_fp32.onnx

onnx · 9,01 MB · SHA-256 993a4691187c…c9fa · Hugging Face

Descargar

wide_blockdiag/g_best.onnx

onnx · 2,33 MB · SHA-256 4b0bf6ce3a0c…75cb · Hugging Face

Descargar

wide_monarch/g_best_fp32.onnx

onnx · 13,9 MB · SHA-256 656b4c78c4c0…4937 · Hugging Face

Descargar

wide_monarch/g_best.onnx

onnx · 3,60 MB · SHA-256 86d3c6cd8df5…014c · Hugging Face

Descargar

Extractos de fuentes

3 extractos

--- license: mit language: en library_name: pytorch tags: - speech-enhancement - speech-denoising - nsnet2 - butterfly - block-diagonal - monarch - structured-matrices - onnx - quantization - int8 datasets: - JacobLinCool/VoiceBank-DEMAND-16k metrics: - pesq --- # sparse-nsnet2 — checkpoints Best-PESQ checkpoints from the [eco8-neaixt](https://github.com/LarocheC/eco8-neaixt) compression sweep: NSNet2 speech enhancement with the FC and GRU layers swappable between dense, [Butterfly](https://arxiv.org/abs/1903.05895), **block-diagonal**, and genuine two-factor [Monarch](https://arxiv.org/abs/2204.00595) factorizations. Trained on [VoiceBank-DEMAND-16k](https://huggingface.co/datasets/JacobLinCool/VoiceBank-DEMAND-16k), n\_fft 512, batch 256. PESQ on the full 824-utterance test split. ## ⚠️ Two corrections you should read before quoting these numbers **1. Naming: the old `monarch_*` runs were NOT Monarch.** They are a *single block-diagonal factor* (one block-diagonal matrix per projection, **zero cross-block mixing**). A genuine [Monarch](https://arxiv.org/abs/2204.00595) is a **two-factor** construction (block-diagonal × permutation × block-diagonal) with full cross-channel mixing. The old runs have therefore been **renamed to `blockdiag_*`**, and the `monarch_*` names now hold *genuinely* Monarch models: | old name (was mislabeled) | now | `monarch_*` today | | ------------------------- | ------------------ | ------------------------ | | `monarch_8` | → `blockdiag_8` | genuine 2-factor Monarch | | `monarch_full` | → `blockdiag_full` | genuine 2-factor Monarch | | `monarch_fc` | → `blockdiag_fc` | genuine 2-factor Monarch | | `wide_monarch` | → `wide_blockdiag` | genuine 2-factor Monarch | If you previously pinned `monarch_8`, you now get a **different (genuinely Monarch) model** — the block-diagonal one you had is at `blockdiag_8`. **2. int8: the previously published int8 ONNX never quantized the structured weights.** The structure-preserving export lowers each block-diagonal / Monarch matmul to an `Einsum`, and onnxruntime ships no QDQ handler for `Einsum` — so `quantize_static` skipped those nodes entirely. Only activations and the residual dense MatMuls were int8; the **dominant weights stayed FP32**. Every int8 file here has been **re-quantized with the structured weights genuinely int8** (fixed in `nsnet2/qdq_einsum_quantizer.py`...

Source context: 0 downloads · 0 likes · Library pytorch · Repo claroche1/sparse-nsnet2-checkpoints

Source context: 0 downloads · 0 likes · Library pytorch · Repo claroche1/sparse-nsnet2-checkpoints