EAGLE icon indicating copy to clipboard operation
EAGLE copied to clipboard

Is the forward related to gen_ea_alpha_llama2chat.py fully implemented?

Open YunSeoHwan opened this issue 1 year ago • 3 comments

Hi, thanks for your great work!

I am trying to calculate the acceptance length and acceptance rate. So, I ran evaluation/gen_ea_alpha_llama2chat.py. However, an error occurred in the forward process of model/ea_model.py. Currently, the returned variables are outputs, orig, and hidden_states, but utils_alpha.py's initialize_tree requires 5 variables: tree_logits, output, logits, hidden_state, and sample_token. Is that part still not fully implemented? Then, how can I obtain tree_logits?

YunSeoHwan avatar Sep 27 '24 08:09 YunSeoHwan

I encountered the same issue here. Specifically, there are two points of confusion for me:

1.As YunSeoHwan mentioned, the function “initialize_tree” in utils_alpha.py returns 5 arguments, whereas the “forward” function in ea_model.py outputs only 3 arguments.

2.I noticed that the authors removed the “logits_processor” argument from the “forward” function in ea_model.py in the EAGLE-2 version, compared to the code branch of EAGLE-1. Could the authors please explain why this argument was deleted? I see that “logits_processor” is still being passed into the function call in evaluation/gen_ea_alpha_vicuna.py.

zhangtia16 avatar Sep 28 '24 17:09 zhangtia16

EAGLE-2 is model-agnostic, so you can use the v1 branch to measure the acceptance rate.

Liyuhui-12 avatar Oct 01 '24 12:10 Liyuhui-12

EAGLE-2 is model-agnostic, so you can use the v1 branch to measure the acceptance rate.

Thank you! I referred to the Eagle 1 structure and returned the acceptance length in JSON format. However, I'm recording a lower acceptance length compared to the paper.

Could there be something I might have missed?

YunSeoHwan avatar Oct 04 '24 05:10 YunSeoHwan