Skip to content

Commit cb24a5b

Browse files
committed
file
1 parent 4c65175 commit cb24a5b

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

_unittests/ut_torch_models/test_validate_whole_models.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ def test_validate_phi35_mini_instruct(self):
270270
inputs2=True,
271271
patch=True,
272272
rewrite=True,
273-
# model_options={"rope_scaling": {"rope_type": "dynamic", "factor": 10.0}},
274273
)
275274
self.assertIsInstance(summary, dict)
276275
self.assertIsInstance(data, dict)
@@ -279,6 +278,29 @@ def test_validate_phi35_mini_instruct(self):
279278
op_types = set(n.op_type for n in onx.graph.node)
280279
self.assertIn("If", op_types)
281280

281+
@requires_torch("2.7")
282+
@hide_stdout()
283+
@ignore_warnings(FutureWarning)
284+
@requires_transformers("4.51")
285+
def test_validate_phi35_4k_mini_instruct(self):
286+
mid = "microsoft/Phi-3.5-mini-4k-instruct"
287+
summary, data = validate_model(
288+
mid,
289+
do_run=True,
290+
verbose=10,
291+
exporter="custom",
292+
dump_folder="dump_test/validate_phi35_mini_instruct",
293+
inputs2=True,
294+
patch=True,
295+
rewrite=True,
296+
model_options={"rope_scaling": {"rope_type": "dynamic", "factor": 10.0}},
297+
)
298+
self.assertIsInstance(summary, dict)
299+
self.assertIsInstance(data, dict)
300+
onnx_filename = data["onnx_filename"]
301+
onx = onnx.load(onnx_filename)
302+
op_types = set(n.op_type for n in onx.graph.node)
303+
self.assertIn("If", op_types)
282304

283305
if __name__ == "__main__":
284306
unittest.main(verbosity=2)

0 commit comments

Comments
 (0)