Breno

Attention mechanism has details, intricacies with math and coding

So, that is the main aspect, it is complicated no sentido de ter muitos detalhes, it is not something really simple. Perhaps, porque foi o que me ajudou, seria importante considerar divisão das etapas. Sure, the concept is one, the layer is one, the attention layer, but, it would be important to consider really the steps in the attention and one particular image really helped me with the implementation.

Like, textos não conseguem explicar se eles apenas pensam em etapas do mecanismo e explicam como se o negócio estivesse compreendido e o conceito fosse compreendido.

Consideremos a primeira parte desse mecanismo.

Chega um conjunto residual, que são os tokens, e já trabalhemos com os batches porque são o modo real que tem que entender. So, just that já possui intricacies.

O residual tensor primeiro vai se relacionar com três tensors com dot product e depois soma com os bias.

São os pesos W_K, W_Q, W_V. Man, o residual dot product com os pesos irão resultar nos keys, queries and values, respectively. Like, this is the first important aspect porque o modo que podem se realizar cada dot product is not like that simple como se aprende em relação a uma matriz de duas dimensões, like, just that, the abstraction consider que pode se considerar outras dimensões e isso precisa ser considerado no coding e observei isso porque tentei implementar como pensei.

Man, this is truly important, just try como pensou, como entendeu ou mesmo com dúvida, just try because then you can fail and learn. E mesmo quando você sabe, um detalhe pode não ter sido compreendido então you learn. That was a great process for learning.

So, that is the first attention step. Obter os keys, queries and values. Man, and just focus on this, like, the mechanism. Pode ser legal entender o que significa, but, you can just focus on learning the mechanism, porque o significado pode aprender de modo simples, just read, but the mechanism with the intricacies precisa ser compreendido. E, observe, this is just the first step.

Really great learning.