@@ -43,7 +43,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
4343
4444
4545@pytest .mark .cpu
46- @pytest .mark .skipif (not MIN_TORCH_2_1 )
46+ @pytest .mark .skipif (not MIN_TORCH_2_1 , reason = "requires PyTorch 2.1+" )
4747def test_to_low_precision_default_preserves_embedding_and_rope_buffers ():
4848 model = TinyLM ()
4949 to_low_precision (model , dtype = torch .bfloat16 )
@@ -63,7 +63,7 @@ def test_to_low_precision_default_preserves_embedding_and_rope_buffers():
6363
6464
6565@pytest .mark .cpu
66- @pytest .mark .skipif (not MIN_TORCH_2_1 )
66+ @pytest .mark .skipif (not MIN_TORCH_2_1 , reason = "requires PyTorch 2.1+" )
6767def test_to_low_precision_custom_fp32_modules_only_layernorm ():
6868 model = TinyLM ()
6969 # Only keep LayerNorm in FP32; embeddings should be cast to low precision now
@@ -80,7 +80,7 @@ def test_to_low_precision_custom_fp32_modules_only_layernorm():
8080
8181
8282@pytest .mark .cpu
83- @pytest .mark .skipif (not MIN_TORCH_2_1 )
83+ @pytest .mark .skipif (not MIN_TORCH_2_1 , reason = "requires PyTorch 2.1+" )
8484def test_to_low_precision_disable_rope_keywords_casts_rope_buffers ():
8585 model = TinyLM ()
8686 # Disable RoPE keyword preservation; buffers should be cast
@@ -94,7 +94,7 @@ def test_to_low_precision_disable_rope_keywords_casts_rope_buffers():
9494
9595
9696@pytest .mark .cpu
97- @pytest .mark .skipif (not MIN_TORCH_2_1 )
97+ @pytest .mark .skipif (not MIN_TORCH_2_1 , reason = "requires PyTorch 2.1+" )
9898def test_to_low_precision_fp32_buffers_accepts_module_types ():
9999 model = TinyLM ()
100100
0 commit comments