"server/text_generation_server/models/flash_gemma.py" did not exist on "e74bd41e0f279ab569cf6a65ac3e2cea50e80d39"
Unverified Commit c4e9ebe3 authored by Liangsheng Yin's avatar Liangsheng Yin Committed by GitHub
Browse files

Fix stop str merging (#225)


Co-authored-by: default avatarEnrique Shockwave <33002121+qeternity@users.noreply.github.com>
parent 3c2c5869
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment