A Bittensor subnet where miners quantize a fixed teacher model and the validator crowns the copy that stays closest to it. Kings are published; the two newest kings of each open competition earn a quarter of the emission each.
llms.txt— how the network works and how to mine.AGENTS.md— how the code is organised and how we work on it.chain.toml— what miners and the validator agree on: the competitions (a model family and a quantization each), the open ones ([competition] open), their teacher, genesis, limits, win margin and share of the emission.
git submodule update --init # llama-prism: the Dendrite llama.cpp fork (PrismML's plus our changes) that runs q2 models uv run pre-commit install # ruff and ty on the python, prettier on web/, every commit
schema.sql is idempotent: apply it on every deploy (psql -f schema.sql). Kings carry their
quantization; a model digest is unique only among submissions that have not failed.
bash scripts/setup_eval_box.sh # .venv with vLLM 0.31.0; never `uv sync` here bash scripts/build_llama.sh # llama-prism with CUDA, and llama-states (q2 reads) .venv/bin/python scripts/eval_smoke.py --family qwen35_9b --quant q2 # teacher vs genesis .venv/bin/python scripts/eval_smoke.py --family qwen35_9b --quant q2 --king DIR --challenger DIR pm2 start pm2/ecosystem.eval-service.config.js
Each family has its own teacher, on vLLM for every quantization. The queue is one for all
competitions, oldest first; when the next submission is of another family, the eval service
stops the teacher and loads that family's. A gguf king and challenger each run llama-states on
the GPUs of their role (INGOT_KING_GPUS, INGOT_CHALLENGER_GPUS).
The validator's dedup bank, one OpenSearch index per competition
(ingot_dedup-<family>-<quant>, -hash for a hash dedup): scripts/setup_opensearch.sh starts
OpenSearch and waits until it is healthy; --seed then banks the genesis of every open
competition in its index (its file hash for a hash dedup; its fingerprint, on the GPU box, for a
full one), generating INGOT_DEDUP_SECRET in .env if it is empty. One competition:
uv run --extra dedup scripts/seed_dedup_bank.py --family <family> --quant <quant>.
Add its [quants.<family>.<quant>] block to chain.toml (genesis, limits, kl_margin,
emission_share), a [teachers.<family>] block for a new family, and its
src/model_validation/families/<family>/ package. Then:
uv run scripts/pin_gguf.py qwen35_9b q2 # a gguf genesis: pin its header (once) uv run scripts/pin_family.py qwen38_27b fp8 # a safetensors genesis: config and layout uv run scripts/create_genesis.py --family qwen35_9b --quant q2 # its genesis king row uv run --extra dedup scripts/seed_dedup_bank.py --family qwen35_9b --quant q2
create_genesis.py and seed_dedup_bank.py without flags do every open competition. Then list
the pair in [competition] open and restart every service together: each reads chain.toml once
at start. Waiting submissions of a pair that is no longer open end FAILED "closed" with their
attempt handed back.
uv run scripts/push_site.py # web/ to the site bucket (R2_SITE_BUCKET_NAME) pm2 start pm2/ecosystem.dashboard.config.js # keeps the bucket's api/ current: state.json, eval pages uv run ingot-dashboard-preview # local preview on http://127.0.0.1:8000
uv sync && cp .env.example_miners .env
uv run ingot register
uv run ingot check-model --family qwen35_9b --quant q2 --path ./model.gguf
uv run ingot submit-private --family qwen35_9b --quant q2 --path ./model.ggufTo work with a q2 model in PyTorch (load, train, pack, measure), see miner/ternary.