nanoGPT icon indicating copy to clipboard operation
nanoGPT copied to clipboard

Where are the correspondent codes to the alpha, beta, miu and sigma?

Open fishfree opened this issue 1 year ago • 1 comments

As you can see here. image

fishfree avatar Jan 06 '24 01:01 fishfree

Those are parameters of Layernorm.

https://github.com/karpathy/nanoGPT/blob/eba36e84649f3c6d840a93092cb779a260544d08/model.py#L18C1-L27C84

For a better understanding see: https://pytorch.org/docs/stable/generated/torch.nn.LayerNorm.html and more indepth https://arxiv.org/abs/1607.06450

floriankark avatar Mar 21 '24 10:03 floriankark