[Use cache] Align logic of use_cache with output_attentions and output_hidden_states (#5194)
* fix use cache * add bart use cache * fix bart * finish bart
This commit is contained in:
committed by
GitHub
parent
64c393ee74
commit
c2a26ec8a6
@@ -126,6 +126,7 @@ class TFModelTesterMixin:
|
||||
if "T5" in main_layer_class.__name__:
|
||||
# Take the same values than in TFT5ModelTester for this shared layer
|
||||
shared = TFSharedEmbeddings(99, 32, name="shared")
|
||||
config.use_cache = False
|
||||
main_layer = main_layer_class(config, embed_tokens=shared)
|
||||
else:
|
||||
main_layer = main_layer_class(config)
|
||||
|
||||
Reference in New Issue
Block a user