Patch fix - don't use safetensors for TF models (#30118)

* Patch fix - don't use safetensors for TF models

* Skip test for TF for now

* Update for another test
This commit is contained in:
amyeroberts
2024-04-08 13:29:20 +01:00
committed by GitHub
parent f5658732d5
commit 7f9aff910b
3 changed files with 6 additions and 5 deletions

View File

@@ -194,7 +194,7 @@ class TFGenerationIntegrationTests(unittest.TestCase, GenerationIntegrationTests
tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-random-gpt2")
text = """Hello, my dog is cute and"""
tokens = tokenizer(text, return_tensors="tf")
model = TFAutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-gpt2")
model = TFAutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-gpt2", use_safetensors=False)
eos_token_id = 638
# forces the generation to happen on CPU, to avoid GPU-related quirks