From a9a5f4b4dfa3fee3fcaaafff7ea99d84ad93b2b2 Mon Sep 17 00:00:00 2001 From: RudrenduPaul Date: Thu, 16 Jul 2026 22:25:19 -0700 Subject: [PATCH] Fix typo: stop_sequence -> stop_sequences in _continuous_greedy_until The Doc/request object exposes stop_sequences (plural), so split[0].stop_sequence raised an AttributeError when continuous batching generation tried to read stop tokens. Fixes #888 --- src/lighteval/models/transformers/transformers_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lighteval/models/transformers/transformers_model.py b/src/lighteval/models/transformers/transformers_model.py index 64e790a2f..5b0daa3c2 100644 --- a/src/lighteval/models/transformers/transformers_model.py +++ b/src/lighteval/models/transformers/transformers_model.py @@ -558,7 +558,7 @@ def _continuous_greedy_until( # NOTE: we are assuming all items in a batch behave similarly (same # stop_tokens and max_tokens genrated) which is not necessarily # the case! Because of that we only use batch size of 1 - stop_tokens = split[0].stop_sequence + stop_tokens = split[0].stop_sequences max_new_tokens = self.config.generation_parameters.max_new_tokens or split[0].generation_size returns_logits = split[0].use_logits