flâneur — a map of the web's best reading

“Soft” Dictionary Keys

teltam.github.io · 1,436 words · saved by 1 readers

Transformer Neural Networks utilize the key-concept of an Attention Mechanism to perform “lookups” on the data it has seen. In this post I want to detail the idea of “soft” keys, and for me it was easier to get to the crux of how Transformers work with this understanding. I first came across this idea from a Lucas Beyer talk. Most programming languages implement a dictionary (or associative map) as a primitive data structure and define them as associations between the abstract idea of keys and values. In python keys are defined as any hashable object. For example, Here, we have four keys, "dog", "cat", "tiger", 8 and they are mapped to values. The first three keys are Strings and the fourth key is a Number (integer in this case). All the values here are Numbers as well. Internally, python calls the in-built hash method to hash the keys into a well-known or fixed representation, The key point here is that keys are converted into a well-defined representation. In the case of python the r

“Soft” Dictionary Keys Transformer Neural Networks utilize the key-concept of an Attention Mechanism to perform “lookups” on the data it has seen. In this post I want to detail the idea of “soft” keys, and for me it was easier to get to the crux of how Transformers work with this understanding. I first came across this idea from a Lucas Beyer talk . Python Dictionaries Most programming languages implement a dictionary (or associative map) as a primitive data structure and define them as associations between the abstract idea of keys and values. In python keys are defined as any hashable object

Explore this link on the map →

saved by

related reading