Skip to content

Engine Core

The forward pass end to end, loading weights from GGUF with mmap, and KV cache and sampling inside an engine.

0 of 3 complete

  1. ▶ Up next25 min+50 XPThe forward pass end to end: a Llama-style engine in 100 linesBuild the core of an inference engine in readable Python: token embedding, RMSNorm, rotary embeddings, grouped-query…
  2. Pro20 min+50 XPLoading weights: the GGUF file format and memory mappingHow a single-file model format is laid out (header, metadata, tensor table, aligned data), a runnable writer and…
  3. Pro16 min+50 XPKV cache layout and sampling inside an engineHow a real engine stores the KV cache (preallocated arrays, layout for sequential reads, slots per sequence), the…