@@ -357,9 +357,6 @@ def test_quantization():
357357 assert_close (v , sd2 [k ])
358358
359359
360- @pytest .mark .skip (
361- reason = "incompatible with transformers >= 4.55.4, see https://github.com/Lightning-AI/lightning-thunder/issues/2726"
362- )
363360@thunder .tests .framework .requiresCUDA
364361def test_thunderfx_mistral_nemo_small ():
365362 """
@@ -402,7 +399,11 @@ def test_thunderfx_mistral_nemo_small():
402399 input_ids = torch .randint (0 , config .vocab_size , iid_size , device = device )
403400 attention_mask = torch .ones_like (input_ids )
404401
405- output = mdl (input_ids = input_ids , attention_mask = attention_mask , labels = input_ids )
402+ with warnings .catch_warnings ():
403+ warnings .filterwarnings (
404+ "ignore" , category = FutureWarning , message = r".*`isinstance\(treespec, LeafSpec\)` is deprecated.*"
405+ )
406+ output = mdl (input_ids = input_ids , attention_mask = attention_mask , labels = input_ids )
406407 logits = output .logits
407408 grad_logits = torch .randn_like (logits )
408409 logits .backward (grad_logits )
@@ -424,9 +425,6 @@ def qwen2():
424425 return [(phi3 ), (qwen2 )]
425426
426427
427- @pytest .mark .skip (
428- reason = "incompatible with transformers >= 4.55.4, see https://github.com/Lightning-AI/lightning-thunder/issues/2726"
429- )
430428@thunder .tests .framework .requiresCUDA
431429@pytest .mark .parametrize ("model_fn" , _get_model_config_pairs ())
432430def test_hf_for_nemo (model_fn ):
@@ -460,7 +458,11 @@ def test_hf_for_nemo(model_fn):
460458 ref_output = model (input_ids = input_ids , labels = input_ids )
461459 ref_loss = ref_output .loss
462460
463- compiled_output = compiled_model (input_ids = input_ids , labels = input_ids )
461+ with warnings .catch_warnings ():
462+ warnings .filterwarnings (
463+ "ignore" , category = FutureWarning , message = r".*`isinstance\(treespec, LeafSpec\)` is deprecated.*"
464+ )
465+ compiled_output = compiled_model (input_ids = input_ids , labels = input_ids )
464466 compiled_loss = compiled_output .loss
465467
466468 # Less strict tolerance probably due to different type promotion order for bfloat16
@@ -523,6 +525,7 @@ def test_hf_for_nemo(model_fn):
523525@requiresCUDA
524526@pytest .mark .skip (
525527 reason = "incompatible with transformers >= 4.55.4, see https://github.com/Lightning-AI/lightning-thunder/issues/2726"
528+ "Error Message: 'DynamicCache' object has no attribute 'get_usable_length'. Did you mean: 'get_seq_length'?"
526529)
527530@requiresDeviceMemory (required_memory_bytes = int (0.7 * 1024 * 1024 * 1024 ))
528531@pytest .mark .parametrize (
0 commit comments