@@ -439,6 +439,7 @@ def test_inference_no_attention(self):
439439 "Paddleformers/tiny-random-llama3" ,
440440 download_hub = "aistudio" ,
441441 convert_from_hf = True ,
442+ dtype = "float32" ,
442443 )
443444 model .eval ()
444445 input_ids = paddle .to_tensor ([[0 , 345 , 232 , 328 , 740 , 140 , 1695 , 69 , 6078 , 1588 , 2 ]])
@@ -452,9 +453,9 @@ def test_inference_no_attention(self):
452453 expected_slice = paddle .to_tensor (
453454 [
454455 [
455- [0.02366970 , - 0.42482421 , 0.47202760 ],
456- [- 0.12180223 , 0.00559035 , 0.83846688 ],
457- [0.45073321 , 0.25703996 , 1.36826384 ],
456+ [0.01802453 , - 0.42128855 , 0.45844582 ],
457+ [- 0.12787277 , 0.00660499 , 0.83033413 ],
458+ [0.44403678 , 0.26123494 , 1.36080980 ],
458459 ]
459460 ],
460461 dtype = output .dtype ,
@@ -467,6 +468,7 @@ def test_inference_with_attention(self):
467468 "Paddleformers/tiny-random-llama3" ,
468469 download_hub = "aistudio" ,
469470 convert_from_hf = True ,
471+ dtype = "float32" ,
470472 )
471473 model .eval ()
472474 input_ids = paddle .to_tensor ([[0 , 345 , 232 , 328 , 740 , 140 , 1695 , 69 , 6078 , 1588 , 2 ]])
@@ -479,9 +481,9 @@ def test_inference_with_attention(self):
479481 expected_slice = paddle .to_tensor (
480482 [
481483 [
482- [0.02366970 , - 0.42482421 , 0.47202760 ],
483- [- 0.12180223 , 0.00559035 , 0.83846688 ],
484- [0.45073321 , 0.25703996 , 1.36826384 ],
484+ [0.01802453 , - 0.42128855 , 0.45844582 ],
485+ [- 0.12787277 , 0.00660499 , 0.83033413 ],
486+ [0.44403678 , 0.26123494 , 1.36080980 ],
485487 ]
486488 ],
487489 dtype = output .dtype ,
0 commit comments