Fixed quantization error in modules that use register_buffer#29203
Fixed quantization error in modules that use register_buffer#29203DonggeunYu wants to merge 14 commits intohuggingface:mainfrom
Conversation
…tr.py Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
younesbelkada
left a comment
There was a problem hiding this comment.
Great catch ! can you confirm the 4bit tests pass for you ?
RUN_SLOW=1 pytest tests/quantization/bnb/test_4bit.pyIf they pass I think we can safely merge the PR, depending on your hardware you might get some failure with respect to generated texts, for that you can simply check if you get the same failures between main branch and yours
|
Main branch output: |
younesbelkada
left a comment
There was a problem hiding this comment.
Thanks again @DonggeunYu !
Just to confirm one last point, could your re-run the bnb tests with bitsandbytes==0.42.0 ?
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
@younesbelkada |
|
🥲 |
|
@DonggeunYu Am I correct in understanding this PR was superceded by #29329? If so, apologies for the delay in reviewing this, and we should close this PR. Please don't hesitate to ping me on a PR if there's a delay in response - thee's a lot of notifications and sometimes they slip through the cracks. |
Yes, that's right. I understand. Thank you 😊 |
What does this PR do?
Fixed quantization error in modules that use register_buffer.
When using
self.register_buffer, it is included instate_dict, but not in_parameters, which is why first validate thattensor_nameexists in_parametersbefore searching for it bytensor_namein_parameters.Fixes #29201
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?