Skip to content

Commit d3db6cb

Browse files
authored
add a test to track phi3 (#183)
1 parent cc36c9c commit d3db6cb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

_unittests/ut_torch_models/test_validate_models.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,27 @@ def test_validate_microsoft_phi4_reasoning(self):
3333
self.assertLess(summary["disc_onnx_ort_run_abs"], 1e-5)
3434
self.assertIn("onnx_filename", data)
3535

36+
@requires_transformers("4.52")
37+
@requires_torch("2.7.99")
38+
@requires_experimental()
39+
@hide_stdout()
40+
def test_validate_microsoft_phi3_mini_128k(self):
41+
# python -m onnx_diagnostic validate -m microsoft/Phi-3-mini-128k-instruct
42+
# --run -v 1 --export custom -o dump_test --no-quiet --device cuda --patch
43+
summary, data = validate_model(
44+
"microsoft/Phi-3-mini-128k-instruct",
45+
do_run=True,
46+
verbose=2,
47+
exporter="custom",
48+
do_same=True,
49+
patch=True,
50+
rewrite=True,
51+
stop_if_static=2 if pv.Version(torch.__version__) > pv.Version("2.6.1") else 0,
52+
dump_folder="dump_test/validate_microsoft_phi3_mini_128k",
53+
)
54+
self.assertLess(summary["disc_onnx_ort_run_abs"], 1e-5)
55+
self.assertIn("onnx_filename", data)
56+
3657

3758
if __name__ == "__main__":
3859
unittest.main(verbosity=2)

0 commit comments

Comments
 (0)