AI Anatomy Class · Part 1 · AI speaks in numbers
7. Vectors: rows of numbers
Q. Can you put into numbers how similar your taste in food is to a friend's?
- Let's write taste as numbers: how much you like spicy food, from 0 to 10, and sweet food, also from 0 to 10.
- Mia: spicy 8, sweet 3. We write it in parentheses as (8, 3). Numbers bundled in order like this are called a vector.
- A vector can be drawn as an arrow. Across is spicy, up is sweet. The arrow from the origin to (8, 3) is Mia's taste.
- Noah is (2, 9) and Emma is (7, 4). Just from the arrows' directions, you can see whose tastes are alike.
- More slots give more detail. Add salty and sour and you get a vector of 4 numbers. The number of slots is the dimension.
- GPT represents each word as a very long vector: GPT-3 uses 12,288 numbers per word. You can't draw it, but the idea is the same.
- A vector is a row of numbers with meaning. In the next chapter, we measure how close two vectors are.
Chapter summary
- Vector: numbers bundled in order. Each slot has a meaning.
- A 2-slot vector can be drawn as an arrow on a plane.
- Number of slots = dimension. GPT-3's word vectors have 12,288 dimensions.