[template] update template decode_generate_ids#9523
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces calls to self.template.decode with self.template.decode_generate_ids across multiple inference engines (GRPO vLLM, LMDeploy, SGLang, Transformers, vLLM, and utility functions). However, a critical issue was identified: the decode_generate_ids method is not defined in the base Template class, which will cause an AttributeError at runtime. It appears that the corresponding changes to swift/template/base.py were accidentally omitted from this pull request.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request renames the decode method to decode_generate_ids across various inference engines and template implementations to clarify its purpose. The reviewer points out that this is a breaking change for external users who have subclassed Template and overridden decode. To maintain backward compatibility, the reviewer suggests keeping decode as a deprecated alias and routing calls gracefully, providing a detailed code implementation to achieve this.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.