Course Overview
Large Language Models & Generative AITokenization, Context Windows & High-Dimensional Embeddings
0% Done
Written Guide20 minutes
Tokenization, Context Windows & High-Dimensional Embeddings
Lesson Summary: Byte-Pair Encoding (BPE), SentencePiece, vector representations, and semantic distance metrics.
Vector Embeddings & Semantic Cosine Distance Lab
LLMs & RAGLesson / Article LabCompute dot product similarity scores, normalize high-dimensional vectors, and rank semantic text chunks.
Subword Tokenizer & Normalized Dense Embeddings
Pyodide Wasm
Interactive Challenge: Modify code inputs, click Run Code to execute live in WebAssembly.
Wasm Terminal Output
Click Run Code to execute this algorithm in the browser sandbox.
Language models do not read text directly—they process discrete numerical identifiers called tokens. In this lesson, we trace how strings convert into token embeddings in high-dimensional vector spaces (e.g. 1536 dimensions for OpenAI text-embedding-3-small).
Cosine Similarity
To measure semantic similarity between two normalized embeddings and :
