Fix ignore_eos parameter when loading a chat template (#5264)

This commit is contained in:
Chang Su authored and GitHub committed 2025-04-15 17:09:45 -07:00
1 parent 8ec0bb7d55
commit 27a009bb00
2 files changed
+76 -1

No files matched your search

+2 -1
View File
@@ -995,7 +995,8 @@ def v1_chat_generate_request(
image_data = conv.image_data
audio_data = conv.audio_data
modalities = conv.modalities
stop = conv.stop_str or []
stop = conv.stop_str or [] if not request.ignore_eos else []
if request.stop:
if isinstance(request.stop, str):
stop.append(request.stop)