-
Notifications
You must be signed in to change notification settings - Fork 193
Description
Hi, thank you for the great work on this project.
I was reviewing the Model class in model/cnets.py and noticed that d2t and t2d are declared within the class. Since EAGLE-3 appears to use its own lm_head for the draft model—rather than sharing the target model's lm_head—I assume there's an intended mapping process from the draft vocab indices to the target vocab indices.
self.lm_head=nn.Linear(config.hidden_size,config.draft_vocab_size,bias=False)
d2t=torch.zeros((config.draft_vocab_size),dtype=torch.long)
t2d=torch.zeros((config.vocab_size),dtype=torch.bool)
However, when I debugged using the official checkpoint, I found that all values in the d2t tensor are initialized to 0. This makes it unclear how the draft tokens are correctly mapped to the target model's vocabulary space during inference.
ss_token.append(topk_index + self.d2t[topk_index])
input_ids = topk_index + self.d2t[topk_index]
Could you clarify how the d2t and t2d mappings are supposed to be constructed or loaded? Any explanation or pointer would be greatly appreciated.
Thanks again for your work and support!