Update tiny models and a few fixes (#22928)

* run_check_tiny_models

* update summary

* update mixin

* update pipeline_model_mapping

* update pipeline_model_mapping

* Update for gpt_bigcode

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2023-04-24 14:45:22 +02:00
committed by GitHub
parent 2fbd6df81c
commit 975159bb61
9 changed files with 116 additions and 16 deletions

View File

@@ -407,7 +407,7 @@ class GPTBigCodeModelTester:
@require_torch
class GPTBigCodeMQAModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin, unittest.TestCase):
class GPTBigCodeModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin, unittest.TestCase):
# TODO: Update the tests to use valid pretrained models.
all_model_classes = (
(
@@ -420,11 +420,6 @@ class GPTBigCodeMQAModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe
else ()
)
all_generative_model_classes = (GPTBigCodeForCausalLM,) if is_torch_available() else ()
fx_compatible = False
test_missing_keys = False
test_pruning = False
test_torchscript = False
multi_query = True
pipeline_model_mapping = (
{
"feature-extraction": GPTBigCodeModel,
@@ -436,6 +431,11 @@ class GPTBigCodeMQAModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe
if is_torch_available()
else {}
)
fx_compatible = False
test_missing_keys = False
test_pruning = False
test_torchscript = False
multi_query = True
# special case for DoubleHeads model
def _prepare_for_class(self, inputs_dict, model_class, return_labels=False):
@@ -521,7 +521,7 @@ class GPTBigCodeMQAModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTe
@require_torch
class GPTBigCodeMHAModelTest(GPTBigCodeMQAModelTest):
class GPTBigCodeMHAModelTest(GPTBigCodeModelTest):
# `parameterized_class` breaks with mixins, so we use inheritance instead
multi_query = False