[MPT] Add require_bitsandbytes on MPT integration tests (#25201)
* add `require_bitsandbytes` on MPT integration tests * add it on mpt as well
This commit is contained in:
@@ -29,7 +29,7 @@ from transformers import (
|
||||
InstructBlipQFormerConfig,
|
||||
InstructBlipVisionConfig,
|
||||
)
|
||||
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
|
||||
from transformers.testing_utils import require_bitsandbytes, require_torch, require_vision, slow, torch_device
|
||||
from transformers.utils import is_torch_available, is_vision_available
|
||||
|
||||
from ...test_configuration_common import ConfigTester
|
||||
@@ -521,6 +521,7 @@ def prepare_img():
|
||||
@require_torch
|
||||
@slow
|
||||
class InstructBlipModelIntegrationTest(unittest.TestCase):
|
||||
@require_bitsandbytes
|
||||
def test_inference_vicuna_7b(self):
|
||||
processor = InstructBlipProcessor.from_pretrained("Salesforce/instructblip-vicuna-7b")
|
||||
model = InstructBlipForConditionalGeneration.from_pretrained(
|
||||
|
||||
@@ -18,7 +18,7 @@ import math
|
||||
import unittest
|
||||
|
||||
from transformers import MptConfig, is_torch_available
|
||||
from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device
|
||||
from transformers.testing_utils import require_bitsandbytes, require_torch, require_torch_gpu, slow, torch_device
|
||||
|
||||
from ...generation.test_utils import GenerationTesterMixin
|
||||
from ...test_configuration_common import ConfigTester
|
||||
@@ -430,6 +430,7 @@ class MptModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin,
|
||||
|
||||
@slow
|
||||
@require_torch_gpu
|
||||
@require_bitsandbytes
|
||||
class MptIntegrationTests(unittest.TestCase):
|
||||
def test_generation_8k(self):
|
||||
model_id = "mosaicml/mpt-7b-8k"
|
||||
|
||||
Reference in New Issue
Block a user