diff --git a/tests/generation/test_utils.py b/tests/generation/test_utils.py index f3bffd612a602e..594fea7c838aa0 100644 --- a/tests/generation/test_utils.py +++ b/tests/generation/test_utils.py @@ -1908,7 +1908,9 @@ def test_new_cache_format(self, num_beams, do_sample): new_cache = new_results.past_key_values if cache_cls == DynamicSlidingWindowCache: - legacy_cache_converted = cache_cls.from_legacy_cache(config.sliding_window, legacy_results.past_key_values) + legacy_cache_converted = cache_cls.from_legacy_cache( + config.sliding_window, legacy_results.past_key_values + ) else: legacy_cache_converted = cache_cls.from_legacy_cache(legacy_results.past_key_values) for layer_idx in range(len(new_cache)):