[Bugfix] fix decode oom with EAGLE#14645
[Bugfix] fix decode oom with EAGLE#14645alphabetc1 wants to merge 2 commits intosgl-project:mainfrom
Conversation
ROOT CAUSE ==== The original implementation only checked memory usage in the decode stage and ignored EAGLE’s draft and verify stages. SOLUTION ==== Calculate the memory requirements for all stages in check_decode_mem().
Summary of ChangesHello @alphabetc1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an Out-Of-Memory (OOM) issue encountered when utilizing the EAGLE speculative decoding algorithm. The root cause was an incomplete memory check that only considered the final decode stage, neglecting the memory footprint of EAGLE's intermediate draft and verification processes. The solution involves enhancing the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a potential out-of-memory issue with EAGLE speculative decoding by correctly accounting for the memory required during the draft and verify stages. The change is implemented in check_decode_mem by adding the calculated memory needs for these stages to the total token count. The logic is clear, correct, and directly solves the described problem. The implementation is solid, and I have no further suggestions.
|
This is due to we forget to pass the |
fix #13741
ROOT CAUSE
The original implementation only checked memory usage in the decode stage and ignored EAGLE’s draft and verify stages.
SOLUTION
Calculate the memory requirements for all stages in check_decode_mem().
Motivation
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist