Generate: support for left-padding on GPTNeoX and Llama (#22382)

This commit is contained in:
Joao Gante
2023-03-27 15:48:23 +01:00
committed by GitHub
parent 5506d04969
commit 7dcd8703ef
4 changed files with 108 additions and 124 deletions

View File

@@ -237,7 +237,7 @@ class GPTNeoXModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMi
@require_torch
class GPTNeoXLanguageGenerationTest(unittest.TestCase):
@slow
def test_lm_generate_codegen(self):
def test_lm_generate_gptneox(self):
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-410m-deduped")
for checkpointing in [True, False]:
model = GPTNeoXForCausalLM.from_pretrained("EleutherAI/pythia-410m-deduped")