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

Failed to build Llama-2-13b-hf engine with Lora adapter #673

Closed
manarshehadeh opened this issue Dec 16, 2023 · 4 comments
Closed

Failed to build Llama-2-13b-hf engine with Lora adapter #673

manarshehadeh opened this issue Dec 16, 2023 · 4 comments
Assignees
Labels
triaged Issue has been triaged by maintainers

Comments

@manarshehadeh
Copy link

manarshehadeh commented Dec 16, 2023

Running with release 0.6.1.

hitting assertion error:
AssertionError: The value updated is not the same shape as the original. Updated: (32000, 5120), original: (0, 5120)

Build command:
image

Callstack:
image

@byshiue
Copy link
Collaborator

byshiue commented Dec 16, 2023

It looks the vocab size does not be passed in model successfully, you could check the vocab size in build.py before passing in model.

Do you use the checkpoint we use in document?

@byshiue byshiue self-assigned this Dec 16, 2023
@byshiue byshiue added the triaged Issue has been triaged by maintainers label Dec 16, 2023
@manarshehadeh
Copy link
Author

Indeed, the vocab size is overridden by LoraConfig vocab size, value is 0 since the adapter config file doesn't contain a value for vocab size.
Can you give more clarity over what you mean with checkpoint in document?

@byshiue
Copy link
Collaborator

byshiue commented Dec 25, 2023

Indeed, the vocab size is overridden by LoraConfig vocab size, value is 0 since the adapter config file doesn't contain a value for vocab size. Can you give more clarity over what you mean with checkpoint in document?

I mentioned

https://huggingface.co/meta-llama/Llama-2-13b-hf
https://huggingface.co/hfl/chinese-llama-2-lora-13b

For different checkpoint, we don't verifiy and it might not work because they have different settings.

You could try removing

args.vocab_size = lora_config.vocab_size

in llama/build.py.

@kaiyux
Copy link
Member

kaiyux commented Dec 27, 2023

The issue should be fixed in the latest main branch, please see #754.

Closing. Please feel free to comment if you have any question, thanks!

@kaiyux kaiyux closed this as completed Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants