QwenLM / Qwen2.5-Coder

Qwen2.5-Coder is the code version of Qwen2.5, the large language model series developed by Qwen team, Alibaba Cloud.
821 stars 74 forks source link

如何实现行级代码补全? #86

Closed zhengshengh closed 2 months ago

zhengshengh commented 2 months ago

image

如上图所示,更希望CodeQwen只返回一行代码,而不是突破当前函数体。 经过翻阅文档,CodeQwen似乎没有提供“行级/块级”的参数。 请问有其他办法实现行级补全吗? 不胜感激!

cyente commented 2 months ago

you can limit the tokens of \n or " \n" during generation, and add the '\n' at the suffix part

zhengshengh commented 2 months ago

you can limit the tokens of \n or " \n" during generation, and add the '\n' at the suffix part

你好,请问有没有更加智能的做法? 如果每次都通过判断尾部的"\n"来实现,那不是等于抛弃了多行补全么?