SafeAILab / EAGLE

Official Implementation of EAGLE

Home Page:https://arxiv.org/abs/2401.15077

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About project structure

zsnoob opened this issue · comments

Thank you for your work! Regarding the project structure, I would like to know the design purposes of the modeling_eagle and ea_model source files? It appears that both describe the structure of the original model and a single decoder layer. Perhaps modeling_eagle is specifically designed for inference using a custom model?

Perhaps modeling_eagle is specifically designed for inference using a custom model?

Yes, modeling_eagle can be used to accelerate any model in the transformers library. To use modeling_eagle, you need to slightly modify the code (pre-allocated KV cache and tree mask, refer to modeling_llama_kv.py and modeling_Mixtral_kv.py for examples).