Repository navigation
parakeet: load 2-D pointwise conv kernels so they can be quantized - #282
Conversation
|
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. |
|
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. |
|
@cjpais I've added the benchmark results. Kindly take a look when you have a moment. |
|
thank you will take a look soon |
Summary
Addresses #281.
Lets the Parakeet runtime load conformer pointwise conv kernels stored 2-D (
[in, out]). In that layouttranscribe-quantizeclassifies them asLinear, 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.cppNew
GET_PWmacro. A 2-D pointwise kernel loads throughGET_LIN; anything else throughGET_CONV, as before.src/conformer/conformer.cppIn
conv_module(), a 2-D pointwise kernel always takes the directmul_matpath, since im2col needs the k axis.tests/conformer_pw_layout_unit.cppNew 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.cppchange the test aborts in ggml (GGML_ASSERT(b->ne[1] == a->ne[1])).The
ConvPwrow indocs/tools/quantization.mdand theTRANSCRIBE_CONV_DIRECT_PWrow indocs/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 --checkpasses;ctest67/67.mainfor TDT 0.6B v2 and Nemotron 0.6B on CPU and Vulkan.transcribe-quantize):parakeet_real_smokeanddecoder_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:
WER and System Resource Usage Results: standard (Current) vs fixed (New) pointwise layout
Full LibriSpeech test-clean (2,620 utterances)
Setup: Windows 11, Ryzen 5 7530U, CPU backend. Standard files are
transcribe-quantizeoutput from the official F32 GGUFs. Fixed files are the same F32 GGUFs with the size-1 axis dropped from the pointwise tensors.