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

new model #66

Open
shunxing12345 opened this issue Apr 26, 2024 · 6 comments
Open

new model #66

shunxing12345 opened this issue Apr 26, 2024 · 6 comments

Comments

@shunxing12345
Copy link

shunxing12345 commented Apr 26, 2024

Hi i want to add a model that has a different architecture from the LLaMA model. BUT when I was trying
accelerate launch -m --mixed_precision=bf16 eagle.train.main --tmpdir [path of data]\ --cpdir [path of checkpoints] -- configpath [path of config file]
I got the following ERROR
image

@Liyuhui-12
Copy link
Collaborator

It seems that the name of the embedding in your model is not 'embed_tokens'. You can modify it to the name of the embedding layer in your model.

@shunxing12345
Copy link
Author

Thanks for your replay!
I got an other problem I am trying to train an LLM which structure differs from LLaMA and Mixtral, should I change the code of cnet.py? It seems based on LLaMA

@Liyuhui-12
Copy link
Collaborator

This is not necessary; EAGLE's structure is independent of the target model. You can use the same cnet.py, or you can try other structures as well.

@shunxing12345
Copy link
Author

Thanks!
I have a finetuned a 12B model, but I got the OOM ERROR in model, head, optimizer, train_loader, test_loader, scheduler = accelerator.prepare( model, head, optimizer, train_loader, test_loader, scheduler. I have 8 40G-A100.
image
this is my train_config
image
this is my config.json
image

@Liyuhui-12
Copy link
Collaborator

I noticed that your "n_layers" is set to 38, which makes your draft model very large. In EAGLE, the draft model consists of only one layer.

@shunxing12345
Copy link
Author

Hi, I have successfully trained an Auto-regression Head, but I encountered the following error during inference.
https://github.com/SafeAILab/EAGLE/blob/main/eagle/modeling_eagle.py#L957
image
and here is the size of Tensor
image

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