-
Notifications
You must be signed in to change notification settings - Fork 110
feat: support fix speculative rating for performance debug. #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ae045a4 to
52d737a
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a RejectionSamplerRateController to allow fixing the speculative acceptance rate for performance debugging, controlled via an environment variable. The implementation adds a complex controller with PID logic and various heuristics. While the feature appears to be implemented as intended, the new controller class has significant code quality issues, primarily due to a large number of "magic numbers" that make the code difficult to understand, maintain, and tune. My review focuses on improving maintainability and robustness by suggesting the use of named constants and safer coding practices.
52d737a to
02b034f
Compare
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a feature for performance debugging of speculative decoding by allowing a fixed acceptance rate to be set via an environment variable. This is implemented through a new RejectionSamplerRateController class that is used by the RejectionSampler. The changes are well-structured, introducing a new utility function to parse environment variables and integrating the new controller cleanly. My review focuses on improving maintainability by replacing magic numbers with their corresponding named constants that are already defined in the header file.
02b034f to
6015a03
Compare
No description provided.