Fix stop str merging (#225)
Co-authored-by: Enrique Shockwave <33002121+qeternity@users.noreply.github.com>
This commit is contained in:
@@ -583,6 +583,10 @@ class StreamExecutor:
|
||||
if self.chat_template.stop_str:
|
||||
if not clone:
|
||||
clone = self.default_sampling_para.clone()
|
||||
if clone.stop == ():
|
||||
clone.stop = []
|
||||
elif isinstance(clone.stop, str):
|
||||
clone.stop = [clone.stop]
|
||||
clone.stop += self.chat_template.stop_str
|
||||
|
||||
return clone or self.default_sampling_para
|
||||
|
||||
Reference in New Issue
Block a user