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 bug with state loading on lora_decoder.ipynb #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gkamtzir
Copy link

Problem

In the Google Colab notebook where training with LoRA is showcased, the script expects model weights to be in a binary format (in pytorch_model.bin). However, that's not the case anymore since accelerator stores the weights in safetensors format.

Solution

In this PR, I've added a new block where the safetensors weights for prior and lora are read and loaded in two dictionaries. Then, the dictionaries are used to load the states, which essentially resolved the problem.

This bug was first mentioned in #102

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.

1 participant