Skip to content

parakeet: load 2-D pointwise conv kernels so they can be quantized - #282

Merged
cjpais merged 2 commits into
handy-computer:mainfrom
ZenAesthete:parakeet-quantized-pointwise
Dec 3, 2026
Merged

cjpais merged 2 commits into
handy-computer:mainfrom
ZenAesthete:parakeet-quantized-pointwise

Conversation

@ZenAesthete

@ZenAesthete ZenAesthete commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses #281.

Lets the Parakeet runtime load conformer pointwise conv kernels stored 2-D ([in, out]). In that layout transcribe-quantize classifies them as Linear, so they are block-quantized instead of staying F16 (and being promoted to F32 on CPU). Files with the current [1, in, out] layout load and run as before.

The converter change that writes 2-D kernels will follow in a separate PR.

Scope

  • src/arch/parakeet/weights.cpp
    New GET_PW macro. A 2-D pointwise kernel loads through GET_LIN; anything else through GET_CONV, as before.
  • src/conformer/conformer.cpp
    In conv_module(), a 2-D pointwise kernel always takes the direct mul_mat path, since im2col needs the k axis.
  • tests/conformer_pw_layout_unit.cpp
    New unit test. With an im2col policy on CPU, 2-D F32 kernels match the 3-D reference and 2-D Q8_0 kernels stay close to it. Without the conformer.cpp change the test aborts in ggml (GGML_ASSERT(b->ne[1] == a->ne[1])).
  • Docs
    The ConvPw row in docs/tools/quantization.md and the TRANSCRIBE_CONV_DIRECT_PW row in docs/environment-variables.md.

Validation

Tested on Windows 11 (MinGW GCC 15.2), CPU and Vulkan (AMD Radeon iGPU). Not tested on CUDA or Metal.

  • scripts/ci/clang-format.sh --check passes; ctest 67/67.
  • Existing GGUFs: output tokens identical to main for TDT 0.6B v2 and Nemotron 0.6B on CPU and Vulkan.
  • 2-D F32 (official F32 with the size-1 axis dropped): output byte-identical to the 3-D file on CPU and Vulkan.
  • 2-D Q5_K_M (unmodified transcribe-quantize): parakeet_real_smoke and decoder_smoke (TDT 0.6B v2) pass on CPU and Vulkan; parakeet_buffered_stream_eos_smoke (Unified 0.6B) passes on Vulkan.

TDT 0.6B v2, Q5_K_M, 84 s sample:

Current (3-D) 2-D
File size 539.0 MB 439.9 MB
Peak RAM, CPU 1258 MB 875 MB
GPU memory, Vulkan 879 MB 784 MB

WER and System Resource Usage Results: standard (Current) vs fixed (New) pointwise layout

Full LibriSpeech test-clean (2,620 utterances)

Model Quant File size (MB) Peak RAM, CPU (MB) WER std -> fixed (%) ΔWER (pp) 95 % CI (pp) Utts better / worse
TDT-CTC 110M Q4_K_M 90.0 -> 70.8 (-21%) 380 -> 301 (-21%) 2.451 -> 2.501 +0.049 [+0.011, +0.087] 30 / 53
TDT-CTC 110M Q8_0 135.4 -> 122.8 (-9%) 424 -> 352 (-17%) 2.370 -> 2.360 -0.009 [-0.029, +0.008] 9 / 7
TDT 0.6B v2 Q4_K_M 475.5 -> 367.0 (-23%) 1086 -> 695 (-36%) 1.664 -> 1.658 -0.006 [-0.039, +0.028] 25 / 25
TDT 0.6B v2 Q8_0 729.6 -> 658.8 (-10%) 1329 -> 977 (-26%) 1.617 -> 1.634 +0.017 [-0.002, +0.036] 3 / 10
Unified 0.6B Q4_K_M 477.3 -> 368.7 (-23%) 989 -> 598 (-40%) 1.575 -> 1.575 0.000 [-0.028, +0.028] 17 / 17
Unified 0.6B Q8_0 731.4 -> 660.6 (-10%) 1226 -> 876 (-29%) 1.571 -> 1.579 +0.008 [-0.002, +0.019] 1 / 4
  • ΔWER is fixed minus standard. The 95 % CI is a paired bootstrap over utterances (10,000 resamples), so both versions are compared on exactly the same audio.
  • 5 of the 6 intervals include zero, so no impact on accuracy is observed. The exception is TDT-CTC 110M at Q4_K_M (+0.049 pp, 26 more errors in 52,829 words), which is smaller than that model's published Q5_K_M to Q4_K_M gap (0.06 pp). There are also some other small deviations where accuracy slightly improves.
  • Vulkan check (110M Q4_K_M): ΔWER +0.013 pp [-0.030, +0.057], peak GPU memory 270 -> 163 MB.

Setup: Windows 11, Ryzen 5 7530U, CPU backend. Standard files are transcribe-quantize output from the official F32 GGUFs. Fixed files are the same F32 GGUFs with the size-1 axis dropped from the pointwise tensors.

@cjpais

cjpais commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

I think I need you to check word error rate before I can accept this change

@ZenAesthete

ZenAesthete commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

I think I need you to check word error rate before I can accept this change

Thanks for taking a look. I did try that but to properly benchmark it would need several configurations (the current vs the fixed version of each quantization) for several models (TDT 0.6B v2, Nemotron and Unified). On the full LibriSpeech test-clean set one run was taking around 20 minutes on my machine, so that equals to several hours of compute.

If it helps, I can share the 2-D GGUFs I used so they can go through your usual WER setup. Or let me know which models and quantizations matter most to you, and I can run a smaller, focused benchmark.

@cjpais

cjpais commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

I understand it takes several hours of compute, but that's what it takes to get merged. I also have to do it for several hours, and I need at least some satisfactory results that you've done sufficient validation before I try it

Someone has to do the compute to validate that this is a change that can actually be merged rather than just something for fun, as a fun exercise to reduce the amount of memory being used

@ZenAesthete

Copy link
Copy Markdown
Contributor Author

I understand it takes several hours of compute, but that's what it takes to get merged. I also have to do it for several hours, and I need at least some satisfactory results that you've done sufficient validation before I try it

Someone has to do the compute to validate that this is a change that can actually be merged rather than just something for fun, as a fun exercise to reduce the amount of memory being used

That's fair, I'll benchmark the necessary configurations and get back to you.

@ZenAesthete

ZenAesthete commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

@cjpais I've added the benchmark results. Kindly take a look when you have a moment.

@cjpais

cjpais commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

thank you will take a look soon

@cjpais
cjpais merged commit 9284cbb into handy-computer:main Dec 3, 2026
1 check 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