Repository navigation
fix(parakeet): store pointwise convs 2-D so they quantize (#281) - #307
Closed
patricksamuelevans wants to merge 1 commit into
Closed
patricksamuelevans wants to merge 1 commit into
patricksamuelevans wants to merge 1 commit into
Conversation
A 1x1 conv is a linear layer: [out, in, 1] and [out, in] have the same memory order. The converter now squeezes the conformer pointwise pair to 2-D, so transcribe-quantize classifies it as Linear instead of pinning 48 tensors per 0.6B model at F16 (about 100 MB at Q5_K_M and a ~290 MB F32 promotion on CPU). The loader accepts both layouts: GET_PW peeks at the stored rank and validates one shape. The conformer forces the direct mul_mat path when either pointwise weight is 2-D (the im2col fallback needs a kernel axis). Legacy 3-D GGUFs keep loading, and mixed layouts cannot select im2col by accident. The synthetic parakeet fixture stores pointwise1 2-D and pointwise2 legacy 3-D, covering both loader branches. Docs/tools/quantization.md now separates legacy 3-D ConvPw from the 2-D Linear layout. Fixes handy-computer#281.
patricksamuelevans
marked this pull request as ready for review
December 1, 2026 04:57
Contributor
|
not sure why this was opened, could have collaborated on #283 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #281
Summary
[1, in, out].transcribe-quantizeclassifiesne0 == 1asConvPwand keeps it F16because a 1-element row cannot be block-quantized.
(~290 MB copy).
Scope
scripts/convert-parakeet.py: squeezeconv.pointwise{1,2}.weightto[out, in](same memory order, no transpose).src/arch/parakeet/weights.cpp:GET_PWpeeks at the stored layout andvalidates one shape; 2-D uses linear types, legacy 3-D uses conv types.
src/conformer/conformer.cpp: force the directmul_matpointwise pathwhen either weight is 2-D; mixed layouts cannot select im2col.
src/arch/parakeet/weights.h,src/conformer/conformer.h: document bothlayouts.
tests/fixtures/make_gguf_fixtures.py: pointwise1 2-D + pointwise2 legacy3-D, covering both loader branches in
parakeet_smoke.docs/tools/quantization.md: legacy 3-DConvPwvs 2-DLinear.AI Assistance
proposal.
Validation
transcribe_parakeet_smokepasses with the mixed 2-D/legacy fixture.transcribe_sava_smokecrash.clang-format 22.1.5andgit diff --check: clean.NeMo environment or model here). Expected from the issue: 539.0 -> 439.9 MB
and 1258 -> 875 MB peak CPU RAM.
real-model quant run.