Add torch >=1.12 requirement for Tapas (#24251)
* fix * fix * fix * Update src/transformers/models/tapas/modeling_tapas.py Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com> * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com> Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,9 @@ if is_torch_available():
|
||||
GPTBigCodeModel,
|
||||
)
|
||||
from transformers.models.gpt_bigcode.modeling_gpt_bigcode import GPTBigCodeAttention
|
||||
from transformers.pytorch_utils import is_torch_greater_or_equal_than_1_12
|
||||
else:
|
||||
is_torch_greater_or_equal_than_1_12 = False
|
||||
|
||||
|
||||
class GPTBigCodeModelTester:
|
||||
@@ -530,6 +533,10 @@ class GPTBigCodeMHAModelTest(GPTBigCodeModelTest):
|
||||
multi_query = False
|
||||
|
||||
|
||||
@unittest.skipIf(
|
||||
not is_torch_greater_or_equal_than_1_12,
|
||||
reason="`GPTBigCode` checkpoints use `PytorchGELUTanh` which requires `torch>=1.12.0`.",
|
||||
)
|
||||
@slow
|
||||
@require_torch
|
||||
class GPTBigCodeModelLanguageGenerationTest(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user