Make more test models smaller (#25005)

* Make more test models tiny

* Make more test models tiny

* More models

* More models
This commit is contained in:
Sylvain Gugger
2023-07-24 10:08:47 -04:00
committed by GitHub
parent 8f1f0bf50f
commit 42571f6eb8
22 changed files with 149 additions and 137 deletions

View File

@@ -67,10 +67,10 @@ class LevitModelTester:
stride=2,
padding=1,
patch_size=16,
hidden_sizes=[128, 256, 384],
num_attention_heads=[4, 6, 8],
hidden_sizes=[16, 32, 48],
num_attention_heads=[1, 2, 3],
depths=[2, 3, 4],
key_dim=[16, 16, 16],
key_dim=[8, 8, 8],
drop_path_rate=0,
mlp_ratio=[2, 2, 2],
attention_ratio=[2, 2, 2],
@@ -282,10 +282,6 @@ class LevitModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
check_hidden_states_output(inputs_dict, config, model_class)
@unittest.skip("Will be fixed soon by reducing the size of the model used for common tests.")
def test_model_is_small(self):
pass
def _prepare_for_class(self, inputs_dict, model_class, return_labels=False):
inputs_dict = super()._prepare_for_class(inputs_dict, model_class, return_labels=return_labels)