Generate: skip left-padding tests on old models (#23437)

This commit is contained in:
Joao Gante
2023-05-18 11:04:51 +01:00
committed by GitHub
parent a8732e09bb
commit aea7b23b57
16 changed files with 65 additions and 3 deletions

View File

@@ -1597,9 +1597,7 @@ class GenerationTesterMixin:
attn_weights = out[attn_name] if attn_name == attention_names[0] else out[attn_name][-1]
self.assertEqual(sum([w.sum().item() for w in attn_weights]), 0.0)
# TODO (joao): this test is actually not slow :) However, it is not passing in some models (e.g. GPTNeoX) and the
# fix for some models is quite lengthy. Being slow means it doesn't block our push CI while we fix it.
@slow
@slow # TODO (Joao): fix GPTBigCode
def test_left_padding_compatibility(self):
# The check done in this test is fairly difficult -- depending on the model architecture, passing the right
# position index for the position embeddings can still result in a different output, due to numerical masking.