Skip to content

The System You Will Build

One system, named by you (ol course init --name <system>), grown in passes. This page is the map: what the components are, which language each is in, and the contracts they meet at. Every contract is a file in course/contracts/, vendored into your repo’s contracts/ and pinned by contracts/VERSION.

ComponentLangYour pathWhat it doesModule
optional C exercisesCc/src/, c/Makefilestandalone kernels and data structures, checked by C test binaries and shared fixturesrt.01, M03.1, ds.01 to ds.04
tinyllmPythonpython/tinyllm/the byte bigram fitted by counting, safetensors v0, tokenizer files, the tinyllm CLIL0.0
tl-serveRustrust/crates/a Candle engine streaming SSE completions from safetensors checkpoints; one OTLP span per requestL10.0
gatewayGogo/gateway/proxy/, go/cmd/gatewayAPI-key check, SSE pass-through without buffering, traceparent and X-Request-Idgw.00, obs.00
deployDocker, Helm, kinddeploy/engine and gateway images, two charts, a kind cluster with NodePorts 30080 and 30686, Jaegerdep.00
docsMarkdowndocs/ADR-0001, the engine-crashloop runbook, postmortemscraft.02, ops.00
CIGitHub Actions.github/workflows/ci.yml, .githooks/commit lint, native tests, ol check --all --cicraft.01
manifestTOMLsystem.tomlhow the harness builds and runs your entry pointsevery milestone
flowchart LR
  U["curl / OpenAI SDK"] -- "HTTP + key (openai-subset v0)" --> GW["gateway (Go)"]
  GW -- "HTTP SSE + traceparent" --> EN["tl-serve (Rust)"]
  PY["tinyllm CLI (Python)"] -- "model.safetensors + config.json" --> EN
  PY -- "tokenizer.json + fixtures" --> EN
  GW -- "OTLP/HTTP JSON" --> J["Jaeger"]
  EN -- "OTLP/HTTP JSON" --> J

Python and Rust exchange data through files: safetensors checkpoints, tokenizer.json, and shared fixtures. No language boundary uses FFI.

ContractFileUsed from
C exercise contractsc/include/tinyllm.h, tinyllm/abi.h, tinyllm/matmul.h, rules in c/ABI.mdoptional standalone C modules, each checked by its own C test binary
C test kitc/include/ol_test.hthe C course tests
Python interfacespy/tinyllm/ (lm/bigram.pyi, io/safetensors.pyi)L0.0
HTTP API v0openapi/openai-subset.v0.yamlL10.0 (engine tier), gw.00 (gateway tier), ol conform openapi:v0
Checkpointformats/safetensors.md, formats/config.schema.jsonL0.0 writes, L10.0 reads
Tokenizerformats/tokenizer.md (the bytes tokenizer)L0.0, L10.0
Entry pointsspec/cli-roles.mdevery milestone step
Harness manifestconfig/system.schema.jsonsystem.toml
Decision recordtemplates/ADR.mdcraft.02

After every pass your own system runs end to end and ol milestone MS-P<n> passes against your code. Later modules either upgrade a component behind an unchanged contract (the bigram retrained by your autograd in Pass 2 still serves through the same checkpoint and the same engine) or change a contract through an explicit migration chapter. Each pass gate reruns the smoke steps of every earlier gate, so a regression anywhere fails the next gate.

ContractHow it grows
the model behind the checkpointcount bigram (P1), autograd bigram (P2), the transformer family (P5), the Llama family served by the engine (P7 on)
standalone C kernelsoptional exercises, checked against fixture files produced by Python references
HTTP openai-subsetv0 completions with SSE (P1), v1 with chat, usage, and tools (P7), v2 migration (P11)
gatewayproxy (P1), auth, limits, routing, cache, ledger (P7), usage policy (P10)
deploytwo charts and Jaeger (P1), per-role charts and the observability stack (P7), durable workers (P8)