Time to Say Goodbye, torch 1.7 and 1.8 (#22291)
* time to say goodbye, torch 1.7 and 1.8 * clean up torch_int_div * clean up is_torch_less_than_1_8-9 * update --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -38,10 +38,9 @@ if is_torch_available():
|
||||
BloomModel,
|
||||
BloomTokenizerFast,
|
||||
)
|
||||
from transformers.pytorch_utils import is_torch_greater_or_equal_than_1_10, is_torch_less_than_1_9
|
||||
from transformers.pytorch_utils import is_torch_greater_or_equal_than_1_10
|
||||
else:
|
||||
is_torch_greater_or_equal_than_1_10 = False
|
||||
is_torch_less_than_1_9 = True
|
||||
|
||||
|
||||
@require_torch
|
||||
@@ -751,9 +750,6 @@ class BloomEmbeddingTest(unittest.TestCase):
|
||||
self.assertAlmostEqual(EMBEDDINGS_DS_AFTER_LN[key][idx], output_dict_norm[key][idx], places=1)
|
||||
|
||||
@require_torch
|
||||
@unittest.skipIf(
|
||||
is_torch_less_than_1_9, reason="Test failed with torch < 1.9 (`min_cuda` not implemented for `BFloat16`)"
|
||||
)
|
||||
def test_hidden_states_transformers(self):
|
||||
cuda_available = torch.cuda.is_available()
|
||||
model = BloomModel.from_pretrained(self.path_bigscience_model, use_cache=False, torch_dtype="auto").to(
|
||||
|
||||
Reference in New Issue
Block a user