Build your own learning platform with agents.
Latent is an opinionated open-source framework for courses, browser IDE lessons, flash cards, and programming practice. Use the LLM systems curriculum as a complete reference implementation, or start with portable lessons and cards you can host anywhere.
The reference implementation goes deep.
A paper can explain one mechanism clearly while leaving the surrounding system implicit. These lessons begin with recurrence, tokenization, attention, and causal masking, then continue into prefill and decoding, KV-cache accounting, continuous batching, SSE framing, cancellation, retries, and conversation state. Each example is small enough to inspect and run in a browser.
Text moves left to right. The lower rail shows state that is loaded, reused, or persisted rather than streamed with each token.
- 01Model
Text becomes tokens, then model state.
- 02Runtime
Prefill, cache, scheduling, and decode.
- 03Product
Events become a responsive conversation.
Follow the generation request, step by step8 stages · 4 boundaries
- Browser input
- Inference runtime
- Streaming transport
- Application
- Browser inputPrompt + messages
UTF-8 text→ - Browser inputTokenizer
text → token IDs→ - Inference runtimeScheduler
admit · batch · cancel→ - Inference runtimePrefill
prompt → K,V→ - Inference runtimeDecode loop
logits → next token→ - Streaming transportSSE stream
typed token events→ - ApplicationReact reducer
events → chat state→ - ApplicationBrowser Chat
rendered response
used by prefill + decodeK,V reused at every decode steplesson files · tests · BrowserChat.tsxIndexedDB drafts · checkpointsThe implementation accumulates.
Each lesson adds a tested file to the same project. The tests isolate the idea under study; the capstone connects browser versions of those pieces into a local chatbot. This is not a production-scale model or serving stack. It is a compact implementation for studying where the boundaries are and how data moves across them.
See how the five course files come together
├──models/character-rnn.py├──systems/inference-runtime.py├──backend/streaming-transport.py├──product/chat-reducer.py└──capstone/BrowserChat.tsx