EAGLE icon indicating copy to clipboard operation
EAGLE copied to clipboard

How to train eagle3 and support qwen2

Open skylee-01 opened this issue 7 months ago • 7 comments

How can we train eagle3 and support qwen2? We want to implement it in our business, but we didn't find any code for training eagle3 in the project.

skylee-01 avatar May 13 '25 08:05 skylee-01

The cnets.py file here caters to eagle3 model training and cnets1.py for eagle1/2 model training. We can adjust our scripts accordingly.

ravi03071991 avatar May 13 '25 14:05 ravi03071991

The cnets.py file here caters to eagle3 model training and cnets1.py for eagle1/2 model training. We can adjust our scripts accordingly.

How to adapt the Qwen2 model? I didn't find the script for training Qwen2.

skylee-01 avatar May 13 '25 15:05 skylee-01

The cnets.py file here caters to eagle3 model training and cnets1.py for eagle1/2 model training. We can adjust our scripts accordingly.

How to adapt the Qwen2 model? I didn't find the script for training Qwen2.

Yeah, so I think you need to change some parts of the cnets.py / cnets1.py file to adapt to Qwen2 by taking a closer look at the qwen2 modeling file.

ravi03071991 avatar May 13 '25 16:05 ravi03071991

The cnets.py file here caters to eagle3 model training and cnets1.py for eagle1/2 model training. We can adjust our scripts accordingly.

How to adapt the Qwen2 model? I didn't find the script for training Qwen2.

Yeah, so I think you need to change some parts of the cnets.py / cnets1.py file to adapt to Qwen2 by taking a closer look at the qwen2 modeling file.

Thank you for your reply

skylee-01 avatar May 14 '25 02:05 skylee-01

The cnets.py file here caters to eagle3 model training and cnets1.py for eagle1/2 model training. We can adjust our scripts accordingly.

If I want to train egale2 model for qwen2.5-7b-instruct, should I modify the cnets1.py or not ? I think that cnets1.py already supports qwen2 models beacause we can inference with the author provided eagle2 of qwen2-7b-instruct.

cailinhang avatar May 16 '25 06:05 cailinhang

The cnets.py file here caters to eagle3 model training and cnets1.py for eagle1/2 model training. We can adjust our scripts accordingly.

If I want to train egale2 model for qwen2.5-7b-instruct, should I modify the cnets1.py or not ? I think that cnets1.py already supports qwen2 models beacause we can inference with the author provided eagle2 of qwen2-7b-instruct.

I guess the author only open-sourced the inference part, not the training part.

skylee-01 avatar May 17 '25 00:05 skylee-01

I think the training file is the same for both Eagle2 and Eagle3. The model file differs withcnets1.py for Eagle2 and cnets.py for Eagle3.

ravi03071991 avatar May 20 '25 13:05 ravi03071991

hey @skylee-01 , I wonder have you successfully trained the qwen2 model with EAGLE3, cause I'm also planning doing the same thing.

lahmuller avatar May 28 '25 06:05 lahmuller

hey @skylee-01 , I wonder have you successfully trained the qwen2 model with EAGLE3, cause I'm also planning doing the same thing.

Good luck to you

skylee-01 avatar May 28 '25 06:05 skylee-01

hey @skylee-01 , I wonder have you successfully trained the qwen2 model with EAGLE3, cause I'm also planning doing the same thing.

Good luck to you OK, I'll try

lahmuller avatar May 29 '25 03:05 lahmuller

Image

garycaokai avatar Jun 03 '25 08:06 garycaokai

The training code has been released.

hongyanz avatar Jun 13 '25 04:06 hongyanz

The training code has been released.

@hongyanz Can you help update the cnets.py code to make it compatible with the Qwen model?

liuqianchao avatar Jun 23 '25 04:06 liuqianchao