Skip to content

mel: skip zero-weight filterbank entries in the mel projection - #64

Merged
mudler merged 1 commit into
mudler:masterfrom
haydonryan:opt/mel-sparse-filterbank
Aug 18, 2026
Merged

mudler merged 1 commit into
mudler:masterfrom
haydonryan:opt/mel-sparse-filterbank

Conversation

@haydonryan

Copy link
Copy Markdown
Contributor

The mel filterbank matrix is ~98% zeros (426 nonzero of 20 560 on the 110m). frame_logmel now iterates a precomputed nonzero (bin, weight) index instead of all n_bins per mel filter, cutting the per-frame filterbank multiply-adds ~48x. Skipping an exact-zero weight contributes exactly 0.0, so the output is bit-identical (verified by checksum and the NeMo mel parity test test_mel).

Measured: ~55% faster mel frontend on the 110m (bit-identical).

Assisted-by: AI:DeepSeek-V4-Flash

The mel filterbank matrix is ~98% zeros (426 nonzero of 20 560 on the
110m). frame_logmel now iterates a precomputed nonzero (bin, weight)
index instead of all n_bins per mel filter, cutting the per-frame
filterbank multiply-adds ~48x. Skipping an exact-zero weight contributes
exactly 0.0, so the output is bit-identical (verified by checksum and the
NeMo mel parity test test_mel).

Measured: ~55% faster mel frontend on the 110m (bit-identical).

Assisted-by: AI:DeepSeek-V4-Flash
@mudler
mudler merged commit e75de9b into mudler:master Aug 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants