We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb340ba commit 3b4dc8cCopy full SHA for 3b4dc8c
1 file changed
optimum/habana/transformers/generation/utils.py
@@ -1062,9 +1062,10 @@ def generate(
1062
)
1063
if model_kwargs["reduce_recompile"]:
1064
assert generation_config.bucket_size
1065
- # Below condition checked explicitly since llama supports bucket_internal even without reuse_cache
+ # Below condition checked explicitly since some models (like llama and gpt_bigcode) support bucket_internal even without reuse_cache
1066
if generation_config.bucket_internal:
1067
assert generation_config.bucket_size >= 0, "please set bucket_size to use bucket_internal"
1068
+ assert generation_config.use_cache, "please set use_cache flag to use bucket_internal"
1069
if generation_config.reuse_cache:
1070
assert (
1071
self.config.model_type
0 commit comments