[FEAT][TRAINING] Add fine-tuning support for EAGLE3 from HF Hub#268
[FEAT][TRAINING] Add fine-tuning support for EAGLE3 from HF Hub#268VincentG1234 wants to merge 13 commits intovllm-project:mainfrom
Conversation
ae09b3b to
a36d8e9
Compare
|
Hi @VincentG1234, this is great, thank you for working on this (and opening the related issue)! My main feedback at this stage is that it would be good to move the loading logic + t2d/d2t extraction logic into utility functions inside the speculators package. We actually have some similar code for loading from hf/local safetensor files already in src/speculators/utils/loading.py, so maybe this could be consolidated with what you've added (although our existing loading utils are mostly targeted at more focused on extracting a single tensor, like the lm head or token embedding). Additionally, we will want at least one test that loads an existing checkpoint from HF before merging. Let me know if I can help! |
dsikka
left a comment
There was a problem hiding this comment.
Thank you for your contribution! Just out of curiosity, how much data was needed to fine tune to the llama3 draft model?
I haven't conducted a full fine-tuning yet. My aim is to enhance the model in French while maintaining performance in English. I will share my results!
Thank you for the feedback! I'll fix this very soon. |
|
This pull request has merge conflicts that must be resolved before it can be |
82ee844 to
4c5de19
Compare
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
4c5de19 to
f09a235
Compare
|
Hello guys @dsikka @fynnsu, just to keep you in touch. I come with good news:
have a nice week end |
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
Summary
Adds support for fine-tuning EAGLE3 models from pretrained checkpoints, enabling users to initialize training from existing models stored locally or on HuggingFace Hub.
Changes
--pretrained-model-pathCLI argument toscripts/train.pyload_safetensors_state_dict()function supporting:d2t/t2dvocab mappings from pretrained modelsdraft_vocab_sizefrom loaded mappingsUsage
Fine-tune from HuggingFace Hub:
python scripts/train.py
--verifier-name-or-path meta-llama/Llama-3.1-8B-Instruct
--pretrained-model-path RedHatAI/Llama-3.1-8B-Instruct-speculator.eagle3
--data-path ./new_data
--epochs 3
--lr 5e-5