From a11041ffad285b13d578127cc304b90c2f12ce1f Mon Sep 17 00:00:00 2001 From: Mohamed Mekkouri <93391238+MekkCyber@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:47:05 +0100 Subject: [PATCH] Fix : add require_read_token for gemma2 gated model (#35687) fix gemma2 gated model test --- tests/quantization/ggml/test_ggml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/quantization/ggml/test_ggml.py b/tests/quantization/ggml/test_ggml.py index 0b70b4c3d8..1cd9c2d4a8 100644 --- a/tests/quantization/ggml/test_ggml.py +++ b/tests/quantization/ggml/test_ggml.py @@ -18,6 +18,7 @@ import unittest from transformers import AddedToken, AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoTokenizer from transformers.testing_utils import ( require_gguf, + require_read_token, require_torch_gpu, slow, torch_device, @@ -880,6 +881,7 @@ class GgufIntegrationTests(unittest.TestCase): EXPECTED_TEXT = "Hello! 👋\n\nI'm a large language model" self.assertEqual(tokenizer.decode(out[0], skip_special_tokens=True), EXPECTED_TEXT) + @require_read_token def test_gemma2_weights_conversion_fp32(self): original_model = AutoModelForCausalLM.from_pretrained( self.original_gemma2_model_id,