feat: Implement 4-bit and 8-bit Quantized Convolutional Layers#1907
feat: Implement 4-bit and 8-bit Quantized Convolutional Layers#1907OnePunchMonk wants to merge 1 commit into
Conversation
|
Thanks for the contribution and the effort that went into this — the code is well-structured and the test coverage is thorough. After reviewing, I don't think this is something we should add to bitsandbytes right now, and I want to explain why rather than just closing it. Both the 4-bit and 8-bit conv classes here do dequantize-then-compute: weights are stored in reduced precision but fully dequantized back to fp16/fp32 before the forward pass, delegating to standard The broader question is who this is for. The dominant use case for bitsandbytes is transformer models with large linear layers. The one place transformer architectures use something conv-shaped — GPT-2's I'm going to close this PR for now. Thanks again for putting the work in. |
…-foundation#1907) Add a regression test for the nested Linear4bit load_state_dict path that the fix repairs. The existing serialization tests restore via from_prequantized and never call load_state_dict, so the override was uncovered. This test fails on main (dropped QuantState keys, garbage forward output) and passes with the fix, for both strict values. Test authored by @egeozkoc during PR review.
This PR introduces support for 4-bit and 8-bit quantized convolutional layers as requested in #1414.
Included:
Fixes #1414