Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
101–110 of 240 posts
Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#102The Yannic kilcher review is quite good. https://youtu.be/iDulhoQ2pro I can't ELI5 but I can ELI-junior-dev. Tl;dw: Transformers work by basically being a differentiable lookup/hash table. First your input is tokenized and (N) tokens (this constitutes the attention frame) are encoded both based on token identity and position in the attention frame. Then there is an NxN matrix that is applied to your attention frame "…
I appreciate the explanation, but I don't know what junior-dev would understand most of this. I may be just a web developer, but I couldn't understand most of this. I'd still have to read for 30m to grok it all.
Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#103Earlier quoted context omitted.
What does it mean for a lookup/hash table to be differentiable?
I wanted to ask the same and especially I've always been wondering: How is the meaning of aforementioned 'differentiable' related to the same term in math?
You're rolling a ball down a plank of wood and you want it to roll off the plank and continue to a certain spot on the ground. You know that if the ball rolls past the target, you have to angle the ramp lower. If it fails to reach the target, you angle the ramp higher. If it goes past by a lot, you make a big change to the ramp angle. If it goes past by a little, you make a small change to the ramp angle. In this way your error tells you something about the adjustment you need to make to the system to produce the desired output.
Think of a function from the ramp angle (network weights) to how far the ball lands from the target (the error). The derivative of this function tells you what kind of change in angle results in what kind of change in the error, and you can use that to update the ramp until you hit the target. To say that the model is differentiable is to say that it's possible to infer from the error what kind of changes you need to make to the weights.
Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#104Has ELI5 lost its literal meaning? What five-year-old would understand anything in this thread?
An answer to OP's question targeted at a five year old level would likely be impossible given the subject matter, or else need to be so general and simplistic as to be useless on this forum of not actual five year olds.
Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#105Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#106Earlier quoted context omitted.
I appreciate the explanation, but I don't know what junior-dev would understand most of this. I may be just a web developer, but I couldn't understand most of this. I'd still have to read for 30m to grok it all.
Yeah sorry, it still requires math and probably some exposure to ML basics.
Differentiable relative to what? What is (x) in the d(hashtable)/d(x) equation?
Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#107Okay, here's my attempt! First, we take a sequence of words and represent it as a grid of numbers: each column of the grid is a separate word, and each row of the grid is a measurement of some property of that word. Words with similar meanings are likely to have similar numerical values on a row-by-row basis. (During the training process, we create a dictionary of all possible words, with a column of numbers for each…
Reminded me of the style of a book on machine learning. If anyone liked this explanation, you may appreciate this book:
https://www.amazon.com/Applied-Machine-Learning-Engineers-Al...
Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#108The "Attention is All You Need" paper introduced a new way for AI to read and understand language, much like how we might read a comic book. As you read each panel of a comic book, you don't just look at the words in the speech bubbles, but you also pay attention to who's talking, what they're doing, and what happened in the previous panels. You might pay more attention to some parts than others. This is sort of like…
The Transformer is unique because it uses a mechanism called "attention" to understand the relationships between words in a sentence, which works like this:
(1) Encoding: First, the Transformer turns each word in a sentence into a list of numbers, called a vector. These vectors capture information about the word's meaning.
(2) Self-Attention: Next, for each word, the Transformer calculates a score for every other word in the sentence. These scores determine how much each word should contribute to the understanding of the current word. This is the "attention" part. For example, in the sentence "The cat, which is black, sat on the mat," the words "cat" and "black" would get high scores when trying to understand the word "black" because they are closely related.
(3) Aggregation: The Transformer then combines the vectors of all the words, weighted by their attention scores, to create a new vector for each word. This new vector captures both the meaning of the word itself and the context provided by the other words in the sentence.
(4) Decoding: Finally, in a task like translation, the Transformer uses the vectors from the encoding phase to generate a sentence in the target language. It again uses attention to decide which words in the original sentence are most relevant for each word it's trying to generate in the new sentence.
One key advantage of the Transformer is that it can calculate the attention scores for all pairs of words at the same time, rather than one at a time like previous models. This allows it to process sentences more quickly, which is important for large tasks like translating a whole book.
Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#109Re: Ask HN: Can someone ELI5 transformers and the “Attention is all we need” paper?
#110Cosma Shalizi explains it very well. "Again: Calling this "attention" at best a joke." http://bactra.org/notebooks/nn-attention-and-transformers.ht...
Anyway just curious do you or someone else have more sources in this format?
At least this way it is very helpfull to think about the methods. Kind of agree that the formular does look very very similar to well known methods. But on the other hand, the author doesn't explain the transformers in a similar simple way since it is not obvious why you could stack kernels and get better results.