@@ -118,18 +118,18 @@ def run_fixed_result_test(dtype: str = "bf16"):
118118 result = run_with_config (args )
119119 if dtype == "bf16" :
120120 expected = {
121- "losses" : [3.670125722885132 , 3.3384485244750977 , 3.4418509006500244 , 3.4138522148132324 , 3.1852667331695557 , 3.5810048580169678 , 3.304007053375244 , 3.140747547149658 , 3.319587230682373 , 3.1411728858947754 , 2.9216670989990234 ],
122- "norms" : [7.173885822296143 , 6.099787712097168 , 5.92285680770874 , 5.786434173583984 , 6.188075065612793 , 6.776442050933838 , 5.836976051330566 , 5.686100006103516 , 5.794816017150879 , 4.879967212677002 ]
121+ "losses" : [3.6712355613708496 , 3.3381927013397217 , 3.4416379928588867 , 3.414004325866699 , 3.184972047805786 , 3.5811686515808105 , 3.303946018218994 , 3.1412110328674316 , 3.3189358711242676 , 3.1411116123199463 , 2.9200551509857178 ],
122+ "norms" : [7.183468818664551 , 6.108993053436279 , 5.932713031768799 , 5.761547565460205 , 6.189230918884277 , 6.775102138519287 , 5.833801746368408 , 5.700308799743652 , 5.810333728790283 , 4.892214298248291 ],
123123 }
124124 elif dtype == "e4m3" :
125125 expected = {
126- "losses" : [3.686978340148926 , 3.3502297401428223 , 3.4575212001800537 , 3.427245616912842 , 3.1958014965057373 , 3.5915656089782715 , 3.313652992248535 , 3.153571844100952 , 3.3288373947143555 , 3.1525251865386963 , 2.9305672645568848 ],
127- "norms" : [7.286402225494385 , 6.2125244140625 , 6.137560844421387 , 6.056655406951904 , 6.297369480133057 , 6.75091028213501 , 5.901176929473877 , 5.787357807159424 , 5.7028913497924805 , 4.845463275909424 ],
126+ "losses" : [3.6887805461883545 , 3.3520102500915527 , 3.457583427429199 , 3.4244065284729004 , 3.193877696990967 , 3.5914981365203857 , 3.3114070892333984 , 3.153069019317627 , 3.327822208404541 , 3.1491622924804688 , 2.9285335540771484 ],
127+ "norms" : [7.288778305053711 , 6.2950029373168945 , 6.045900344848633 , 6.014016628265381 , 6.236341953277588 , 6.587290287017822 , 5.900122165679932 , 5.704860687255859 , 5.526883602142334 , 4.838467597961426 ],
128128 }
129129 elif dtype == "e5m2" :
130130 expected = {
131- "losses" : [3.686978340148926 , 3.351814031600952 , 3.4565091133117676 , 3.425589084625244 , 3.1968445777893066 , 3.590729236602783 , 3.313720464706421 , 3.153860092163086 , 3.3271536827087402 , 3.148764133453369 , 2.933894157409668 ],
132- "norms" : [7.204282283782959 , 6.170459747314453 , 6.08181095123291 , 5.9630818367004395 , 6.187112331390381 , 6.670724391937256 , 5.848072528839111 , 5.714643478393555 , 5.590309143066406 , 4.849413871765137 ],
131+ "losses" : [3.6887805461883545 , 3.352607488632202 , 3.4565486907958984 , 3.4266669750213623 , 3.1923203468322754 , 3.5887439250946045 , 3.309535026550293 , 3.1504156589508057 , 3.329827070236206 , 3.1509664058685303 , 2.938549041748047 ],
132+ "norms" : [7.224483489990234 , 6.2642621994018555 , 6.038032054901123 , 5.886837482452393 , 6.202877521514893 , 6.511382579803467 , 5.829803466796875 , 5.652224540710449 , 5.565894603729248 , 4.865762710571289 ],
133133 }
134134 else :
135135 raise ValueError (f"Unknown dtype: { dtype } " )
0 commit comments