Skip to content

Commit

Permalink
Modify test file
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAbeyta authored and AdrianAbeyta committed Nov 8, 2023
1 parent 6a1a7d5 commit 4702912
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion examples/pytorch/language-modeling/run_clm.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version("4.35.0.dev0")
print("Modify file test for CI")

require_version("datasets>=1.8.0", "To fix: pip install -r examples/pytorch/language-modeling/requirements.txt")

Expand Down
6 changes: 3 additions & 3 deletions tests/models/ibert/test_modeling_ibert.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def test_int_gelu(self):
gelu_q = IntGELU(quant_mode=True)
gelu_dq = nn.GELU()

x_int = torch.range(-10000, 10000, 1)
x_int = torch.arange(-10000, 10001, 1)
x_scaling_factor = torch.tensor(0.001)
x = x_int * x_scaling_factor

Expand All @@ -534,7 +534,7 @@ def test_int_gelu(self):
self.assertTrue(torch.allclose(q_int, q_int.round(), atol=1e-4))

def test_force_dequant_gelu(self):
x_int = torch.range(-10000, 10000, 1)
x_int = torch.arange(-10000, 10001, 1)
x_scaling_factor = torch.tensor(0.001)
x = x_int * x_scaling_factor

Expand Down Expand Up @@ -565,7 +565,7 @@ def test_int_softmax(self):
softmax_q = IntSoftmax(output_bit, quant_mode=True)
softmax_dq = nn.Softmax()

# x_int = torch.range(-10000, 10000, 1)

def _test(array):
x_int = torch.tensor(array)
x_scaling_factor = torch.tensor(0.1)
Expand Down

0 comments on commit 4702912

Please sign in to comment.