[Feature] minicpm eagle support - #18943
Conversation
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com>
|
It looks like there are some duplicate modules, can you import them directly from |
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com>
Fixed. Now we only keep the diffferent classes in |
| hidden_states=hidden_states, | ||
| ) | ||
| hidden_states = residual + hidden_states * \ | ||
| (self.config.scale_depth / math.sqrt(self.config.mup_denominator)) |
There was a problem hiding this comment.
QQ: Where is mup_denominator defined? I can't seem to find it on HF Hub
There was a problem hiding this comment.
We are planning to support eagle speculative decoding in our next release. This hyperparameter will be added to the config in the next version of our model. Currently, since HF model config also supports plugging in new fields by **kwargs, so simply putting this into config.json would be working.
There was a problem hiding this comment.
I see, thanks for the explanation! Should be good to go then.
|
Can you add this model to |
|
Otherwise I think the CI may fail |
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com>
Sure, added. |
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com>
|
Thanks for your patience! |
|
Thank you! |
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com> Co-authored-by: huangyuxiang03 <huangyx0321@gmail.com> Signed-off-by: amit <amit.man@gmail.com>
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com> Co-authored-by: huangyuxiang03 <huangyx0321@gmail.com> Signed-off-by: amit <amit.man@gmail.com>
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com> Co-authored-by: huangyuxiang03 <huangyx0321@gmail.com>
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com> Co-authored-by: huangyuxiang03 <huangyx0321@gmail.com>
Signed-off-by: huangyuxiang03 <huangyx0321@gmail.com> Co-authored-by: huangyuxiang03 <huangyx0321@gmail.com>
I'm adding the support of running eagle speculative decoding on MiniCPM series. A new model file
minicpm_eagle.pyis added, as the eagle head of MiniCPM has a distinct architecture compared with vanilla eagle head. We also adapt theregister.pyto make sure theEagleMiniCPMcan be used. We slightly modify theminicpm.py(moving the scaling factor from LM head to the last hidden state), which does not affect the usage of existing minicpm models.I'm submitting this PR on behalf of ModelBest.Inc, the producer of MiniCPM series. We have conducted abundant tests to make sure the modification does not affect other parts of vLLM.