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

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

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)