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

Error while saving the model under 4bit lora #381

Closed
visionxyz opened this issue Jul 22, 2024 · 2 comments
Closed

Error while saving the model under 4bit lora #381

visionxyz opened this issue Jul 22, 2024 · 2 comments

Comments

@visionxyz
Copy link

visionxyz commented Jul 22, 2024

I used

--load_in_4bit
--lora_rank 8
--lora_alpha 16
--lora_dropout 0.05
--zero_stage 2 \

in the training script, then failed to save the model after training. I find it is a problem of load_in_4bit, if it is used,
this part (line 292) in deepspeed.py will be triggered

assert state_dict_keys.issubset(
output_state_dict_keys
), f"mismatch keys {output_state_dict_keys.symmetric_difference(state_dict_keys)}"

I think the training part is okay, but somehow the keys are changed after using both Lora and load in 4-bit.

Thank you so much for providing this tool! It would be appreciated if you could give me some hints about this problem.

@hijkzzz
Copy link
Collaborator

hijkzzz commented Jul 22, 2024

it's strange. You could try to comment on this line or debug it.

@visionxyz
Copy link
Author

Thank you! I currently comment this line. If I have time, I will debug it and report the reason.

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

No branches or pull requests

2 participants