* deprecate the prev fix * reword warning and update docs * reword warning * tests * dont bloat `get_text_config()`
This commit is contained in:
committed by
GitHub
parent
2b8a15cc3f
commit
47e5432805
@@ -344,7 +344,7 @@ class Gemma3Vision2TextModelTest(ModelTesterMixin, GenerationTesterMixin, unitte
|
||||
|
||||
def test_automodelforcausallm(self):
|
||||
"""
|
||||
Regression test for #36741 -- make sure `AutoModelForCausalLM` works with a Gemma3 config, i.e. that
|
||||
Regression test for #36741/#36917 -- make sure `AutoModelForCausalLM` works with a Gemma3 config, i.e. that
|
||||
`AutoModelForCausalLM.from_pretrained` pulls the text config before loading the model
|
||||
"""
|
||||
config = self.model_tester.get_config()
|
||||
@@ -352,7 +352,7 @@ class Gemma3Vision2TextModelTest(ModelTesterMixin, GenerationTesterMixin, unitte
|
||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||
model.save_pretrained(tmp_dir)
|
||||
for_causal_lm = AutoModelForCausalLM.from_pretrained(tmp_dir)
|
||||
self.assertIsInstance(for_causal_lm, Gemma3ForCausalLM)
|
||||
self.assertIsInstance(for_causal_lm, Gemma3ForConditionalGeneration)
|
||||
|
||||
|
||||
@slow
|
||||
|
||||
@@ -20,7 +20,7 @@ import unittest
|
||||
import requests
|
||||
|
||||
from transformers import PixtralProcessor
|
||||
from transformers.testing_utils import require_vision
|
||||
from transformers.testing_utils import require_read_token, require_vision
|
||||
from transformers.utils import is_torch_available, is_vision_available
|
||||
|
||||
from ...test_processing_common import ProcessorTesterMixin
|
||||
@@ -35,6 +35,7 @@ if is_vision_available():
|
||||
|
||||
|
||||
@require_vision
|
||||
@require_read_token
|
||||
class Mistral3ProcessorTest(ProcessorTesterMixin, unittest.TestCase):
|
||||
"""This tests Pixtral processor with the new `spatial_merge_size` argument in Mistral3."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user