Embeddings

Wiki chapters and blog posts about Embeddings.

Wiki

RAG in Practice: Chunking, Hybrid Retrieval, Reranking and Evaluation

How to build a retrieval-augmented generation system that works: clean and chunk documents, combine dense and BM25 retrieval with RRF, rerank with a cross-encoder, assemble the context, and measure every step with Hit@k and MRR on a small runnable corpus.

Intermediate 42 min read

Tokenizers and Embeddings: BPE, Vocabulary Size and the Embedding Table

An LLM only processes integers: a tokenizer splits text into tokens with a subword algorithm such as BPE and maps them to ids, then each id is looked up in a vocabulary-size by hidden-size embedding table. Vocabulary size trades off sequence length, parameters and long-tail coverage.

Beginner 33 min read

World models and planning: from prediction to closed-loop control

A world model predicts how actions change state. A planner compares candidate sequences and corrects its plan with observations. This tutorial explains latent dynamics and verifies replanning after a map error with a grid simulator.

Intermediate 11 min read

Multimodal LLMs: How an Image Becomes Tokens

A vision-language model cuts an image into patches, turns them into visual tokens with a vision encoder and a projector, and feeds them to a language model. Measured here are CLIP's contrastive loss, LLaVA's two training stages, token and KV cache costs, and how resolution affects small text.

Intermediate 42 min read

Blog posts

Topics