Replies: 2 comments 1 reply
|
Was wondering the same. |
|
Disclaimer this is GPT Sol's answer, but I was also curious about the reasoning: The lineage appears to be: modded-nanogpt adapted this into token-indexed lookup tables. The December 4, 2024 record by KoszarskyB added separate nn.Embedding tables, looked up by token ID, and mixed those vectors directly into attention’s V stream. The code explicitly comments that this was inspired by Grad62304977’s value-residual implementation. https://github.com/KellerJordan/modded-nanogpt/blob/master/records/track_1_short/2024-12-04_ValueEmbed/train_gpt2.py#L1644-L1668. In other words: nanochat inherited the modded-nanogpt version. Karpathy’s discussion says the winning ideas—including value embeddings—originated in modded-nanogpt. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The paper (Zhou et al., "Value Residual Learning") is about reusing the first layer's value projections in later layers - a skip connection over the residual stream. That's meaningfully different from what ended up in the code: a learned embedding table indexed by token ID, injected into attention values at each layer.
Where did the embedding idea come from? A paper, a tweet, a Discord discussion? I think directly it probably came from the modded-nanogpt repo? But not really having much luck in understanding how it came to be there?
All reactions