Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bnb] Fix bug in _replace_with_bnb_linear #29958

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

SunMarc
Copy link
Member

@SunMarc SunMarc commented Mar 29, 2024

What does this PR do

This PR fixes a bug in _replace_with_bnb_linear when we use modules_to_not_convert. Before this PR, we were skipping the conversion of some modules if their name starts with "model.layers.1" (e.g. "model.layers.10.self_attn.q_proj") in the case where modules_to_not_convert = ['model.layers.1'].

Fixes #29691

@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prompt fix!

@SunMarc SunMarc merged commit 33288ff into huggingface:main Apr 2, 2024
21 checks passed
@SunMarc SunMarc mentioned this pull request Apr 4, 2024
ArthurZucker pushed a commit that referenced this pull request Apr 22, 2024
itazap pushed a commit that referenced this pull request May 14, 2024
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.

load_in_8bit doesn't work when set device_map
3 participants