graykode / graykode/gpt-2-Pytorch

GPT-2 implementation problem

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1k
Forks
230
PR merge metrics
No merged PRs in 30d

Description

"Hi, I am reading the GPT-2 paper and encountering a problem with the following phrase related to implementation:

'A modified initialization method is used to account for the accumulation on the residual path with model depth. We scale the weights of residual layers at initialization by a factor of 1/√N, where N is the number of residual layers.'

My problem is that we normalize after accumulation (addition then normalization). So, why do we need to scale weights? Aren't we doing this to reduce the impact of accumulation?"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.