Fix the chat template for QWen (#83)

This commit is contained in:
Lianmin Zheng
2024-01-22 21:46:47 -08:00
committed by GitHub
parent 94e05770db
commit 959c4174b2
2 changed files with 10 additions and 2 deletions

View File

@@ -486,6 +486,12 @@ class StreamExecutor:
if clone is None:
clone = self.default_sampling_para.clone()
setattr(clone, item, value)
if self.chat_template.stop_str:
if not clone:
clone = self.default_sampling_para.clone()
clone.stop += self.chat_template.stop_str
return clone or self.default_sampling_para
def __del__(self):