Embeddings: local vs hosted
Notebook· 06.04· 120–150 min· Lesson 49 of 129
The notebook opens in your lab, in a new tab. If your server is stopped, it starts first (a few seconds).
By the end you can
- Explain what an embedding is and why cosine similarity finds related text.
- Run a real embedding model locally and free (fastembed
BAAI/bge-small-en-v1.5), with an offline fallback. - Measure embedding models on a labelled set (recall@k, MRR) instead of trusting leaderboards.
- Cache embeddings so re-running a notebook costs nothing (Jupyter skill).
- Compare local options (fastembed, Ollama, sentence-transformers) with paid APIs on cost, speed, privacy and setup.
Before you start
Lessons 06.02–06.03; Lesson 03.04 (HashingEmbeddings).
Python in this lesson
Python guideNew heremath
