Skip to content

Quick start

Requires uv and Python 3.12. You need a corpus — the repositories does not ship one; docs/guides/data.md has the two the numbers were taken on, the smallest honest recipe for building your own, and what the eval carve must look like. Each headline figure’s command, log and commit is in docs/guides/reproduce.md.

Terminal window
uv sync # CPU environment; tests run here
uv sync --extra gpu # the measured stack: torch 2.13.0+cu129 + FLA (sm_120)
uv run pytest # the suite (968 tests; CUDA gates self-skip)
uv run ruff check . # lint
# train a model from a byte corpus
uv run dormouse train medium --data corpus.bin --eval held.bin \
--device cuda --steps 60000 --batch 24 --set seq_len=1024 \
--set engram_ram=true --set moe_capacity=0 --set moe_kernel=triton \
--set ckpt_name=mix1 --set out_dir=checkpoints/mix1
uv run dormouse bench --ckpt-name mix1 --out-dir checkpoints/mix1 \
--tasks arc_easy,hellaswag --limit 1000 # downstream, byte-scored
uv run dormouse sft medium --data sft.bin --build-sft \
--chat-data pairs.jsonl --init-from checkpoints/mix1/mix1.pt \
--ckpt-name sft11 --out-dir checkpoints/sft
uv run dormouse serve --out-dir checkpoints/sft --ckpt-name sft11 --port 3783

dormouse --help lists every command; dormouse info <preset> prints a parameter budget table. Every knob is a typed flag or a --set key=value that refuses to load when the key is unknown — a config that lies is a bug, and the schema is strict on purpose.