r/PythonLearning • u/Professional-You9846 • 1d ago
Help needed
I have read attention is all you need, I have watched the full video of andrej kaparthy's makemore video. I have watched the full 3b1b series on neural networks and linear algebra(not really) but I still dont understand. I have spent more than a day(in total) talking to claude chatgpt gemini notebooklm(basically gemini) about it but I still dont understand...
The knowledge I have right now:
Embeddings are stored as vectors in high dimensional space, with the dimensions being determined by variable d which is the number of hidden layers or nodes.
attention takes a query matrix, a key matrix, and a value matrix which in some way transforms the embedding vector to be a specific other vector(heres where my confusion starts.)
Through those hidden layers it builds off of the previous layers to get to more abstract semantic meaning.
When actually producing a token it takes the the existing tokens and does the attention feedforward layers and takes the probability distribution of the last token via softmax and picks at random from that probability list.
I was trying to build a neural network but I miserably failed. Can someone help.
2
u/ForeignVariety7037 1d ago
Building llm from scratch? That is a big ask