Remove head mask in generative models (#35786)

* just squash into one commit

* delete print
This commit is contained in:
Raushan Turganbay
2025-05-15 10:44:19 +02:00
committed by GitHub
parent 0173a99e73
commit 955e61b0da
47 changed files with 103 additions and 294 deletions

View File

@@ -1444,6 +1444,7 @@ class ModelTesterMixin:
inputs_dict["output_attentions"] = True
config.output_hidden_states = True
configs_no_init = _config_zero_init(config) # To be sure we have no Nan
configs_no_init._attn_implementation = "eager" # head mask works only in eager mode and will be removed soon
for model_class in self.all_model_classes:
model = model_class(config=configs_no_init)
model.to(torch_device)