mirror of
https://github.com/karpathy/nanochat.git
synced 2026-04-04 06:35:23 +00:00
Update nanochat/gpt.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
3e184d343e
commit
5a3d8b6b5e
|
|
@ -41,7 +41,7 @@ def norm(x):
|
|||
else:
|
||||
# Manual RMS norm implementation
|
||||
variance = x.pow(2).mean(-1, keepdim=True)
|
||||
return x * torch.rsqrt(variance + 1e-5)
|
||||
return x * torch.rsqrt(variance + 1e-6)
|
||||
|
||||
|
||||
def apply_rotary_emb(x, cos, sin):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user