Skip to content

Commit ab12851

Browse files
less tight atol
1 parent 17b8abe commit ab12851

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

week05_large_models/practice_part2.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,7 +2468,7 @@
24682468
" dist.barrier()\n",
24692469
" if i != rank: continue\n",
24702470
" print(f\"TParallel outputs ({rank=}):\", tp_output.data, flush=True)\n",
2471-
" assert torch.allclose(tp_output, ref_output, atol=1e-6), f\"output mismatch on {rank=}\"\n",
2471+
" assert torch.allclose(tp_output, ref_output, atol=1e-5), f\"output mismatch on {rank=}\"\n",
24722472
"\n",
24732473
" dist.barrier() # test 2: backward w.r.t. inputs\n",
24742474
" assert tp_input.grad is None\n",
@@ -2479,7 +2479,7 @@
24792479
" dist.barrier()\n",
24802480
" if i != rank: continue\n",
24812481
" print(f\"TParallel input grad ({rank=}):\", tp_input.grad.data, flush=True)\n",
2482-
" assert torch.allclose(tp_input.grad, ref_input_grad, atol=1e-6), f\"input_grad mismatch on {rank=}\"\n"
2482+
" assert torch.allclose(tp_input.grad, ref_input_grad, atol=1e-4), f\"input_grad mismatch on {rank=}\"\n"
24832483
],
24842484
"metadata": {
24852485
"id": "6SrcK3avd3GA"
@@ -3237,4 +3237,4 @@
32373237
}
32383238
}
32393239
]
3240-
}
3240+
}

0 commit comments

Comments
 (0)