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

How many decoder layer needs to add in EAGLE? #46

Closed
yjdy opened this issue Feb 29, 2024 · 5 comments
Closed

How many decoder layer needs to add in EAGLE? #46

yjdy opened this issue Feb 29, 2024 · 5 comments

Comments

@yjdy
Copy link

yjdy commented Feb 29, 2024

Thanks for the great work. I find a different between code and paper

In the paper, it say eagle trains a decoder layer.
In the code, cnet.py class Model (https://github.com/SafeAILab/EAGLE/blob/main/model/cnets.py#L491)

self.layers = nn.ModuleList([LlamaDecoderLayer(config, index) for index in range(config.num_hidden_layers)])

It needs to add a decoder layer for every hidden layer.

Please tell me which one is correct.

Best regards

@cyLi-Tiger
Copy link
Contributor

This config is not the config file in your llm directory, check the config.json in your ea_model_path, config.num_hidden_layers should be 1.

@yjdy
Copy link
Author

yjdy commented Mar 1, 2024

Thanks for the response.
If I need to train eagle on different LLM, I think I should prepare different config file.
I just need to copy the config from the LLM I want to train on and change the num_hidden_layers to 1, right?

@cyLi-Tiger
Copy link
Contributor

Not 100% sure, you better check the code in train/main.py

@Liyuhui-12
Copy link
Collaborator

If I need to train eagle on different LLM, I think I should prepare different config file. I just need to copy the config from the LLM I want to train on and change the num_hidden_layers to 1, right?

You are right.

@Liyuhui-12
Copy link
Collaborator

I find a different between code and paper.

Thank you for your interest. As @cyLi-Tiger mentioned, the configuration of EAGLE is different from the base LLM.

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

4 participants