We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 147aa97 commit 2e45186Copy full SHA for 2e45186
swift/llm/utils.py
@@ -310,7 +310,9 @@ def update_generation_config_eos_token(generation_config, template):
310
return
311
stop_words = template.template_meta.stop_words
312
eos_token_id = generation_config.eos_token_id
313
- if isinstance(eos_token_id, int):
+ if eos_token_id is None:
314
+ eos_token_id = []
315
+ elif isinstance(eos_token_id, int):
316
eos_token_id = [eos_token_id]
317
modified = False
318
for stop_word in stop_words:
0 commit comments