Module 1: Tokenization & Vector Embeddings
Welcome to Module 1: Tokenization & Vector Embeddings. In this module, we explore how neural networks convert human text, code, and natural language instructions into high-dimensional geometric vectors that preserve deep semantic relationships.
Concepts in this Module
- Concept 01: Byte-Pair Encoding (BPE) & Vocabulary Lookups
- The Everyday Problem: How does a language model break arbitrary words, typos, and robot commands into subword chunks that map to integer IDs in a fixed vocabulary?
- Code & Math: Subword frequency merging, vocabulary lookup tables, and token integer representations.
- Concept 02: High-Dimensional Semantic Vectors & Cosine Distance
- The Everyday Problem: How do we represent words as geometric coordinate points in space such that related concepts cluster together and analogies can be calculated with vector math?
- Code & Math: Dense embedding vectors, dot product projections, and cosine semantic similarity
cos(θ) = (u · v) / (|u| · |v|).