SafeAILab / EAGLE

Official Implementation of EAGLE-1 and EAGLE-2

Home Page:https://arxiv.org/pdf/2406.16858

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About tree_buffer

reflectionie opened this issue · comments

Hi, thank you for your wonderful work! I would like to ask, why are there two tree_buffers in eagle? One comes from cnets here:

self.tree_buffer=generate_tree_buffers(self.tree,"cpu")
, and the other comes from EaModel:
tree_choices, device=self.base_model.model.layers[-1].self_attn.q_proj.weight.device
. In my test, the tree_indices of these two tree_buffers are different. Why is this? Looking forward to your reply!

I think I understand, one is for the original model and the other is for the auto-reg head; I closed this issue.

I think I understand, one is for the original model and the other is for the auto-reg head; I closed this issue.

Hello, I have the same question about two tree_buffer. May I get some help from you?

  1. What's the difference between the two tree_buffer?
  2. I can understand the tree_buffer in utils.py, but I can't understand the tree_buffer in utils_c.py. How does the tree construct?

(By the way, the code lacks necessary comments and is really difficult to understand.)