From 72489fe46f4dedbb730dd358ec0ed9d0e82905bb Mon Sep 17 00:00:00 2001 From: Gaurav Sarkar <60139335+Gaurav7888@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:57:26 +0530 Subject: [PATCH] Update optimum/habana/transformers/models/mt5/modeling_mt5.py Co-authored-by: Yaser Afshar --- optimum/habana/transformers/models/mt5/modeling_mt5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimum/habana/transformers/models/mt5/modeling_mt5.py b/optimum/habana/transformers/models/mt5/modeling_mt5.py index 421ce57f97..40c92c0814 100644 --- a/optimum/habana/transformers/models/mt5/modeling_mt5.py +++ b/optimum/habana/transformers/models/mt5/modeling_mt5.py @@ -388,7 +388,7 @@ def gaudi_MT5Stack_forward( else: mask_seq_length = past_key_values[0][0].shape[2] + seq_length if past_key_values is not None else seq_length - if use_cache is True: + if use_cache: if not self.is_decoder: raise ValueError(f"`use_cache` can only be set to `True` if {self} is used as a decoder")