File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,16 @@ def print_prime(n):
128128 self .assertEqual (len (ids ["input_ids" ].shape ), len (actual_ids .shape ))
129129 np .testing .assert_array_equal (ids ["input_ids" ], actual_ids )
130130
131+ def test_microsoft_phi4 (self ):
132+ tokenizer = AutoTokenizer .from_pretrained (
133+ "microsoft/phi-4-mini-instruct" , torch_dtype = "auto" ,use_fast = False )
134+ code = 'This is a sample Code'
135+
136+ ids = tokenizer (code , return_tensors = "np" )
137+ ort_tok , _ = gen_processing_models (tokenizer , pre_kwargs = {})
138+ actual_ids , * _ = ort_inference (ort_tok , [code ])
139+ self .assertEqual (len (ids ["input_ids" ].shape ), len (actual_ids .shape ))
140+ np .testing .assert_array_equal (ids ["input_ids" ], actual_ids )
131141
132142if __name__ == '__main__' :
133143 unittest .main ()
You can’t perform that action at this time.
0 commit comments