petals
petals copied to clipboard
Enhance Speculative Generation with Better Type Hints and Cleaner Code
This PR improves the speculative generation code by adding more explicit type hints, especially for the streamer parameter. Additionally, the code has been refactored for better readability and maintainability. These changes aim to make the code more understandable and slightly more performant without altering the core functionality.