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

fix bf16 model type issue for ia3 #1634

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

sywangyi
Copy link
Contributor

@sywangyi sywangyi commented Apr 9, 2024

No description provided.

@sywangyi
Copy link
Contributor Author

sywangyi commented Apr 9, 2024

@BenjaminBossan please help review.

@sywangyi
Copy link
Contributor Author

sywangyi commented Apr 9, 2024

if set torch_dtype is bfloat16 in model.from_pretained(), all adapter layers after get_peft_model(xxx) should be bfloat16 as well. fix issue in ia3 and adalora, also ia3 forward return dtype should be aligned with the base_layer.forward() output.

@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
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks, those changes to correctly enable bf16 look good. I'll request another review by the co-maintainers just to be sure.

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
@sywangyi sywangyi changed the title fix bf16 model type issue for ia3 and adalora fix bf16 model type issue for ia3 Apr 12, 2024
@BenjaminBossan
Copy link
Member

@pacman100 Could you please check again?

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

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

Thank you, @sywangyi, for the fixes!

@BenjaminBossan BenjaminBossan merged commit 7a22b7d into huggingface:main Apr 29, 2024
14 checks 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.

4 participants