# Affine (Bittensor SN120) v2: the miner contract Generated 2026-12-01 08:47:14 UTC from snapshot `505969a7c676bea94d657a4035c6a75f3de826ec4cf5ad399a8ef122916f258c`. The machine-readable companion is mining.json. It has the same `snapshot_digest`. If the two digests differ, an update is in progress: fetch both files again. These two files are the whole miner contract. The document of the local tool (section 10) explains a tool; it sets no rule. You upload one JSON file per hotkey: prompts, rollouts and rewards. At round start the validator copies it, checks it, and trains one bounded LoRA from the current head M with the published recipe. Every LoRA of the round and a null copy of M are scored on the same public tasks. Sample 0 of each uses the same seed; later king samples are king-only. At most one LoRA wins, and only if it beats M by more than the tie tolerance and has z strictly above 1.5. The winner becomes a pending crown and is not merged into the head until next round's fresh paired confirmation passes. Only confirmed crowns are merged and paid. ## Start here: live-pool mining in nine steps **Scoring draws from the live official-active pool, which rotates every round.** The bundled `sn120_v2/envs/math_pool_v2_1.jsonl` is **STALE / test-only as an active list, not the king-draw source**. It supplies only base task bodies. Do not sample from a saved pool or an earlier active SHA for a new round. 1. **Register a hotkey.** Register an Ed25519 hotkey on Finney netuid 120 and activate its sealed link as section 5 says. 2. **Build from the live pool.** Fetch cache-busted `https://affine.io/mining.json` with a named `User-Agent`. Use `round.pool.active` and `round.pool.active_sha`; use `https://affine.io/public/pool/summary.json` only when the round has no pool. Fetch `https://affine.io/public/pool/active/.json` and require sha256(exact bytes) = active_sha. Then run `python v2/miner/live_pool.py --out tasks.jsonl`. It performs those checks and emits `task_id`, `problem`, `answer` and official `prompt = task.batch_prompt()` rows. The reference `miner/kit/generate.py` defaults to this live pool; local generation requires explicit `--pool local`, optionally with `--local-pool PATH`. 3. **Check locally.** Run `python v2/miner/affine_miner.py check --mining-json https://affine.io/mining.json --hotkey batch.json`. After the ordinary file check, the CLI adds a warning if more than half of mapped batch prompts are outside the active set. `--active FILE` uses a saved active object or helper JSONL; `--no-live-pool` skips this diagnostic. A fetch failure or pool finding never changes `valid`, rejects a batch or changes validator admission. 4. **PUT to your sealed link.** Open it with the section-5 command, keep the resulting URL secret, and upload the file bytes with `Content-Type: application/octet-stream`. The official `upload` command performs the same check and PUT. 5. **Read file verdicts by phase.** Waiting-file checks occur at round open and while IDLE, not during a RUNNING round. A mid-round verdict belongs to the previous snapshot: `queue.files_checked_at` and each row's `checked_at` identify it. 6. **One entry per hotkey per round; no coldkey seat limit.** A charged hotkey needs a new hotkey/registration for another turn. 7. **Crown gate.** The eligible highest-delta candidate needs the published tie tolerance and strict `z > z_crown` (this snapshot: `z_crown=1.5`, so `z > 1.5`; always reread the live value rather than treating it as permanent; confirmation uses `z_bar`). 8. **Confirm before payment.** The crown is not merged until next round's fresh paired confirmation passes with strict `z > 0.5`. Miners train on and are judged against the unchanged head until then; only a confirmed crown is merged and paid. 9. **Weights and public results.** Only confirmed, still-registered kings split weight equally; confirmation adds no backpay. The sole writer follows the cadence in live params and preserves the last valid weights across chain/state failures. Canonical stats: `https://affine.io/public/winner-stats.json`; byte-identical root alias: `https://affine.io/winner-stats.json`. ### Live task bodies and rotation - **Base `dapo:` / `math:` IDs:** bodies come from the checked-in `sn120_v2/envs/math_pool_v2_1.jsonl` catalog, but only the live active object selects which IDs score. It is not the current active set. - **`gen:` / reserve IDs:** `gen:` tasks are Generator-produced public reserve tasks. Read `https://affine.io/public/pool/reserve/MANIFEST.jsonl` and each `https://affine.io/public/pool/reserve/shards/..jsonl` named by its manifest row. Reserve rows include `id`, `problem`, `answer` and optional `prior_p`. Verify manifest and shard SHAs; the helper refreshes pointers every time and caches only immutable, SHA-addressed shards. Every HTTP request needs a `User-Agent` and cache-busting/no-cache headers. - **Generator task check (mechanism 1):** every scored Generator task gets deterministic checks, and every task that passes the 2-6/8 king rule also gets an LLM judge. If any task a miner submitted in an epoch is judged broken (wrong answer or logical error; ambiguous or underspecified with no single answer; missing figure; multi-answer; ill-posed; format mismatch; proof; truncated), that miner's Generator score for that epoch is 0 and none of its tasks enter the pool. Only the verdict category is published, never reasoning or answers: `https://affine.io/generator/sidelined.jsonl`. Categories in `contract.generator_task_check.broken_categories`. Guide: `https://affine.io/generator/generator-guide.md`. - **Rotation-v2:** sufficiently measured tasks use IRT-predicted head pass rate `p`. Otherwise an available reserve `prior_p` is used, then `rotation_prior_p`. An active task with an IRT row but too few rounds uses the configured fallback, not that reserve prior. Non-dead candidates score `p(1-p)`; dead tasks with enough head rollouts and zero passes score zero. Thus `score > 0.16` is exactly `0.2 < p < 0.8`, and the maximum `0.25` occurs at `p=0.5`; scores from `0.15` through `0.16` can lie just outside that middle interval. `irt_middle_band` applies only to `irt_draw_rule="band"`, not rotation-v2. ## 1. Network and head - Network: Bittensor Finney, netuid 120. Environment: `math` (pin `none`). - Head M `version_id`: `45dc64d84cb150cabd9c7a50b61f7fea7242557fec553ff5dfc2c32638238e8d` (parent `328c2f8e52fc8c09cad7c75bcc3ad6bb092c45f1cd8f322aefc2800fab28cbe8`) - `base_hash`: `1797d41dbff6e780134d34424a0ed7f2a62dff4b810988dfb03f11b1d3b5101e`; fp32 master digest: `46b73c7507249464cffeb7e8751b2a86dce88c83d668ade769828975233a32c1` - Made by round `r000209` at 2026-12-01 00:11:53 UTC. - Head manifest (every file with its sha256): `public/heads/45dc64d84cb150cabd9c7a50b61f7fea7242557fec553ff5dfc2c32638238e8d.json` - `params_hash`: `7838317829e36ebbf769b0b150fbbd45e18984da4d7fe9b97d7ebca1bf7ff6f7`; `recipe_id`: `44859d1905562c5c2bc2375ea691949cef6c29d2e32cc2e617b709c473e951a1` - Public objects are served under: https://affine.io. Each key below is a path under it, except the weight files. - Weight files are not served under the public address, and the store does not hold the weight files of every head. It holds the full files (the base and the fp32 master) of each **checkpoint** head, and the LoRA of every winner. The launch model is a checkpoint. You make the base of a head that is not a checkpoint on your machine: start from a checkpoint and fold each LoRA after it, in order. The result is exact: each file must have the sha256 that the head manifest names. - `head_chain` in mining.json has the newest checkpoint (`start`) and one entry in `steps` for each fold after it: the LoRAs of the fold, its `kernel`, and the ids of the base and the fp32 master after it. The whole chain from the launch model is `public/head_chain.json`. - The newest checkpoint is head `45dc64d84cb150cabd9c7a50b61f7fea7242557fec553ff5dfc2c32638238e8d`. The base of head M is that checkpoint. - Head reverts: the operator can make an earlier folded head the head again. `head_version_id` is then that head's own id; `reverts` in the head chain names each revert with its `reason` and the reverted-away heads. Paid kings are unchanged. - Signed download links are in https://affine.io/public/read_links.json. Each link works until `expires_at`; fetch the file again for new links. Check each file against its `sha256` and `size`. `head_version_id` in that file names the head of the links. `loras` has the LoRAs that are stacked on the head. `checkpoints` has the base and the fp32 master of the newest checkpoint, and `chain_loras` has the LoRAs of each fold after it. `base` and `master` are the files of the base of head M when it is a checkpoint, and null when it is not. - To get the base of head M: `python -m sn120_v2.replicate fetch` (section 10), or `python -m sn120_v2.headfold rebuild --chain https://affine.io/mining.json --work `. It downloads what the directory does not hold (the first time: the fp32 master of the checkpoint, which has two times the bytes of the base), does each fold again, checks every file, and leaves the base in `/cache//`. After that, a new king costs one LoRA download and one fold. Keep the directory: the next fold starts from the fp32 master in it. - `kernel` names the rule for the arithmetic of the LoRA product. `fixed-order-v1` gives the same bytes on each machine. `torch-matmul-v1` is the matrix product of torch on the CPU of the box, and another machine can give other bytes: start from a checkpoint after such a fold. Stop when you do not know a kernel name. - For the launch model (`XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B`): the first run downloads 37.6 GB, and a fold needs about 115 GB of free disk and about 2 GB of memory. One fold of a rank 64 LoRA with the kernel `fixed-order-v1` takes about 21 minutes on 4 CPU cores (calculated from the measured time of one weight shape). `--device cuda:0` runs the product on a GPU; that time is not measured. - `SN120_FOLD_IMPLEMENTATION=blas` in the environment of the rebuild uses the matrix product of torch, which takes less time on a CPU. Its bytes are those of the rule only on some machines. The sha256 values decide: a fold with other values is deleted, and the tool prints a line that starts with `refused: ` and names the default (`reference`) as the way out. - This file and mining.json are also at https://affine.io/llms.txt and https://affine.io/mining.json. There the two files are always a matching pair. - The current head is also at https://affine.io/head.json. It is updated when a head is applied, without waiting for the full close publish. - Send a client name of your own (the HTTP header `User-Agent`) with each read of a file under `public/` and of a link file (section 5). The site can answer HTTP 403 to a read with the default client name of Python's `urllib` (`Python-urllib/`), also for a file that exists. curl, wget and the Python package `requests` send a name that the site accepts. HTTP 403 does not say that a file is missing: with an accepted name a missing file gives HTTP 404. Each command that this file names sends a name of its own. No LoRA is stacked on the base. ## 2. The training recipe (recipe_id `44859d1905562c5c2bc2375ea691949cef6c29d2e32cc2e617b709c473e951a1`) The validator trains one LoRA from head M for each admitted batch. It runs the same code and the same recipe for every batch. Your batch is the only training data. A batch made against an older head is trained on the current head. `recipe_id` is the sha256 of the canonical JSON (sorted keys, no spaces) of the recipe object in mining.json (`params.recipe`). A new recipe gets a new id, and it is shown here before the next round starts. The canonical hashed/stored object omits `minibatches` while the value is 1, `adam_eps` while it is the default 1e-8, and `sft_weight` while it is the default 1. The public snapshot visibly includes those effective `sft_weight` and `max_stages` defaults; decoding it restores the same canonical object and hashes. | field | value | meaning | | --- | --- | --- | | `method` | grpo-lora | GRPO on the LoRA weights only; the base weights are frozen | | `steps` | 1 | epochs (full passes) over the batch or each v4 stage; each pass makes `minibatches` updates | | `minibatches` | 1 | updates in each pass; 1 = one update from all rows of your batch or v4 stage | | `lora_lr` | 1e-05 | learning rate of each update | | `adam_eps` | 1e-08 | epsilon of each Adam update; larger values damp small-gradient weights | | `max_grad_norm` | 1 | gradient clip of each update; it does not cap the size of an update (the training procedure, below) | | `global_norm_cap` | 1e+06 | cap on the norm of the whole adapter update, for a file that sets none; none = no cap | | `group_size` | 0 | rollouts per GRPO group; 0 = the groups of your file | | `sample_temperature` | 1 | temperature your rollouts were sampled at | | `sft_weight` | 1 | multiplier of each v4 supervised trace's token-mean cross-entropy | | `rank` | 16 | LoRA rank | | `alpha` | 32 | LoRA scale | | `dropout` | 0 | LoRA dropout | | `target_modules` | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj | layers that get an adapter | | `ppo_clip` | 0.2 | the probability ratio (trained policy / head) of a token is clipped to 1 +- this value | | `dual_clip` | 3 | a rollout with a negative advantage: its loss per token is at most this many times its advantage | | `kl` | 0 | KL term; 0 = off | | `support_top_k` | 20 | the policy-gradient term uses only tokens the head could sample (top-k, then top-p) | | `support_top_p` | 0.95 | top-p of that support | | `derail_window` | 32 | a rollout that hit the cap, with a negative advantage: window of the derail test, in tokens | | `derail_threshold` | -3 | the derail point is the first token where the mean log-probability of the window is below this | | `derail_tail` | 64 | tokens later than this many after the derail point do not train | | `train_max_output_tokens` | 65536 | training reads at most this many output tokens of a rollout; it is not the scoring cap | | `train_max_context_tokens` | 69632 | training reads at most this many prompt + output tokens of a rollout | | `code_digest` | cac896e4b4c825522e57cdaa15406052f35de4074f068c6eb240f16a8db12e0b | sha256 of the training code | | `image_digests` | 9a4b16ff282b21baf44350e54c852ed59586b9efb6fe09e5cd2f1e288f4c108a | worker images that may train and score | - Training code: `sn120_v2/gpu/` in https://github.com/AffineFoundation/affine/tree/v2/v2 (sha256 `cac896e4b4c825522e57cdaa15406052f35de4074f068c6eb240f16a8db12e0b`). - `code_digest` is the id of the file set `sn120_v2/gpu/*.py` (section 9). The box refuses to train or score when its own files have another id. `python -m sn120_v2.gpu.plan` prints the `code_digest` of your copy of the code. - Validator training uses exactly the stored `prompt` field of each batch row. Sampling context such as a separate system message is not kept unless it was written into that stored `prompt` field. For a pool task the recommended stored-prompt template is the official instruction of section 6 (`MANDATE`), a blank line, then the problem, both in that one `prompt` field, as recent crowned kings do. Official form: `MathPool.task.batch_prompt()` = `MANDATE + "\n\n" + problem`. For chat rendering, a leading official instruction + blank line is stripped first if present. The trainer renders system = the official instruction, user = the problem, then applies the head's chat template with `add_generation_prompt=True` and `enable_thinking=True`. It does not apply that template directly to the raw stored `prompt` as one message. ### What you may set You may set only these fields, in the `train` object of your file. Each one replaces the recipe value above for your LoRA only. | key | default | allowed | | --- | --- | --- | | `train.lora_lr` | 1e-05 | a number from 1e-06 to 0.01, both ends included | | `train.adam_eps` | 1e-08 | a number from 1e-10 to 0.0001, both ends included | | `train.steps` | 1 | a whole number from 1 to 64, both ends included | | `train.minibatches` | 1 | a whole number from 1 to 2000, both ends included | | `train.group_size` | 0 | a whole number from 2 to 64, both ends included | | `train.sample_temperature` | 1 | a number from 0.5 to 1.5, both ends included | | `train.rank` | 16 | a whole number from 8 to 64, both ends included | | `train.alpha` | 32 | a number from 8 to 128, both ends included | | `train.target_modules` | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj | a list: a non-empty subset of q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, in_proj_qkv, in_proj_z, out_proj; a list with in_proj_z must hold in_proj_qkv too | | `train.global_norm_cap` | 1e+06 | a number from 0.01 to 1e+06, both ends included | | `train.sft_weight` | 1 | a number from 0 to 1, both ends included | - These are the bounds for launch. The bounds are part of the recipe: a change of a bound gives a new `recipe_id`. - `decided` means the bound is frozen into `recipe_id`, not that you cannot set the value. You may still set `minibatches`, `rank`, `global_norm_cap` and every other field anywhere in its published range above. These bounds, not the decided flag alone, are the authority. A bound not yet frozen still leaves the value yours to set in range. - Every key is optional. A key that you do not set keeps its default. - Values are never clamped. A value outside its bound, a value of the wrong type, or any other key under `train` makes the whole file invalid. - `train` is allowed in affine-batch-v2, affine-batch-v3, affine-batch-v4. It is not allowed in affine-batch-v1. - Your `train` values are published only if your batch wins. For v4, stage `train` uses the restricted key set below; top-level `train` supplies defaults to each stage. - A file with `train` keys that only v1 had (`lr`, `kl`, `step_mult`, the knobs) is invalid. The seat is skipped and not charged, as with any invalid file (section 4), until the miner uploads a valid file. ### What the trainer does with them - `group_size`: 0 means one group per prompt, with all rollouts of the prompt as the file has them. A value G above 0 cuts the rollouts of each prompt, in file order, into groups of G; a last group with fewer than G rollouts stays a group. The advantage of a rollout is its reward minus the mean reward of its group. The default is 0. - `target_modules`: the default is q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj. You may also name `in_proj_qkv`, `in_proj_z`, `out_proj`: projections of the linear-attention layers of the head. The trainer handles each of them as it handles the other names: every linear layer with that name gets an adapter (the training procedure, below). `in_proj_a` and `in_proj_b` are not choices. - A list with `in_proj_z` must hold `in_proj_qkv` too. The server that scores your LoRA holds these two layers as one layer, and it does not load an adapter for `in_proj_z` alone. A list with `in_proj_z` and no `in_proj_qkv` makes the whole file invalid. `in_proj_qkv` without `in_proj_z` is allowed. - `sample_temperature` T: you state the temperature at which you sampled your rollouts. The trainer divides the logits of the head by T before it scores the tokens of a rollout. Evaluation always samples at temperature 1. The default T is 1. - `global_norm_cap`: the largest allowed Frobenius norm of the whole adapter update, sqrt(sum over all target modules of ||(alpha / rank) * B @ A||_F^2), in the units of the model weights. If the trained update is larger, every B matrix is multiplied by cap / norm. The train report states the norm before the cap and the norm after it (`step_norm` is the norm after the cap). The recipe value is the cap of a file that sets none. It is 1e+06 now. `train.global_norm_cap` sets the cap of your LoRA, from 0.01 to 1e+06. There is no minimum norm, so every valid nonnegative cap passes this static floor check. The cap holds for the whole update, however many steps and minibatches made it. - `adam_eps`: the epsilon of each Adam update. With one Adam step, a larger epsilon damps weights with small gradients, so the step concentrates on high-signal weights. Use this instead of the old zero-reward filler trick: zero-advantage rows do not train or enter the loss denominator, so adding them has no effect. - `minibatches`: the count of updates in each pass over your rows. The training procedure, below, has the rule. Section 5 has what it costs. - Train caps: a rollout above `train_max_output_tokens` (65536) or `train_max_context_tokens` (69632, prompt + output) is truncated, not rejected. The train report counts the truncated rollouts. A rollout with no output token left is dropped and counted. ### The training procedure This is everything that the trainer does with a file, in the order in which it does it. The code is in three files: `sn120_v2/gpu/trainer.py` (the checks around the job), `sn120_v2/gpu/train_job.py` (the job on the GPUs) and `sn120_v2/gpu/batch.py` (rows, advantages and token caps). Section 10 has the command that runs this code on your machine. - Model: the base files of head M (`base_hash`, section 1), loaded as `bfloat16` in the model class that their `config.json` names. The model is in evaluation mode and all its weights are frozen. The box trains and scores only a head with no stacked LoRA: it refuses a head whose LoRAs are not folded. - Recipe: the values of the table above, with your `train` values in their place. The trainer runs only the method `grpo-lora`, with no dropout and with the KL term off. - Seed (`train_seed_scope` is `round`): the first 63 bits of sha256("|train"), as a whole number. The train report states it. With `round` scope every batch in the round shares one training seed; legacy `batch` scope adds `|` after `|train`, so different files have different training seeds. - LoRA layers: each linear layer whose name is one of `target_modules` (q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj) gets two matrices: A (rank x inputs) and B (outputs x rank). The layer then gives layer(x) + (alpha / rank) * B(A(x)), with rank 16 and alpha 32. A starts with values drawn uniformly from -1/sqrt(inputs) to +1/sqrt(inputs), from a `torch.Generator` on the CPU with the seed above, layer by layer in the order of `named_modules()`. B starts at zero, so the model is head M before the first update. A and B are float32, and only A and B train. - Rows: one row for each rollout of the groups that the file check keeps (section 5), in file order. The advantage of a row is its reward minus the mean reward of its group (`group_size`, above). The trainer does nothing else to it: no division by a standard deviation and no clip. - Tokens of a row. Start from the stored `prompt` field and strip a leading official instruction + blank line if present. Render system = the official instruction (section 6), user = the problem; then apply the head's chat template with `add_generation_prompt=True`, `tokenize=False` and `enable_thinking=True`, followed by `tokenizer.encode(text, add_special_tokens=False)`. The template is not applied to the raw stored `prompt` as a single user message. Output: `tokenizer.encode(output, add_special_tokens=False)`. The tokenizer is the one of the base files. - Room: room = min(`train_max_output_tokens`, `train_max_context_tokens` - prompt tokens). An output shorter than the room gets the end-of-turn token `<|im_end|>` after its last token. An output as long as the room or longer is cut to the room and gets no end token: the trainer takes it as a rollout that did not end (a capped row). A row with no output token or with no room is dropped. - Rows that train: the rows whose advantage is not zero. With no such row the batch is not trained: `skip` (section 4). - The score of a token. The trainer takes the logits of the model at each output token, as float32. The support at a token: take the 20 tokens with the highest logits (`support_top_k`), divide their logits by T (`sample_temperature`) and take the softmax over them. From the most likely token down, a token is in the support while the summed probability of the tokens before it is below 0.95 (`support_top_p`). log q of the token of your rollout = its logit / T - log(sum of exp(logit / T) over the support). - First pass, before any update: the trainer stores log q of every output token under head M. This is the old policy. The mask of a row holds its tokens that are in the support of head M. A token outside the mask never trains. With more than one minibatch this is a pass of its own over all rows that train, before the first update, with no loss and no gradient: the old policy of every row is head M, not a model that has moved. - Derail rule, only for a capped row with a negative advantage. Take the plain log-probability of each output token under head M (all logits, no temperature). The derail point is the first token at which the mean of the last 32 such values (`derail_window`), that token included, is below -3 (`derail_threshold`). The derail point and the 64 tokens after it (`derail_tail`) stay in the mask. Each later token leaves the mask. A row with fewer tokens than the window has no derail point. - Loss, at each step, for a token of a row with advantage A: ratio = exp(log q now - log q of the first pass). "Now" is the model with its LoRA at that step, with the support of that model. Token loss = max(-A * ratio, -A * clip(ratio, 1 - `ppo_clip`, 1 + `ppo_clip`)), with `ppo_clip` 0.2. With A below 0 the token loss is at most -A * `dual_clip`, with `dual_clip` 3. A token counts when it is in the mask of its row and in the support of the model now. Row loss = the sum of its token losses / the number of tokens in its mask. A row with an empty mask gives no loss. With one minibatch, the loss of an update = the sum of the row losses / the number of rows that train. Rows with advantage 0 do not count. With more than one minibatch, the loss of an update = the sum of the row losses of its minibatch / the number of rows in that minibatch. - Steps: 1 (`steps`). Minibatches: 1 (`minibatches`). One step is one pass over all rows that train. With one minibatch a pass ends with one update, from all rows. The gradient of the loss of an update, over all A and B together, is clipped to the norm 1 (`max_grad_norm`). Then comes the update, with the learning rate 1e-05 (`lora_lr`) and epsilon 1e-08 (`adam_eps`). The optimizer: adam, fresh per LoRA, betas 0.9/0.999, eps from recipe (default 1e-8), weight decay 0. The learning rate has no schedule. A gradient that is not finite stops the training: `skip`. - The clip does not cap the size of an update. Adam divides each gradient value by its own running size. So with the default epsilon the first update moves each weight that has a gradient by about `lora_lr`, whatever the norm of the gradient is. The size of the whole update grows with `lora_lr`, with the count of updates and with the count of weights. The one cap on it is `global_norm_cap`. - Minibatches, for a value N above 1. Each pass cuts the rows that train into N minibatches and makes one update for each minibatch: steps x N updates in all. If fewer than N rows train, each row is a minibatch of its own, and a pass makes one update for each row. The order comes from one `random.Random(seed)` of Python for the whole training, with the seed above. Each pass takes the rows that train, the longest row first and rows of the same length in file order, and calls `shuffle` on a copy of that list. Row k of the shuffled list (k from 0) goes to minibatch k modulo N. The minibatches train in the order 0 to N - 1. So each pass has another order, and every LoRA in the round starts from the same A. The shuffle stream has the same seed, but different rows give different minibatch orders. The optimizer is made one time for your file: its state goes from each update to the next, through all passes. The LoRA of another file starts with a new optimizer. - GPUs: the job has the GPUs of its slot (section 3). It puts one copy of the model on each GPU, but not more copies than rows that train. The rows that train go to the copies in turn, the longest row first. The gradients of the copies are added before the clip. With more than one minibatch, the rows of each minibatch go to the copies in turn in the same way. The job never trains on a CPU: with no GPU it stops. - After the last step: the cap `global_norm_cap` (above), then a check that each weight is finite. If one is not: `skip`. - The LoRA is these files: `adapter_config.json`, `adapter_model.safetensors`, `train_report.json`. The weight file holds A and B of each layer as float32, with the names `base_model.model..lora_A.weight` and `base_model.model..lora_B.weight`. The config file has the PEFT layout; its `base_model_name_or_path` is the `base_hash`. The train report holds the optimizer, the seed, the recipe values that were used, the loss and the gradient norm of each update, the count of the mask tokens of the rows that trained, the count of the rows, of the truncated rows and of the dropped rows, `step_norm` and `step_norm_before_cap`. With more than one minibatch the recipe values hold `minibatches` too. `lora_hash` is the id of this file set (section 9). - A failure of the box in a training (not of the batch) is tried again: at most 3 tries in all, inside the training time. Then the entry is `no_decision` (section 4). - What a training of your own repeats: with the same round seed, every LoRA in the round starts from the same A. The shuffle stream has the same seed, but different rows give different minibatch orders. The trained B can differ between two machines, and between two runs on one machine; no run has measured by how much. The tests of the code run this training on a CPU, on a very small model. The box runs it on GPUs. ### Ordered GRPO and SFT stages (`affine-batch-v4`) - A v4 file has `stages`: an ordered list of 1 to 5 stages (`max_stages`). Each stage has optional `train`, plus `groups` and/or `sft` (at least one, non-empty when present). Stages train one LoRA in order. Each stage resolves top-level `train`, then its own `train`, gets a fresh Adam state, and measures GRPO's old policy and support again after all earlier stage updates. Every stage needs a trainable row: nonzero-advantage GRPO or SFT with a positive `sft_weight`. - A stage's `train` allowlist is `adam_eps`, `group_size`, `lora_lr`, `minibatches`, `sample_temperature`, `sft_weight`, `steps`. Keys outside this list, including `rank`, `alpha`, `target_modules`, `global_norm_cap` and `dropout`, belong at top level where their bounds permit them, never in a stage. Every stage value must also have a published MinerBound; in this recipe the usable stage keys are `adam_eps`, `group_size`, `lora_lr`, `minibatches`, `sample_temperature`, `sft_weight`, `steps`. - `steps` means epochs: full passes over that stage's trainable rows, not gradient-update counts. Each pass has `minibatches` updates (fewer when fewer active rows train). Per-stage cost is `steps * (grpo_tokens + sft_tokens) + grpo_tokens`; the added GRPO tokens are its q_old rescoring pass. File cost is the sum of this value over all stages. The top-level `steps` supplies the default for a stage, and the stage's `steps` replaces it for that stage only. SFT trained tokens count in the training passes, but have no q_old pass. - SFT rows have exactly `prompt` and `output`, with no reward or rollouts. They train token-mean cross-entropy, not GRPO advantage. Official verification requires a prompt known to the official grader and an output whose official reward is exactly 1. A grader failure or time limit leaves the trace unverified; an SFT output at the scoring cap or one that training token caps would cut is invalid. - `sft_weight` is opt-in here: its published MinerBound allows a number from 0 to 1, both ends included, with default 1. Set it in top-level `train`, or override it in a stage's `train`; 0 disables the SFT loss contribution. - Start small: SFT is strong. Prefer a lower `sft_weight`, for example 0.1–0.3, and few SFT traces relative to GRPO rollouts. Measure `kl_tok` locally with `python -m sn120_v2.replicate run` and the arguments in section 10 before submission. One anonymized, unattributed public observation: 120 SFT traces + 80x2 GRPO at `sft_weight=1.0` produced `kl_tok=0.088` and −7 percentage points, versus GRPO-only +1.7 percentage points. This is only a caution that a large SFT term at weight 1.0 can move the policy too far, not a predicted result. - Only a crowned winner's batch file, including its stages and SFT rows, becomes public. Waiting and losing seats reveal no batch content, stage counts, SFT counts, stage train values or SFT verification details. ## 3. The round now - phase: IDLE (IDLE: no round is open; RUNNING: training and scoring; APPLY: decided, the new head is being published). The last closed rounds are in mining.json under `history`. - `service` is a sibling of `phase` in mining.json. `service.state` is `running` for RUNNING, `applying` for APPLY, `idle` while no round is open without a close-publish error, or `stalled` when such an error remains. A stop request takes priority for the reason but does not hide a stalled state. Running and applying have `reason` and `next_open_at` null. Idle/stalled `reason` is one of `deploying fix`, `publish retrying`, `waiting for seats`, `between rounds`; in that order when more than one applies. The first is the coarse form of an operator stop-after-round request. A close-publish retry is `publish retrying`; insufficient valid files/seats is `waiting for seats`; a recently closed round with enough seats is `between rounds`. - `service.next_open_at` is UTC ISO-8601 with seconds and Z, rounded up to a five-minute boundary. It is a coarse estimate for between rounds, publish retrying and deploying fix, and null for running, applying, waiting for seats or when no coarse estimate is possible. No exact sleep, retry budget, request-file path, retry count or scheduler timing is public. - A round takes at most 6 batches and needs at least 1. It does not wait for a full round. Registrations for the next round are always open. - Round loop: (1) pin head M, the recipe and the task sampler snapshot; (2) copy the next valid files in queue order, freeze their bytes and run Stage-A duplicate checks, then read entropy only after those files are frozen to derive and pin the public round seed and task draw; (3) train one LoRA per remaining file; (4) score every LoRA and a null copy of M (no adapter), and run null-update and Stage-B duplicate checks; null M sample 0 and every LoRA use the same tasks and seed; later king samples are king-only; (5) crown at most one winner as pending; merge it only after next-round confirmation; (6) publish; (7) start again. Batches cannot use advance knowledge of the entropy, round seed or training seeds to target a particular draw or initialization. ### The time of a round All times count from the lease: the moment a round takes its entries. A round ends early, as soon as every LoRA is dropped or decided. - Time limit: 180 minutes from the lease to the promotion of the winner. The box stops scoring 10 minutes before it, at minute 170 (the stop time). The stop is hard. The 10 minutes are for the grading of the last chunk, the judging and the promotion. - Training time: the first 60 minutes. Batches train longest-expected-first, with queue order breaking ties. Each batch trains on one GPU, up to one training job per GPU at a time; any remaining batch waits for a free GPU. - At the end of the training time no new training starts, and each training that still runs is stopped. Such a batch is `not_trained`: you are not charged, your seat is first in the next round, and no failure is counted for the seat. Each GPU starts scoring when its own training is done or stopped; other GPUs may still train. - One exception: a batch that started at the lease had the whole training time. If the first try of its training did not finish in that time, that is a failure of ours: `no_decision`. Section 4 says when such a failure is counted for the seat. If a try of its training failed before (a failure of the box) and a later try is stopped at the end of the training time, the batch is `not_trained` as above: the box took a part of its time. - The box can start its work on a round later than 120 s after the start of the lease, for example when the validator's program started again in the round. Then no batch had the whole training time: a batch that does not finish is `not_trained` as above, and no failure is counted for the seat. - Scoring streams over the draw with no chunk barrier. Null M and every open LoRA answer every task. An open LoRA is a LoRA that was not dropped at a look (section 6). - The stop time cuts every look, the first one too. No rollout may run past the stop time. The common prefix scored by then is truncated to a whole block of 500 tasks; an unfinished block is not used. There are no further looks. - At the stop time, with the first look (500 tasks) complete: each open LoRA is judged by the win rule of section 6 on the complete cutoff blocks that null M and every open LoRA finished. Those tasks are then the whole test: delta above the tie tolerance and z strictly above 1.5 can win. Such an entry is charged, win or lose, as in a full round. - At the stop time, with fewer than 500 tasks scored: each trained LoRA is `not_scored`. You are not charged, your seat is first in the next round, and no failure is counted for the seat. - The lease ends 200 minutes after it starts. A box result that arrives after the end of the lease is never used: the round then has no result (section 4). No task is scored after the stop time: the time between the stop time and the end of the lease is only a reserve, so that a round that stopped in time does not lose its result. - `no_decision` as the status of an entry means: not charged, and the seat goes to the front of the queue (section 4). ## 4. The queue Seats that wait: 79. The next seats, in order: | position | uid | hotkey | registration_block | file_valid | file_verdict | batch_sha256 | checked_at | front | demoted | held | valid_ahead | eta_rounds | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | 0 | 414 | 5FYAug73kLWPGY4TTvtWfmYpcYNGf8H8pVTVKywRtocaqxSg | 9623687 | no | not_valid | 59c815bedee767ab3e1f61cb0a45a53b4ceac6e24999d76ae4c2ed6a47341c6c | 1796103474 | no | no | no | 0 | 0 | | 1 | 918 | 5CLX2VfY3xncA9QmaAuGVkEESihY2HuuxxWhhzrUzFMu7qJR | 9623828 | no | not_valid | 905529202ba96a3bd9761e96c396ff8e46746959fd8906d6977d3f3074dfdd56 | 1796103474 | no | no | no | 0 | 0 | | 2 | 136 | 5EPCiT3nRoWRrUPv1dba7o7AjJgswgKPRZYdhbFXuJDgcuMu | 9624025 | no | not_judged | none | none | no | no | no | 0 | 0 | | 3 | 352 | 5Dv3mMZonrdpbsSiys7eUHPXb6Yu1aNZwnh55KxK3CNQav5y | 9624167 | no | not_judged | none | none | no | no | no | 0 | 0 | | 4 | 454 | 5GR7GXbvbVEKDYq817SuajuA5fUUJpCkAyqqkHQ9wUvYFsuV | 9625425 | no | not_judged | none | none | no | no | no | 0 | 0 | | 5 | 19 | 5C4hvS2cWt7NNgL4GE2tJwFhn9EZBYsdFkbS88FCtKLkWUm3 | 9113126 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 6 | 60 | 5E2LP6EnZ54m3wS8s1yPvD5c3xo71kQroBw7aUVK32TKeZ5u | 9154776 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 7 | 124 | 5HFiZhF2Ujxp1H1UeQDyrPdPpPBVcKoVupRZQZi75LRLbto6 | 9180010 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 8 | 82 | 5DUgf9f6C4reB7jTrj74fwAJjtoAcRjKQzzKTUnzwVwozQsu | 9182538 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 9 | 126 | 5CcUkNGW2pWpKA4mE7zk5eqMCqXVpoP8RQaKM4Rnh4Dncyma | 9182568 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 10 | 115 | 5FqZ86X8KtfHEVdDuryr8bSbceHGcVTjPuxAzoQaaA1tn9R1 | 9185004 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 11 | 143 | 5CkHWZwndphFBbbXJZbALoWfaiv5M4nGggt291KnzGdfe293 | 9188886 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 12 | 106 | 5CwV6hDJE98WaPZVeBZbdNce78S9ZxN5sDefags8GpLsdMyJ | 9204323 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 13 | 46 | 5CyCQWZZaf9khqiPotp41S83waP3DEtSNBEWtcdoE9PKqCCA | 9204360 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 14 | 133 | 5Fq3JbeVo9gXFE3PwpCHTm9RRnycct5Z27g48TNh8bjDeFkT | 9208495 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 15 | 20 | 5DEXjXB4apTjjtG74tcTT3Y9BDY2Hi4jn1diJewNFUKc2Riv | 9208831 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 16 | 212 | 5CVBg3yiH5kEEXfeF7aKvmjbga2RKBQdwWbbmi2CspKeTuWJ | 9213216 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 17 | 201 | 5EpJZc2ZvdSNwqXieKBUbDfuRHt9TCKgmo54ddTWkWHvRrz7 | 9263507 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 18 | 256 | 5HaxsJvGnwVcT16Em6PMKCSWAakBgygoa3fjrSYxTVL9zaCX | 9277113 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 19 | 276 | 5DEnSMmd1PwuPtz4bRCngnrczCb9WUKSMDaJCA2auU4YFT64 | 9278004 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 20 | 277 | 5Gf1661Akp1NnLSadet3BDAWgvYEBhQeNzAkoV1ZLHQfKHhn | 9278081 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 21 | 279 | 5CtZqtV4NXTergsEWfY9BLzJT6VtGzfB6Je7Qrsxh5rrLn8T | 9278175 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 22 | 284 | 5ET3u2XqauXJL1Xx3h7rZsLLXKfWLgGbsegxAYrrLq22MbAm | 9278461 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 23 | 285 | 5CMpkezhCUqJdjwGGuErxnmYAazrNxbqxk1z1o1mDq2hhGVD | 9278516 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 24 | 291 | 5GVt2XjHCvMq89xP4arfYXmEgUEYsWrkcQpGw7BJAhmT2XpD | 9279614 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 25 | 302 | 5F2MGC6DbRU1xRLDb4BN7DBtbAic8EbUSN8ZvcrwDAFcoJiX | 9282905 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 26 | 303 | 5HT8guyvfdjE3aG4WyTD3eXnYUnPhdp3raeTMEk8sMXZcJte | 9282933 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 27 | 308 | 5HMsJMFUh7tFgcvSxPsPw2ogx2R4zdjPddoXcenK7YzzDVZC | 9284300 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 28 | 313 | 5EphmZqrh67iv9puxeXHCBgAeqPTWMw4tyna4MQLjPtoaAec | 9285679 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 29 | 314 | 5CHwvYj6DSwTCDyS4nXZqUSsxwowh7jv53TXu6F6RaEpyKqf | 9286025 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 30 | 315 | 5GigQQGhJBw8qTs9ZXaN2UrjbehcUUXV6YD6x5wEaDFg4eWs | 9286112 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 31 | 317 | 5E4C4JcHs4BLWNbfcHXz7NZzJEp94aycaELBKc11jqWgsr73 | 9286871 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 32 | 323 | 5Hk9nxKcEJ2YSGQ9PGsSXBCAzHxsEqGAQyQRQ8BZ8eJ3XLbN | 9288584 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 33 | 326 | 5FXfyCenVCSvweaoZAu2nXFCq1Uzz98ad9kbiKB4fq2neQjM | 9288922 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 34 | 335 | 5C7X6FDe4saXNFhXVWF7ABf3LvE1h1YiEMJL83TikkqXFdCF | 9292757 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 35 | 339 | 5CVNhrUFH31Lo3qJkwVnx8z1L6kTAfmfUNUzJ1LU4EJxHEqP | 9294619 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 36 | 340 | 5Fd4qBX2yx6CJaJPR3Jc3k23XMTdvy6kM2N6pbrL5wThSzpM | 9294856 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 37 | 341 | 5DpLbXdYsyp8dd8A695663LBPz454ELStdRrArKxZ6AqcXDR | 9295215 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 38 | 430 | 5GRggMSrJ1U1nyJ9Yvuy9e632ehzS3sGm7qBrHVfCvksesft | 9315242 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 39 | 458 | 5HebUwRxS9cuARM3fWsY8nLyBFsFVvhacyP33CsaQWrZBC6c | 9320562 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 40 | 469 | 5CWf9HsqvDyk2GksJxXSExfYPvVR9JiLHV8WXyWjnKBs7oob | 9323609 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 41 | 481 | 5C4hvz7FbpfogrnzrX8ihrQPDQykSsQzzL3gHFmMA6G69vPy | 9325759 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 42 | 495 | 5C4i1qsY85aLJPZ5CLu2bAvsyNb1WUed64YbcqtWVkPxTtNd | 9328784 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 43 | 496 | 5C4i4RgFxZrEAbN22rCj2Gva4FyvfxW9j9B55gTxFerHC8uk | 9328790 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 44 | 497 | 5C4hy7UZGo9te32QqL7FdeSJ4upstZAdYV6NSvqmEQ46jfNA | 9328796 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 45 | 509 | 5CkkBJfJYTbLe6L9SNGz8fBNc8Q6K7XLBw993643xYMLqYMN | 9331929 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 46 | 531 | 5HVczV73mUrBY2hAnyoLwf9zMuPWpRKE8vkyWKtquQMM3isE | 9338495 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 47 | 575 | 5C4hwNWrFzxZtHTHFb9HS9K4cu3rT7HPJtv7vAY5BhR2Zskg | 9355086 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 48 | 576 | 5C4hwYH8gpWESQFcVqGipzTL6J8yn2TCTY83k5bmC9ALJ5ao | 9355579 | no | not_judged | none | none | no | yes | no | 0 | 0 | | 49 | 585 | 5DvGQJBJC1yib3ZsvxjWiB2KSfHVHvcRn8D5LXGAvuNn6x4Y | 9359346 | no | not_judged | none | none | no | yes | no | 0 | 0 | - `file_valid`: the validator's verdict on the file that was stored for the hotkey at its last check of the files: 2026-12-01 07:14:57 UTC (`queue.files_checked_at` in mining.json). The validator reads the waiting files when it picks the entries of a round, and again and again while no round runs. It does not read them while a round runs: a file that you store then shows the old verdict until the round ends. The validator never publishes waiting or losing batch content or their `train` values. To see the rule that a file breaks, run the `check` command of section 5: it prints the rule code and the reason. Waiting files have the SHA256 + check-time-only exception below; `train` values become public only for a crowned winner. - A new process of the validator has no verdict until its first check of the files. A publication before that check has `queue.files_checked_at` null and `file_valid` no for every waiting seat, also for a good file. This can be so when a process starts while the chain gives no answer. It can also be so when a process starts, or closes a round, in the 300 s after a round with no result: in that time the validator does not read the files. No seat and no place in the queue changes by it: the validator picks the entries of a round from a new check of the files, never from the published value. So do not replace a good file because of it: wait for the next check. - The verdicts of the whole line are in mining.json under `queue.files`. Its list `verdicts` has one row for each hotkey with a waiting seat, in UID order: `uid`, `hotkey`, `file_valid`, `file_verdict`, `batch_sha256`, `checked_at`, `valid_ahead` and `eta_rounds`. UID order is not queue order; for a repeated hotkey the count belongs to its earliest waiting seat. `queue.line` is the full real waiting order, including seats beyond this 50-row preview, and `queue.next` is its first 50 rows. Every seat row has its own SHA256 and check time. `file_verdict` is `valid`, `not_valid` or `not_judged`. `not_judged`: the validator has no verdict for the hotkey. No file was stored at the last check, or the seat came after that check, or a new process made no check yet. In that case `batch_sha256` and the row's `checked_at` are null. Otherwise `batch_sha256` is the 64-lowercase-hex SHA256 of the stored bytes at that verdict, and `checked_at` is that verdict's Unix UTC seconds. The outer `queue.files.checked_at` is `queue.files_checked_at`: the time at which the whole check started. `file_valid` is yes only with `valid`. `hotkeys` counts the rows; `valid`, `not_valid` and `not_judged` count the rows with that verdict; `seats` counts the waiting seats. - `valid_ahead` counts only waiting seats strictly ahead in the real waiting order whose last verdict has `file_valid` true. Seats leased in the open round are not counted. `eta_rounds` is the coarse upper bound ceil(valid_ahead / 6), using only public `batch_cap`. It is not a scheduler prediction or a promise of files, duplicate owners, holds and available capacity can change a turn. No exact next-check or start time is published, and these fields reveal no draw-targeting information. - Waiting-file publication is SHA256 + check time only. No waiting or losing batch bytes, prompts, outputs, train values, reason, rule, counts, format, stage count, SFT count, stage plan, store URI, download link or presigned URL is public. Use the local `check` command to diagnose your own file; only crowned winners' batches become public. - `queue.pending` lists chain registrations which have no waiting seat and no leased seat in the open round. Each row contains only `uid`, `hotkey`, `registration_block` and `status: pending`; there are no file fields or URLs. The rows come from the controller's latest complete chain read, with no publisher-time chain query. A newly seen registration can therefore appear after its next ordinary read, and `pending` here does not refer to the private `pending/` store staging prefix. - Identity: a registered UID on this subnet (`btcli subnets register --netuid 120`). One registration (UID + registration block) buys one seat in one round, win or lose. A hotkey gets one turn. When its entry was charged, the hotkey never enters again, also with a new registration. A turn in v1 that the cutover imported counts too. To enter again, register a new hotkey. - Order: registration block, then UID. UID 0 has no seat. - A seat exists only while its registration is on chain. The validator reads the chain before each round. When the registration leaves the chain (the UID is deregistered, or the UID goes to a newer registration), the seat is removed and its turn is lost. A seat that is in an open round stays until that round closes. - When the hotkey of the UID changes and the registration stays, the seat keeps its place. The validator then reads the file of the new hotkey: a file that was stored for the old hotkey does not count. When the new hotkey already had its turn, the seat is removed. - One entry for each hotkey in a round. A second seat of the same hotkey waits for a later round. - `no_decision`: our infrastructure failed (section 3). You are not charged and you go to the front of the queue. - When the whole round fails on our side (no scores for anyone), every seated batch returns to the front of the queue, is not charged, and the failure is not counted toward max_infra_attempts. - A failure is counted for your seat in one case only: your batch had the whole training time of the round (it started at the lease, and the box started its work on the round at most 120 s after the start of the lease), the first try of its training did not finish in that time (section 3), and at least one other batch of the same round finished its training. Your entry then has the status `no_decision` and no scores. When 3 failures are counted for a seat, the seat is held: it takes no turn until the operator releases it. A release also sets the count to zero. A `no_decision` that comes from the scoring (section 6) has scores and is not counted. - A training job that failed is never counted for your seat: out of memory on the box, a crash of the job, any other error of the training. The box tries the training again (section 3). If each try fails, your entry has the status `no_decision` and no scores, and its `reason` starts with `training failed`. You are not charged and you go to the front of the queue. - A round with no result: the box failed, not a seat. This is the case when the training failed for at least one batch and finished for no batch, when the box stopped with an error, when its result did not arrive before the end of the lease, or when the operator ended the round. Ordinarily nobody is charged, no failure is counted for a seat, and each seat of the round goes to the front of the queue. The next round starts 300 s after the failure, or later. In the round file (section 9) you see it thus: `outcome` is `no_decision`, no entry has a `status`, and `note` gives the cause. In `history` of mining.json the round has the same `outcome` and its entries have no `status`; the `note` is only in the round file. If Stage A already found duplicates, those copies remain charged `duplicate` and lose their seats even when every lease fails. Their terminal entries are shown; every other seat stays uncharged and goes to the front, and the same retry delay applies. - A round that has a result also gets the outcome `no_decision` when none of its entries was charged. Each entry then has a `status`, and the status of your entry says what applies to your seat. - `not_trained`: the training time of the round ended before your batch was trained (section 3). You are not charged and you go to the front of the queue. It is not counted as a failure, so it never holds a seat. - `not_scored`: the time limit of the round came before the first look of the scoring (section 3). You are not charged and you go to the front of the queue. It is not counted as a failure, so it never holds a seat. - `skip`: the trainer could not train the copy of your file, for example because a gradient or trained weight was not finite. This training failure is uncharged and you keep your place. A non-finite stored `step_norm` that reaches judging is instead the charged `null_update` outcome described in section 5. - `duplicate` and `null_update`: your frozen batch was a duplicate, or its stored `step_norm` was not finite. These are charged terminal outcomes, not `skip`: the hotkey's turn is used, the entry cannot win or be paid, and it does not return to the queue. The rules and evidence are in `Duplicate and null batches` (section 5). - A round with the outcome `abandoned`: a winner was named, but its files could not be checked or applied. The head does not change, no entry of the round is charged, and a seat that was scored goes to the front of the queue. ### Your place while you wait - A seat that has a valid file stored keeps its place and is never moved back. While your entry is not evaluated, you may replace your file as often as you like (section 5): a new valid file does not change your place. - If your file is missing or invalid when the validator picks the entries of a round, your seat is skipped. You are not charged, and you keep your place, with one exception: squat-trim. - Squat-trim moves a seat to the back of the queue. It applies only to a seat that has no valid file stored when the validator picks the entries of a round, and only when the registration of that seat is older than 2 x 10800 s = 21600 s (`squat_age_factor` x `squat_min_wait_s`). No seat is moved when no turn was charged in the last 24 hours. A seat with a valid file is never moved. The two values are parameters (section 11). The validator can change them. This text always shows the values that it uses. - A seat at the back still gets its turn: a round takes it when it has room after the front seats and the normal seats that have a valid file. The seat stays at the back when a valid file arrives later. - A seat that v1 had moved to the back of its queue starts at the back here. - The operator can send a waiting seat to the front, between rounds only. The action is for a seat that had a turn outside v2 that was not charged. Such a seat is then no longer at the back. Nothing is charged or counted for it. - In the table: `front` = yes: the seat goes before the normal seats (it had a turn that was not charged). `demoted` = yes: the seat is at the back, unless `front` is also yes. `held` = yes: the seat takes no turn until the operator releases it. `position` counts every seat ahead of you, also a seat with no valid file, which a round skips. ## 5. Your file You have one private object for each hotkey. A hotkey whose queue entry is not evaluated yet keeps its queue position, and may replace its file as often as it likes until the entry is evaluated. There is no fixed window. The validator copies the latest file when a round takes the entry: that copy is what is trained. The admission checks run again on each new file. The only rule that moves a waiting seat back is squat-trim (section 4): it applies to a seat with no valid file stored, never to a seat with a valid file. The file stays private unless it wins. Then the exact file is published (section 9). ```json { "version": "affine-batch-v2", "hotkey": "", "train": { "lora_lr": 1e-05 }, "groups": [ { "prompt": "\n\n", "rollouts": [ { "output": " \\boxed{}", "reward": 1.0 }, { "output": " \\boxed{}", "reward": 0.0 } ] } ] } ``` ### The `affine-batch-v4` file The same prompt/output token and control-text rules apply across all stages. Whole groups and SFT traces share the file-wide prompt and rollout caps in stage order; each SFT trace counts as one prompt and one rollout for those caps and for the public counts of a crowned winner. A v4 example: ```json { "version": "affine-batch-v4", "hotkey": "", "stages": [ { "train": { "steps": 1, "sft_weight": 1.0 }, "groups": [ { "prompt": "\n\n", "rollouts": [ { "output": " \\boxed{}", "reward": 1.0 }, { "output": " \\boxed{}", "reward": 0.0 } ] } ], "sft": [ { "prompt": "", "output": " \\boxed{}" } ] } ] } ``` GRPO `groups` have the same shape as the flat example above. `sft` traces have exactly `prompt` and `output`. There is no miner-supplied SFT reward: the official grader must verify reward exactly 1 for a known prompt. Run the same `check --tokenizer ... --grade` command below; it checks every stage and trace. Only the crowned winner's exact batch file is published; waiting and losing seats expose no stage or SFT counts, content or train values. - UTF-8 JSON, at most 536870912 bytes. Top keys: `version`, `hotkey`, `groups`, and the optional `train` for flat formats; `affine-batch-v4` uses `stages` instead of `groups` as documented below. `version` is one of affine-batch-v1, affine-batch-v2, affine-batch-v3, affine-batch-v4. `hotkey` must be the owner of the object. - `groups`: a non-empty list of {prompt, rollouts}, with no other key. Each prompt is text with more than white space in it, and differs from every other prompt. Each prompt has at least 1 rollout: {output, reward}, with no other key. `output` is text. - <|im_start|>, <|im_end|>, <|endoftext|> may not appear in a prompt or an output. - Caps: 20000 prompts and 20000 rollouts. Whole groups are kept in file order while both caps hold. The other groups are dropped. All rules below apply to the groups that are kept. - Tokens: an output has at most 65536 tokens. Prompt + output has at most 69632 tokens: an output below the output cap counts 1 token more there, its end-of-sequence token. The prompt is counted with the exact chat messages, template and `enable_thinking=True` of scoring and training (section 2). Training reads at most 65536 output tokens and 69632 prompt + output tokens of a rollout. A longer rollout is valid: the trainer truncates it (section 2). - Reasoning: the reasoning of an output is the text before its first `\boxed`, or the whole output when it has none. A rollout with fewer than 32 reasoning tokens is answer-only. At most 0.05 of the rollouts may be answer-only. At least 0.5 of all output tokens must be reasoning. - Repeats: the final answer is the content of the last `\boxed{}`, with all white space removed. One final answer may be in at most max(32, 0.1 x rollouts) rollouts. - `reward`: a finite number. The rewards of one prompt must be small enough to take their mean. A reward must equal the grade that the official grader gives to (prompt, output). The allowed difference is 0. One wrong reward makes the whole file invalid. Only an output of exactly `params.max_output_tokens` (65536 tokens now) is an official cap-hit: its grade is 0. A shorter local serving cap (for example 8192) is not an official cap-hit; a correct boxed answer below the official cap can grade 1.0. At least 0 of the prompts must be tasks of the public pool (0 = no such rule). A prompt that is not a task of the pool has no official grade: its rewards are not compared with anything. - A rollout that the official grader cannot grade inside its time limit is not allowed in a file, whatever its reward: rule code `grader_time_limit`. - `no_signal`: your file must train something. A rollout trains when its advantage is not 0 and it has at least 1 output token inside the training caps. The advantage is the reward minus the mean reward of its group (`group_size`, section 2). A file in which no rollout trains is invalid. One rollout per prompt never trains. So the example above has two rollouts with different rewards. - With 2 rollouts per prompt, one official-head sample of 960 prompts produced 97 mixed-reward groups, a yield of about 10%; plan on about 5–8 times as many prompts as the mixed-reward groups you need, and the file needs 80 mixed groups. - `train_cost`: for v1-v3, cost = steps x the tokens of the rollouts that train. For `affine-batch-v4`, resolve each stage's recipe after top-level and stage overrides, then sum `steps * (grpo_tokens + sft_tokens) + grpo_tokens` across stages. The added GRPO tokens count its q_old rescoring pass; SFT needs no such pass. Both active GRPO rows and positive-weight verified SFT traces contribute their trained tokens to their stage and to `min_signal_rollouts`; an SFT trace with `sft_weight=0` contributes neither. The token-count rule for one row is the same for either form: the tokens of one rollout or trace are its prompt tokens plus its output tokens. room = min(65536, 69632 - prompt tokens). An output shorter than the room counts its tokens + 1 (the end-of-turn token). An output as long as the room or longer counts the room. A GRPO rollout with advantage 0 counts 0. Thus v1-v3 compare `max_train_token_steps` with `steps x tokens`, summed over the kept training rows; v4 uses the formula above for each stage and sums those costs. - Worked example of the live cap 22,130,000: with steps=16 the token budget is 1,383,125 (integer floor). Official check --tokenizer rejects a large/long mixed-reward batch whose steps × kept trained tokens exceeds that cap, even if the same file would pass at default steps=1. Do not add long rollouts for KL margin without rechecking train_cost with your chosen steps. A file with a cost above 22130000 token-steps is invalid. To get below the cap: fewer steps, fewer rollouts, or shorter outputs. The rule needs token counts, so `check` runs it only with `--tokenizer`. - Two limits keep the training of a round short: the training time of the round (60 minutes for all batches, section 3) and this cost cap for one file (22130000 token-steps). - The cost does not count `minibatches`; more minibatches mean more updates at the same token cost. The v4 formula includes GRPO's q_old rescoring pass. Each update also has a fixed cost of its own, about 0.1 s. That number is an estimate and not a measured value. So steps x minibatches updates add about 0.1 s x steps x minibatches to the training of your file, and no rule of the file check counts that time. A training that still runs at the end of the training time is stopped, and the batch is not judged in that round (section 3). Keep a margin of your own when you set `minibatches` high. - Nothing is repaired or clamped. The first rule that fails makes the whole file invalid. - Check a file before you upload it, with the same code as the validator: `python v2/miner/affine_miner.py check --mining-json mining.json --hotkey batch.json`. Add `--tokenizer ` for the token rules and `--grade` for the reward rule. `--grade` needs `--tokenizer`: only a token count can tell that an output stopped at the cap. `--tokenizer` also accepts the `/cache` parent made by `replicate fetch`: the tool selects its current-head `` directory and logs the path. Install, from a copy of the code (section 2): `pip install -e "v2[miner,envs]"`. ### Rule codes A check stops at the first rule that a file breaks. The `check` command names that rule. The validator publishes only `file_valid` (section 4), not the rule. The rules run in this order: | rule code | the file is invalid when | | --- | --- | | `size` | the file is empty or larger than the byte cap | | `json` | the file is not UTF-8 JSON | | `nonfinite` | the file holds NaN or Infinity | | `top_keys` | the top level is not an object with exactly version, hotkey, groups (stages for v4) and (v2+) the optional train | | `stages` | v4 stages is not a list of 1 to max_stages objects, or a stage has wrong keys or no groups/sft | | `stage_train` | a v4 stage train has a key other than lora_lr, adam_eps, steps, minibatches, group_size, sample_temperature or sft_weight | | `sft_keys` | an SFT trace does not have exactly the keys prompt, output | | `version` | version is not a known format | | `train` | train is not an object, has a key that is not settable, or has a value outside its published bound | | `hotkey` | hotkey is not the owner of the stored object | | `groups` | groups is not a non-empty list | | `group_keys` | a group does not have exactly the keys prompt, rollouts | | `prompt` | a prompt is not non-empty text | | `duplicate_prompt` | two groups have the same prompt | | `rollouts` | rollouts is not a non-empty list | | `rollout_keys` | a rollout does not have exactly the keys output, reward | | `output` | an output is not text | | `reward` | a reward is not a finite number, or the rewards of one prompt are too large to take their mean | | `cap` | the first group alone is larger than the rollout cap | | `text` | a prompt or an output is not valid Unicode text | | `control_token` | a prompt or an output holds a chat control token | | `tokenizer_fault` | a prompt or an output makes the tokenizer fail; checked again at a try to open a round, at most once each 10 minutes; after 3 failed checks in a row the verdict stays until a new file is uploaded | | `output_tokens` | an output is longer than the output token cap | | `context_tokens` | prompt + output is longer than the context token cap | | `answer_only` | too many rollouts have almost no reasoning before the first boxed answer | | `reasoning_share` | too small a share of the output tokens is reasoning | | `answer_repeat` | one final answer is in too many rollouts | | `sft_unverified` | an SFT prompt is unknown to the grader, its official reward is not exactly 1, or the grader cannot verify it | | `sft_too_long` | an SFT output is exactly max_output_tokens or would be cut/dropped by the training token caps | | `no_signal` | no rollout has a reward that differs from the mean reward of its training group, so nothing trains | | `min_rollouts` | too few rollouts have a nonzero advantage; the floor is min_signal_rollouts | | `null_update` | when min_step_norm > 0, the miner's global_norm_cap is below it, so the stored update cannot be large enough to judge | | `train_cost` | steps times the tokens that the trainer runs through the model is above the training cost cap | | `grader_time_limit` | the official grader cannot grade a rollout inside its time limit; checked again at a try to open a round, at most once each 10 minutes; after 3 failed checks in a row the verdict stays until a new file is uploaded | | `grader_fault` | a rollout makes the official grader fail; checked again at a try to open a round, at most once each 10 minutes; after 3 failed checks in a row the verdict stays until a new file is uploaded | | `grader` | a reward is not the official grade | | `pool` | too small a share of the prompts are tasks of the public pool | | `check_fault` | the file makes the checker itself fail, at any step; checked again at a try to open a round, at most once each 10 minutes; after 3 failed checks in a row the verdict stays until a new file is uploaded | Not a final verdict: `grader_time_limit`, `grader_fault`, `tokenizer_fault`, `check_fault`. Such a code comes from one check on our machine at one moment, so the validator checks the file again when it tries to open a round, at most once each 10 minutes. A failed check is counted only when our checker passes its own known-good case at that moment. After 3 counted checks in a row that fail at the same place of the same file, the verdict stays until you upload a new file. A new file is checked at the next try, with no wait. With such a code, before and after that, a round does not take the file: you are not charged, and the seat is skipped as with any invalid file (section 4). The validator does not publish the code or the count: you see only `file_valid`. Every other code is final for those bytes: upload a new file. ### How to make rollouts A rollout is one sampled answer of a model to a prompt, with its reward. This is one way to make a file that is valid and that trains. Each step says what the code of the validator does with your choice. To see what the file does before you upload it, train and score it on your machine (section 10). - Model: sample from head M. Get its files as section 1 says. The trainer scores your tokens under head M, and a token outside the support of head M does not train (section 2). The head has a VL-shaped architecture: disable image and video inputs in vLLM serving, evaluation and miner sampling with the exact option `--limit-mm-per-prompt '{"image":0,"video":0}'`. The official evaluator and miner Generator search already pass it. - Prompt: the trainer and scorer use the same chat messages and template options (section 2). For a task of the pool, `task_for_prompt` also recognizes the bare problem for grading. The recommended stored `prompt` is the official `MathPool.task.batch_prompt()`: `MANDATE + "\n\n" + problem`. Put the official instruction of section 6, a blank line and the problem in that one field. For your sampler, match the trainer's render: strip a leading official instruction + blank line from the stored `prompt` if present; render system = the official instruction, user = the problem; then apply the head's chat template with `add_generation_prompt=True` and `enable_thinking=True`. Do not apply the template to the raw stored `prompt` as a single user message. Sample on-policy with those exact tokens. - Bare-problem and other stored-prompt forms stay valid. The miner `check` warns when a stored prompt maps to a pool task but differs from its official `task.batch_prompt()` text. - Sampling: use the temperature that you state in `train.sample_temperature` (default 1), top_k 20 and top_p 0.95. These are the settings of the support (section 2). The sampler must work as the support does: top_k first, then top_p over the tokens that are left. Then each token that you sample is in the support of head M on your machine. On the box the logits come from other hardware, so a token at the edge of the support can be outside it there; no run has measured how often. No rule checks where an output comes from: text of another model or of other settings is valid, and only its tokens in the support of head M train. - Output: `output` is the text that the model wrote after the generation prompt: its tokens decoded with the special tokens kept (`skip_special_tokens` false), so that `` and `` are in the text, and without the final `<|im_end|>`. The trainer encodes this text again and adds the end-of-turn token itself (section 2). It trains on the tokens of that encoding, which are the tokens that you sampled only if the text encodes back to them. - Stop: let the model end by itself, or stop it at 65536 tokens (`params.max_output_tokens`). Only an output of exactly that many tokens is an official cap-hit; a longer output is invalid. A shorter local serving cap (for example 8192) is not an official cap-hit: below the official cap, a correct boxed answer can grade 1.0. - Live pool: sample from the official-active set shown in the start-here section, not the stale bundled active-list approximation. `python v2/miner/live_pool.py --out tasks.jsonl` resolves verified base and reserve bodies and official stored prompts. The reference `miner/kit/generate.py` defaults to that live pool; local mode requires explicit `--pool local`. It picks a random seed and prints it unless `--seed` is set. - Reward of a pool task: the official grade, 1.0 for a pass and 0.0 for every other result. Take it from the grader itself, `sn120_v2.envs.math_grader.grade(task, output, capped).reward`, with `capped` true only for an output that reached `params.max_output_tokens`. `task` is a `Task` or a mapping with string `task_id`, `slice`, `problem` and `answer` fields. Or let the `check` command compare your rewards (`--tokenizer` and `--grade`, above). The grader reads the same `output` text. - Signal: give a prompt two rollouts or more, with different rewards. The advantage is the reward minus the mean reward of the group, so a group in which all rewards are equal trains nothing. - Length: the trainer reads the room of section 2 and no more. It cuts a longer output there and takes it as a rollout that did not end; with a negative advantage the derail rule then applies to it. The cost rule above counts the same tokens. - Before each upload, run the `check` command with `--tokenizer` and `--grade`. It runs the check of the validator. It does not train. ### Duplicate and null batches This section covers both the file-check rules and the terminal outcomes `duplicate` and `null_update`. A frozen file can also fail another admission rule first; the rule table above gives that order. - Minimum signal: after `no_signal` rejects a file in which nothing trains, `min_rollouts` rejects a file with fewer than 1 rollouts with a nonzero advantage and at least one usable output token inside the training caps. The configured minimum signal is 1; `minibatches` adds no admission floor. With fewer active rows than requested minibatches, training makes fewer nonempty minibatches rather than rejecting the file. Without tokenizer checks no rollout is known to be dropped by the training caps. This admission rejection is invalid and uncharged: the seat keeps its place, and no training GPU is used. Upload a new file with enough signal rather than equal-reward filler, whose zero-advantage rows do not count. - Stored null update: after training, a stored `step_norm` that is not finite is terminal `null_update`. It is charged, cannot win or be paid, and is not a candidate or keeper in Stage B. There is no minimum norm. - Duplicate filtering is on (`dedup_enabled`). Stage A runs immediately after the files are frozen and before the entropy read, training tickets or GPU work. Exact equal `batch_sha256` is a duplicate even when rollout evidence is unavailable. Otherwise each rollout becomes a (prompt, output) pair: strip its ends, collapse each whitespace run to one space, and ignore rewards. Compare the distinct normalized sets by intersection size / the size of the smaller set. Overlap >= 0.5 (`dedup_rollout_overlap`) is a duplicate; exact equality is not required. - Stage A compares with earlier batches in this round and with the exact hashes and available normalized sets of the past winners in the current payout window (the last 10 distinct king UIDs, section 7). A past winner always keeps its position against a later copy. Reusing a past winner's rollouts counts as a duplicate even from the same hotkey: a king resubmitting >= dedup_rollout_overlap of its own already-applied rollouts is dropped as `past_king_rollout`, or `past_king_exact` for the same batch bytes. Within the round, greedy priority is (first_seen, queue_pos): the first `first_seen_unix` recorded for valid batch bytes in UTC, then `queue_pos` to break ties. Files already waiting when this ledger starts all receive its first post-deployment check time, so queue position breaks their tie. Once kept, that entry remains the keeper for later comparisons; dropped entries never become comparison anchors. A half-and-half mixture (0.5 of each) of two kept honest batches is itself the only copy; it cannot drop either part through a dropped mixture. Priority is not a proof of who generated rollouts first. - Stage B runs on trained, verified LoRA artifacts after Stage A and the null-update exclusion. It compares the cosine of the whole scaled LoRA delta-W across target modules, computed from A and B without materializing delta-W. With the same verified training seed, cosine >= 0.135 (`dedup_cos_shared_seed`) is a duplicate. With own or mixed seeds, the threshold is 0.002 (`dedup_cos_own_seed`). The same greedy (first_seen, queue_pos) priority applies. Missing or unusable evidence does not create a duplicate. - A dropped copy has status `duplicate`: it is charged, cannot win and receives no payout. This applies to a copy found before training as well as one found by Stage B. A duplicate never displaces its keeper merely by scoring higher. Regenerated or rewritten rollouts are new evidence, not an exemption: judge them by the same hashes, normalized sets and update cosine. Changing whitespace or rewards alone does not avoid normalized overlap. - KL(new||head) summed over the first 8192 completion tokens of each of the kl_k sampled rollouts, divided by the total number of those tokens (the published kl_tok), must be at least 0.0014 nats per token, else the entry is a charged null_update. The public round output publishes every entry's kl_seq, kl_seq_se, kl_tok, kl_k and kl_tokens. - Training targets must not reproduce other pool tasks' text or reference answers: more than recite_max_share (0.05) of target 10-grams matching active-pool task text (own prompt excluded) blocks a crown. Per-token KL vs the head is capped at max_kl_tok (0.25) nats/token. - Public duplicate evidence never includes batch content, prompts, outputs, rewards or the normalized rollout hashes. `duplicate_clusters` in the open/closed round objects of mining.json and in the round file has one `keeper` and a `dropped` list for each cluster. Each member publishes `queue_pos`, `uid`, `hotkey`, `batch_sha256`, `stage`, `similarity` and `first_seen_unix`; a dropped member also names `keeper_queue_pos`. Past-king keepers use the past-king sentinel queue position. Stage names are `exact_batch` (same batch sha256 as the keeper in this round), `rollout_overlap` (normalized rollout overlap with a keeper in this round), `past_king_exact` (same batch sha256 as a past king in the payout window), `past_king_rollout` (normalized rollout overlap with a past king in the payout window), `lora_cosine` (LoRA update cosine with a keeper in this round). All published times are UTC; `first_seen_unix` counts seconds from the Unix epoch. ### How to upload You upload with a sealed link: a public file that only the secret key of your hotkey can open. It holds a time-limited upload URL for your object. - Activation (one time): your hotkey must be an Ed25519 key. Run `python -m sn120_v2.links activate --wallet --hotkey ` to see the activation. Add `--execute` to write it to the chain. It costs the fee of one commitment. The chain shows it after about 3 minutes. An activation made for v1 stays valid: do not make it again. Install: `pip install -e "v2[links,chain]"`. - Where to get the link: https://affine.io/ff/links/.json. The file is public, but only the secret key of your hotkey opens it. The links job runs every minute. Each link works for 24 hours. The live index https://affine.io/ff/links.json gives the authoritative `reissue_every_seconds`. - A new registration gets its sealed link within about 5 minutes of the registration showing on chain (after activation), also while a round is open. The validator checks the waiting files once per round, right after the previous round closes and registrations are synced (`queue.files_checked_at` in mining.json); a file must be uploaded before that check to be judged for the next round. A file uploaded after the check waits for the next round's check. - You have a link while your hotkey is registered, has the activation, and its queue entry is not evaluated yet. You may upload again as often as you like. Each upload replaces the file before. The file that is stored when a round takes your entry is the file that is trained. - Open the link: `export AFFINE_PUT_URL="$(python -m sn120_v2.links open --hotkey --key --links-url https://affine.io/ff/links)"`. `open_link` is a CLI alias of `open`: `python -m sn120_v2.links open_link ...` has the same behavior. The Python function which decrypts a link document is named `open_link`; there was no earlier `open_link` CLI subcommand. Use either spelling; `--help` documents both. The seed file holds the 32-byte Ed25519 seed of your hotkey as 64 hex characters. A bittensor hotkey file that is not encrypted also works. Install: `pip install -e "v2[links]"`. - Upload: `python v2/miner/affine_miner.py upload --mining-json mining.json --hotkey --tokenizer --grade batch.json` checks the file, reads the URL from the environment variable `AFFINE_PUT_URL` and sends the file. Or use any HTTP tool: an HTTP PUT of the file bytes to that URL with the header `Content-Type: application/octet-stream`. The link is signed for that header: without it the store refuses the upload. - The opened URL is a secret. Anyone who has it can replace your file until the link expires. - HTTP 404 on your link file means one of three things: the hotkey is not registered, it has no activation, or its entry was evaluated. After a new registration or activation, wait for the next link file, within about 5 minutes. A hotkey whose entry was evaluated gets no link again (section 4). - After the upload, read `file_valid` in section 4. ## 6. Judging - All tasks are public. There is no hidden task set. - Base task-body catalog: 20,120 tasks in `sn120_v2/envs/math_pool_v2_1.jsonl` (sha256 `9c3010317c403da0f013e15d9420cab2c241d388f3325f3de8f0ad2cb5282a0a`). This bundled catalog is **STALE / test-only as an active list**: scoring draws from the live official-active pool in the start-here section, not from this file. For a live base task, scoring sends this instruction as the system message and the problem as the user message: "Solve the math problem. Reason step by step in plain text, then end your response with the final answer in `\boxed{}`. Emit exactly one `\boxed{}` block and nothing after it." - 1,454 tasks of the earlier pool (sha256 `8d34d276…`) were removed because their key is wrong, the problem is ambiguous or broken. The list is `sn120_v2/envs/math_pool_v2_1.dropped.json` in the code: https://github.com/AffineFoundation/affine/blob/v2/v2/sn120_v2/envs/math_pool_v2_1.dropped.json. A prompt that is one of the removed tasks is no longer a pool task. It has no official grade, and its reward is not compared, same as any non-pool prompt (see the `min_pool_prompt_frac` line). - A prompt of your file is a pool task when it is the problem text, with or without that instruction and one blank line before it. The official grader is `sn120_v2.envs.math_grader.grade(task, output, capped)`. It grades model outputs in scoring and the rewards in your file. `task` is a `Task` or a mapping with string `task_id`, `slice`, `problem` and `answer` fields. - Task rotation uses `affine-pool-rotation-v3`. Every active, reserve and non-withdrawn retired task is a public candidate. With enough known history, p is the IRT predicted head pass rate. A reserve row may publish `prior_p`; otherwise the configured prior is used. Score = p(1-p), Bernoulli Fisher information. Dead tasks (at least the configured head rollouts and zero passes) score zero. Saturated tasks keep their score; their retirement reason is `high`. Withdrawn active tasks leave outside the churn cap. The target is 10000: shrink and fill have no churn cap. Steady-state swaps need a strictly higher score and are capped at floor(rotation_churn_frac * target) = floor(0.1 * target). Ties use sha256(round_id|rank|task_id). Retired tasks may return by score and restore their archived IRT row. The complete ranking, next-up queue and summary are public. `python -m sn120_v2.replicate rotation --mining-json --round rNNNNNN` recomputes a decision from public inputs. - Pool quality guard (`info-guard`): a candidate enters the active pool only with a recorded guard PASS for its id and its current content hash. The sealed public ledger `public/pool/guard/.jsonl`, named by each round's `guard_ledger_sha`, is append-only: one public-safe row per decision (id, content hash, pass or reject, category, guard version, UTC date). Judge reasoning is never published. A short fill is recorded as `guard_shortfall`. `next_up` ranks every non-withdrawn candidate; `next_up_eligible` counts the next-up candidates that may enter. Guard decisions never remove active tasks. - Draw: 2000 tasks from the public pool of `math`. The king (null M) has 2 sample(s) per task; every LoRA has 1. The draw is a fixed function of the public sampler snapshot and the public round seed. Both are frozen at round start. Rebuild a draw with `sn120_v2.irt.draw_from_snapshot(snapshot, round_seed, n_tasks)`. - The IRT sampler gives each task a mass in proportion to sqrt(p(1 - p)), where p is the head's predicted pass rate on it, mixed with a uniform share of 0.1 over all tasks. Every task keeps a mass above zero; the published weights 1/pi keep the estimate unbiased. - Pairing: null M sample 0 and every LoRA run the same tasks with the same seeds. Later null M samples are king-only. The seed of rollout j on a task is the first 63 bits of sha256("||"), as a whole number; j counts from 0. - Decode: temperature 1, top_p 0.95, top_k 20, bfloat16, at most 65536 output tokens and 69632 prompt + output tokens. - Outcome of a rollout: `P` pass, `F` fail, `C` hit the token cap (not passed), `E` our infrastructure failed (not passed, stays in the count). - Estimator: d_t = lora_pass_t - mean(king_samples_t), where lora_pass_t and each king sample are 1 for PASS and 0 otherwise. delta = sum(w_t * d_t) / sum(w_t), with the published sampling weights w_t. se = sqrt(n / (n - 1) * sum((w_t * (d_t - delta))^2)) / sum(w_t). z = delta / se. Conditional on task and sample-0 pairing, Var(d_t) = Var(lora_t) + Var(king_t)/k - 2Cov(lora_t, king_t), for k king samples. The realized-d spread retains the same design-based standard error with HT weights. - Win rule (`crown_gate` = `argmax_symmetric`): duplicates are removed first (the existing dedup), and the round has one round-wide training seed. There are no minimum-signal or update-norm floors (`min_signal_rollouts` 1, `min_step_norm` 0); only non-finite or stored null updates and duplicates are removed. - Merged evaluation is unchanged. A LoRA crowns only with the highest delta among entries with delta above the tie tolerance (1e-12) AND z strictly above `z_crown` (1.5). `z_field_bar` is ignored. Early drops are disabled: every candidate is scored on the full draw, or the shared stop-limit prefix. The cap-hit (`cap_hit_floor`/`cap_hit_margin`), cover, full-draw and `min_scored_tasks` checks are anti-gaming pre-filters, not z gates. Here mean pass rate is the HT-weighted mean of per-task pass rates using the draw's sampling weights; each king task rate is the mean of its null runs, and `C` counts as not-pass. Between eligible candidates, the highest delta wins and a tie goes to the earlier queue position. - Anchors (easy-task regression check): rotation retires tasks the head solves, so each round also scores up to `anchor_n` (300) anchors: retired tasks only (never active, reserve or candidate tasks), not withdrawn, not rejected by the pool quality guard, whose body resolves, and whose measured head record while active (passes / rollouts) has at least `anchor_min_rollouts` (4) rollouts and a pass rate of at least `anchor_min_p` (0.8). The record is the measured one, not the IRT estimate. The pending crown's training prompts are excluded as from the gate draw. Up to 75 anchors come from records of at least `anchor_hi_p` (0.95), a share of `anchor_hi_share` (0.25); the rest from [`anchor_min_p`, `anchor_hi_p`); a short stratum is filled from the other. Within a stratum the rank is sha256("|anchor|"), smallest first. The round seed is taken after the round's batches are frozen. The `n_tasks` gate draw is unchanged; anchors are added at evenly spaced, seed-offset positions, weight 1, and the round names them (`round.anchors`, `draw.anchor_ids`, rollout rows with `anchor: true`). - Anchors never count toward delta, se, z, the cover/cap/full-draw checks, confirmation, the IRT update, rotation, retirement or admission, and a retired anchor stays retired. The box scores the whole task list, so the KL sample may include anchor rollouts (KL measures divergence from the head only). Per entry, the anchor delta, se and z use the estimator above on the anchors scored by that entry (each weight 1). Veto (one-sided): an otherwise-eligible entry is not eligible when at least `anchor_min_scored` (100) anchors were scored, se > 0 and anchor z is strictly below -`anchor_z_veto` (-1.645); the next-best eligible entry may win. With fewer anchors scored the check is "not evaluated" and vetoes nothing. - The eligible LoRA with the highest delta wins. A tie goes to the miner that was earlier in the queue. With no eligible LoRA, M stays and there is no new crown. - Paired crown confirmation with merge after confirmation (`confirm_next_round`, `merge_after_confirm`): a winner of round r is not merged into the head. Its LoRA is folded into a candidate that is not served for training; payout waits. In round r+1 miners train on and are judged against the unchanged head, which is null M. The candidate (the unchanged head plus the crown's LoRA, folded) and the unchanged head each run 2 fresh samples per task on the same draw. Below, new is the candidate and parent is the unchanged head. Parent sample k uses exactly the same seed and sampling configuration as new-head null sample k on each task. For each task, new_mean_t and parent_mean_t average their respective samples; d_t = new_mean_t - parent_mean_t. delta is the weighted mean of d_t; SE uses the paired-difference estimator above on those differences of sample means. Round r's winner outcomes are never inputs to confirmation. Confirm only when the weighted mean of new_pass - old_pass exceeds TIE_TOLERANCE (1e-12), fresh paired z is strictly above `z_bar` (0.5), and the pending crown's recorded crown-round z is strictly above `z_bar` (0.5). z == `z_bar` fails on both rounds. Exact ties and losses fail. Missing parent files or parent-scoring failures are unpaid no_decision, not confirmation and not a round failure. A failed or undecided crown is discarded and never touches the head; it is never re-tested. A confirmed crown's candidate becomes the head at its confirmation (head.json, mining.json head_chain). A crown that was folded into the head before this rule (a legacy pending crown) and then fails or has no decision is reverted: the head goes back to that crown's parent while the crown is still the head tip. The previous pending crown resolves first; then round r+1's own winner (z > z_crown against the unchanged head) becomes the next pending crown, re-tested in round r+2 on the head that is current then. Only a confirmed king joins the paid set, at its confirmation; the confirming round pays it no back-payment. The pending crown's winner-batch prompts are mapped with task.batch_prompt() and their task ids are excluded before the shared draw. Unmapped prompts are skipped without blocking round open. With no pending crown the draw is unchanged; disabled mode is immediate apply-and-pay. Every confirming round publishes new_head_pass_rate, old_head_pass_rate, n_tasks, delta, se, diagnostic z, paid and payout_status (paid for a confirmed king, otherwise unpaid) in round.json and mining.json's round/history confirmation block, including unavailable or failed parent cases. parent_outcomes is public too; parent rollout archives are optional. - Looks: scores are checked after 500, 1000, 2000 tasks. The win rule runs only at the last look. Argmax-symmetric has no early drops: looks drop no one on this gate. - When the time limit of the round stops the scoring, the win rule runs on the tasks scored by then, with no further look. With fewer tasks than the first look, there is no decision: `not_scored` (section 3). - If fewer than 0.95 of the rollouts of a LoRA resolve without an infrastructure error, its entry is `no_decision`. If that is so for null M, every scored entry of the round is `no_decision`. Neither is counted as a failure for the seat (section 4). - After 1 applied winner(s), the stacked LoRAs are folded into a new base. The validator publishes the LoRAs and the sha256 of every file of the new base and of the new fp32 master. It publishes the files themselves only for a checkpoint head (section 1). ### The scoring procedure - Merged-candidate evaluation: Each candidate is tested as the merged model round_bf16(fp32 king master + your LoRA update), built with the same arithmetic as the install fold; the model that is tested is bit-for-bit the model that is installed. Before this change the LoRA was applied at serving time on top of the rounded bf16 king, which rounded most of a small update away. Each candidate has its own vLLM server for its merged base; null keeps the bf16 king base. A GPU serves one model at a time and may switch after its in-flight work finishes. No runtime LoRA is loaded. The candidate's result records the merged base manifest hash and install kernel; promotion refuses a fold whose base manifest differs. This is everything that the box does to score a round, in the order in which it does it. The code is in four files: `sn120_v2/worker.py` (chunks, looks and the clock), `sn120_v2/gpu/evaluator.py` (servers, requests and outcome codes), `sn120_v2/envs/math_grader.py` (the grader) and `sn120_v2/judging.py` (the estimator and the rules). Section 10 has the command that runs this code on your machine. - Servers: an idle GPU may prewarm its normal vLLM server for null. A GPU never starts vLLM while its training job is active; after training exits it serves the candidate it trained, or null if it trained no candidate. Each merged model is served under its candidate's `lora_hash`; null is `null`. The servers run with `HF_HUB_OFFLINE` set. The vLLM version is the one that the `gpu` extra of `v2/pyproject.toml` names. The command of one merged server, without its local address: ``` python -m vllm.entrypoints.openai.api_server \ --model '' \ --served-model-name null \ --dtype bfloat16 \ --kv-cache-dtype fp8 \ --max-model-len 69632 \ --enable-prefix-caching \ --max-num-seqs 512 \ --limit-mm-per-prompt '{"image":0,"video":0}' ``` - Request: one POST to `/v1/chat/completions` for each model, each sample and each task of a chunk. The body is the same for null M and for a LoRA, but for `model`: ```json { "model": "", "messages": [ { "role": "system", "content": "" }, { "role": "user", "content": "" } ], "seed": "", "max_tokens": 65536, "temperature": 1.0, "top_p": 0.95, "top_k": 20, "skip_special_tokens": false, "chat_template_kwargs": { "enable_thinking": true } } ``` - `model` is `null` for null M and the `lora_hash` for a LoRA. The seed is the seed of the pairing rule above. Task i of the full draw (i counts from 0) goes to a free GPU according to the solo scheduler. A GPU may steal another candidate's remaining block. Null M sample 0 and every LoRA use the same task, sample and seed. - Null M (the king) runs 2 sample(s) per task; every LoRA runs 1. Sample 0 has the same seed for null M and every LoRA. Later king samples use their own seed and are not run for any LoRA. Only the adapter and the serving GPU can differ between paired rollouts. - The box feeds 512 concurrent requests to each server (`max_num_seqs`), subject to the local file descriptor limit. A server runs at most `--max-num-seqs` of them at a time; the others wait in the server. The time limit of one try of a request is 3600 s (`eval_time_budget_s`), or the time that is left to the stop time of the round, when that is less. - Reply: with `finish_reason` `stop` the model ended by itself. A final `<|im_end|>` is removed from the text, and the grader grades the text. With `finish_reason` `length` the model hit the token cap: the outcome is `C` and the text is never graded. A reply of any other form is not usable. - A request is sent again after a failure of the connection, a time limit, an HTTP status of 500 or above, or a reply that is not usable: at most 3 tries in all. After an HTTP status below 500 it is not sent again. A request with no usable reply has the outcome `E`. One exception: when the stop time passed during the chunk and a request has no reply, the whole chunk is not used (section 3). - Grader: `sn120_v2.envs.math_grader.grade(task, output, capped)`, version `math-verify-0.9.0+lenient-v1`. `output` is the text of the reply, with the special tokens kept. The strict format is: one `...` block first, then exactly one balanced, non-empty `\boxed{}` with nothing after it. math-verify compares the boxed answer with the reference answer of the task. When the answer is not yet right, the lenient rules try again: P1 and P2 find a box that the strict format refused, and E1 to E7 accept other common ways to write the same answer. That file states each rule and the version of each package that the grader needs; with another version the grader refuses to run. The grade is `P` or `F`, or `E` when the grader itself cannot decide: it cannot parse the reference, math-verify raises an error, or a time limit of the grader passes. Such an `E` is final: the text is not graded again. The grader does not know which model wrote a text. - A grade that is lost because a worker process of the grader died is not an outcome. The reply is graded again: at most 3 grades in all. When a worker still dies, the chunk failed. - Streaming: tasks are claimed in draw order by the solo scheduler and may be served or stolen by any free GPU. Each model is graded in draw order; a look is judged only after null and that model have all samples through the exact look size. Speculation past a look is allowed, but results after a drop are discarded and never appear in the outcome strings. - Cutoff blocks: for the stop-time prefix, tasks are grouped in blocks of 500 tasks (`eval_chunk_tasks`). Only a complete block shared by null and every open LoRA is used. This is not a scheduling barrier (section 3). - A failure of the box in a chunk (a server died, a LoRA did not load, the grader failed) is not an outcome. The chunk runs again: at most 3 runs in all. When each of them fails before the stop time, the box stops with an error and the round has no result (section 4). A run that fails after the stop time ends the scoring, and the chunk is not used. - Outcome strings: each model has one string for each sample: null M has `null_samples_per_task` strings (or `samples_per_task` when it is null), and every LoRA has `samples_per_task`. A string has one character for each task, in the order of the draw: `P`, `F`, `C`, `E`, or `-` for a task that was not run. - Estimator, in full: n is the number of tasks that the LoRA answered. They are the first n tasks of the draw. The pass rate of a model on a task is the share of its samples with `P`. The sums of the estimator above run over these n tasks, with the weights w_t of the draw. When se is 0, z is 0. - Argmax mode has no early drops: every candidate is scored on the full draw, or the shared stop-limit prefix. - Argmax-symmetric win rule, in full: duplicates are removed first by the existing dedup, and the round uses one round-wide training seed. There are no minimum-signal or update-norm floors (`min_signal_rollouts` 1, `min_step_norm` 0); only non-finite or stored null updates and duplicates are removed. Merged evaluation is unchanged. A LoRA crowns only with the highest delta among entries with delta above the tie tolerance (1e-12) AND z strictly above `z_crown` (1.5). `z_field_bar` is ignored. Early drops are disabled, so every candidate is scored on the full draw or shared stop-limit prefix. The cap-hit (`cap_hit_floor`/`cap_hit_margin`), full-draw, cover and `min_scored_tasks` checks are anti-gaming pre-filters, not z gates. Here mean pass rate is the HT-weighted mean of per-task pass rates using the draw's sampling weights; each king task rate is the mean of its null runs, and `C` counts as not-pass. Threshold calibration is provisional. - Win rule, in full. A LoRA is eligible when all of these are true. It has an outcome for every task of the draw, or, when the stop time ended the scoring, for every task that null M has an outcome for; a LoRA that was dropped at a look does not. n is at least `min_scored_tasks`. its delta above the king must be greater than the tie tolerance (1e-12), and its se must be positive and z strictly above `z_crown` (1.5). (its count of `C`) / (n x LoRA sample count) <= max(`cap_hit_floor`, (the count of `C` of null M on the same n tasks) / (n x king sample count) + `cap_hit_margin`), where the LoRA denominator is n x `samples_per_task` and the null M denominator is n x its number of outcome strings. Each side is divided by its own denominator. This test uses exact fractions of whole counts, and each parameter as the decimal number that is written here: a share exactly on the limit passes. - Cover, in full: (rollouts - the count of `E`) / rollouts >= `min_cover`, as exact fractions, for null M on the tasks that it answered and for a LoRA on its n tasks. - Winner: the eligible LoRAs are read in queue order. A later LoRA takes the place of the best one so far only when its delta is higher by more than 1e-12. - The box does not pick the winner. The controller computes every score again from the outcome strings (`sn120_v2.judging.decide`). The round file (section 9) holds the draw with its weights (`draw`), the outcome strings of null M (`null_outcomes`) and those of the winner (`winner_outcomes`). With `sn120_v2.judging.score_entry` you can compute the scores of the winner again. The round file also holds the outcome strings of every other entry that was scored (`entry_outcomes`: queue position, UID, hotkey, LoRA hash, one string per sample). After the round closes, the eval rollouts (prompt, completion text, extracted answer and outcome for each task and sample) of null M (`public/rollouts/gate//head.jsonl.gz`), the winner (`winner.jsonl.gz`) and every scored entry (`entries/.jsonl.gz`) are published, listed with sizes and sha256 in `public/rollouts/gate//meta.json`. Training batches stay private; only the winner's batch is published (`public/rounds//batch.json`). - What a scoring of your own repeats: the draw and its weights, the seed and the body of each request, the grade of a given text (but for a time limit of the grader), and each formula above. It does not repeat the text of a rollout: the same request with the same seed can give another text on another machine or at another time, and no run has measured how often. So your outcome strings and your delta can differ from those of the box. The tests of the code start no vLLM server: they put a stand-in in its place. The box runs vLLM on GPUs. ## 7. Payout - A king is a round winner that was applied and then confirmed in the next round. The window is the last 10 distinct king UIDs. Pending and failed crowns are never paid. A confirmed UID that wins again keeps one place, with its newest win. - Each paid king gets an equal share of all the weight, while the hotkey that won is still registered on that UID: 1 / (the number of such kings). - The share of a paid king that is no longer registered is split among the other registered paid kings. - From `r000098`, each round with no new king (the king held) removes the oldest king from the paid set, down to one. A confirmed king joins the paid set at confirmation (and pushes out the oldest if 10 are paid); there is no back-payment. Pruned kings return only by winning and confirming again. Rounds without a decision (operator stop, failure) do not prune. Paid kings split the weight equally. - Current paid set, newest first. Registration of each winning hotkey is checked when the writer sets weights. | uid | round_id | | --- | --- | | 510 | r000209 | - No burn, in any case: no weight goes to UID 0 or to the owner as a fallback. If no paid king is registered, the writer sets nothing and the last valid weights stay on chain. - One writer sets the weights, with one attempt each 3600 s. If the chain read fails or is not complete, or the state does not load, that attempt sets nothing and the last valid weights stay on chain. - A newly paid king first gets weights from the next hourly write (:05 UTC); with commit-reveal that shows in incentive one to two epochs later (about 1–2.5 h after the round closes). | uid | hotkey | round_id | head_version_id | applied_at | z | | --- | --- | --- | --- | --- | --- | | 510 | 5CG9m8cWQdRpBbs7FpW5GUNYSikyguTg2qssjvCZgbarPK6J | r000209 | 328c2f8e52fc8c09cad7c75bcc3ad6bb092c45f1cd8f322aefc2800fab28cbe8 | 1796094116 | 1.90723 | | 239 | 5GYGmDSjcPREbsMKnDiJj7RZoTNPVRdsoSfSV5jkWwmUmVV4 | r000197 | 447858dca790b787c5fe15afed414530425242f3d4e6f9343e885e31dd155ee2 | 1796026410 | 2.1844 | | 48 | 5E6i9mJwcbLgMPqdYTrvreyWknh3Vj8gixuzVNLdnhy3LLgR | r000192 | 5b50de563d8de2951cefa9d931da3688eadbfb867bd336b95e4d365589d1b3f1 | 1796004258 | 3.19402 | | 394 | 5DZW3pijeVEWAgZLbHgKkGGEpPTCej6e1ZxJwE5taARCUKwX | r000191 | 29f613a3ab8259c5d02fcfe46d0045857e53a4f89ec8aea409c0aaff387a4230 | 1795998727 | 2.08751 | | 932 | 5CSNzjxkxYv7PptoHXbMaJ5RN6UDspMVH4g9e7X9K3o4XKwW | r000190 | 9d087f548ac98891e424e6a9f134a26aea98cfa725263e21be812f265f9045c8 | 1795991790 | 1.63311 | | 141 | 5GiWsgLMFMT71xXMBdVko1HUscs1PdUZReu4eXrHsRyZyrtj | r000175 | 2ac6f89da682b5b2976b45dee6032f3dea8a4997cbe396b928d7f428c47ed35c | 1795889538 | 2.42333 | | 870 | 5D8U7ogfpksn3gHTFUw2WuZNAZXwxES3BqQX4f3GUHj4f2n6 | r000168 | a17c14b20f54383f419b2d8689ec1395363b947c97690d80b9bba057a36e1251 | 1795831518 | 2.14993 | | 809 | 5DwEKyKML7MwbN6Yyh8CcPE8FNpZqbPcvfYJvtzrVxyEzvPz | r000160 | 897f30390c880db65aa9040822740d1b1cf45fbfddba976c76ec85dd2309a99d | 1795787001 | 1.08135 | | 678 | 5HbExDsRhWtBdbTSiZ5dWGKhXQCPpojmqNuMRMLPaXwB4uRd | r000149 | d8a639c1aff542262118d993b8262b2c8ae1e1d6563deae7a21c04df62c14844 | 1795742868 | 1.77426 | | 638 | 5GckAYP6VyPBBhPDyhiaJ6DYG6FMzSJ4b8A3YWqTjPGXLN4N | r000145 | a53145bd66f3cf8b2f3ea005d49938338bdad2322f210ec74a186ece29dcbc1b | 1795718138 | 1.59174 | ### Crown confirmation record After-the-fact record: each applied crown, its original paired z and delta, and the fresh paired test in the next round that decides payment. A crown is paid only if that test passes. Crowns before the confirmation rule are omitted. `pending` has no next-round test yet; `no_decision` means that test could not run for an infrastructure reason, so it is unpaid and has null confirmation z/delta. Bands, cumulative rows and the total rate include only completed paid/unpaid tests. A crown that is no longer in the current paid window still has `paid=true`: this records the result of its test, not a separate or new payout rule. | band | n | paid | rate | | --- | --- | --- | --- | | z < 1.0 | 8 | 0 | 0% | | 1.0 <= z < 1.25 | 3 | 1 | 33% | | 1.25 <= z < 1.5 | 3 | 1 | 33% | | 1.5 <= z < 2.0 | 19 | 9 | 47% | | z >= 2.0 | 9 | 5 | 56% | | minimum original z | n | paid | rate | | --- | --- | --- | --- | | 0.5 | 42 | 16 | 38% | | 1.0 | 34 | 16 | 47% | | 1.25 | 31 | 15 | 48% | | 1.5 | 28 | 14 | 50% | | 2.0 | 9 | 5 | 56% | Resolved tests: 42; paid: 16; rate: 38%. Pending: 0; no_decision: 5. Lowest paid original z: 1.081; highest unpaid original z: 2.640. This record is descriptive, not a rule change. The crown bar is strict `z > 1.5` (`z_crown`); the confirmation bar is strict `z > 0.5` (`z_bar`). Last 30 crowns, newest first. `confirmation z` and `confirmation delta` are the next round's fresh paired test. | round_id | uid | z | delta | status | confirmed | confirmation z | confirmation delta | paid | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | r000210 | 515 | 1.792 | 0.0162 | unpaid | no | 0.051 | 0.0004 | no | | r000209 | 510 | 1.907 | 0.0171 | paid | yes | 1.303 | 0.0096 | yes | | r000205 | 269 | 2.312 | 0.0204 | unpaid | no | -1.090 | -0.0078 | no | | r000197 | 239 | 2.184 | 0.0195 | paid | yes | 2.353 | 0.0173 | yes | | r000192 | 48 | 3.194 | 0.0292 | paid | yes | 0.633 | 0.0046 | yes | | r000191 | 394 | 2.088 | 0.0196 | paid | yes | 0.566 | 0.0044 | yes | | r000190 | 932 | 1.633 | 0.0154 | paid | yes | 1.908 | 0.0149 | yes | | r000188 | 381 | 2.640 | 0.0239 | unpaid | no | 0.012 | 0.0001 | no | | r000183 | 702 | 1.817 | 0.0193 | unpaid | no | -1.410 | -0.0121 | no | | r000181 | 676 | 1.811 | 0.0202 | unpaid | no | 0.478 | 0.0044 | no | | r000179 | 828 | 1.629 | 0.0181 | unpaid | no | -1.895 | -0.0174 | no | | r000176 | 224 | 1.578 | 0.0178 | unpaid | no | -0.454 | -0.0042 | no | | r000175 | 141 | 2.423 | 0.0269 | paid | yes | 0.886 | 0.0080 | yes | | r000173 | 122 | 1.592 | 0.0179 | unpaid | no | -0.742 | -0.0071 | no | | r000172 | 937 | 1.564 | 0.0174 | unpaid | no | 0.409 | 0.0038 | no | | r000171 | 903 | 1.648 | 0.0187 | unpaid | no | 0.360 | 0.0034 | no | | r000168 | 870 | 2.150 | 0.0254 | paid | yes | 1.176 | 0.0108 | yes | | r000163 | 829 | 21.867 | 0.2699 | no_decision | no | none | none | no | | r000160 | 809 | 1.081 | 0.0130 | paid | yes | 1.576 | 0.0149 | yes | | r000158 | 777 | 0.967 | 0.0117 | unpaid | no | 0.268 | 0.0026 | no | | r000153 | 744 | 0.963 | 0.0114 | unpaid | no | -0.051 | -0.0005 | no | | r000152 | 91 | 0.976 | 0.0114 | unpaid | no | -2.126 | -0.0206 | no | | r000151 | 719 | 0.640 | 0.0077 | unpaid | no | -0.298 | -0.0029 | no | | r000149 | 678 | 1.774 | 0.0210 | paid | yes | 0.888 | 0.0087 | yes | | r000147 | 219 | 2.095 | 0.0244 | unpaid | no | -1.132 | -0.0109 | no | | r000145 | 638 | 1.592 | 0.0191 | paid | yes | 1.088 | 0.0106 | yes | | r000144 | 523 | 1.479 | 0.0180 | unpaid | no | 0.193 | 0.0021 | no | | r000142 | 343 | 0.636 | 0.0076 | unpaid | no | -0.133 | -0.0013 | no | | r000141 | 492 | 0.732 | 0.0087 | unpaid | no | -0.089 | -0.0009 | no | | r000139 | 463 | 1.043 | 0.0127 | unpaid | no | -0.374 | -0.0037 | no | Machine-readable record: `public/confirmation-stats.json`; the same object is `confirmations` in mining.json. ## 8. The IRT snapshot The task table of the sampler is public for every round. It is one JSON object for each snapshot id: `public/irt/SNAPSHOT_ID.json`. mining.json names the id (`irt_snapshot_id`); it does not hold the table. - Snapshot of the last closed round: id `irt-62b619a2f736b6089744bd0fbc3f505d1da2a69c76496cda910582349110a387`, object `public/irt/irt-62b619a2f736b6089744bd0fbc3f505d1da2a69c76496cda910582349110a387.json`, https://affine.io/public/irt/irt-62b619a2f736b6089744bd0fbc3f505d1da2a69c76496cda910582349110a387.json - Model: rasch: P(pass) = 1 / (1 + exp(difficulty - ability)). The object holds the ability of each head and LoRA, and for each task: difficulty, information, rounds_seen, sampling_mass. - Mass rule: q(task) = sqrt(p * (1 - p)), p = predicted_pass(head_ability, difficulty); mass = max(1, round(((1 - uniform_frac) * q / sum(q) + uniform_frac / pool_size) * 1000000000000)); the uniform share applies to every pool task, and every mass is an integer above zero; MASS_SCALE = 1000000000000. - Draw rule: pi(task) = min(1, n_tasks * mass / total mass), fixed size n_tasks, systematic sampling on the pool ordered by sha256('|irt-order|'), start = sha256('|irt-start') mod total mass; published weight = 1 / pi; evaluation order by sha256('|draw|'). - A round names its snapshot (`irt_snapshot_id`) and its seed (`round_seed`) in section 3, in `history` and in its round file. With the snapshot object and the round seed you can rebuild the draw of the round. ## 9. Objects and how to verify them | object | key | | --- | --- | | llms_txt | public/llms.txt | | mining_json | public/mining.json | | winner_stats | public/winner-stats.json | | confirmation_stats | public/confirmation-stats.json | | current_head | public/head.json | | head_manifest | public/heads/VERSION_ID.json | | base_file | public/bases/BASE_HASH/FILE | | master_file | public/masters/MASTER_DIGEST/FILE | | lora_file | public/loras/LORA_HASH/FILE | | round_file | public/rounds/ROUND_ID/round.json | | winner_batch | public/rounds/ROUND_ID/batch.json | | irt_snapshot | public/irt/SNAPSHOT_ID.json | - A file set (base, fp32 master, LoRA) has the id sha256(canonical JSON of {file name: sha256}). Check each file hash, then the id. The fp32 master has its own prefix: do not put it in the directory of the base. - `version_id` of a head is the sha256 of the canonical JSON of the head object without `version_id`. - Only a crowned/applied winner has a public batch, and with it public `train` values. For every other entry the round file shows the decision, batch sha256 and available scores. `duplicate` and `null_update` are charged and cannot win or be paid. Duplicate clusters publish only the identity and comparison fields listed in section 5; they never publish batch content. Waiting seats get only their own stored-file SHA256 and verdict check time, never stage counts, SFT counts or SFT verification details. Losing entries likewise expose no stage plan. - `public/winner-stats.json` is `sn120-v2-winner-stats-1`: integer Unix UTC `generated_at` and a newest-first `winners` list covering the same last 20 closed rounds as `mining.json` (not an all-time archive). Each row has `round_id`, `uid`, `hotkey`, `applied_at`, `z`, `delta`, `se`, `head`, `lora`, `batch_sha256`, `batch_prompts`, `batch_rollouts`, `batch_format`, winner-only `train`, `batch_url`, and confirmation/paid flags already in state. `batch_url` is the public `public/rounds//batch.json` object. When readable and SHA-verified, optional best-effort fields are `group_count`, `boxed_frac` (exactly one final balanced nonempty `\boxed{}`), `output_chars_p50` (median Python character count, not tokens), `prompt_sources` (per-prompt source-prefix counts including `unmapped`) and `prompt_band` (mapped prompt counts `low`, `middle`, `high` by that crown round's IRT middle band; absent for non-band IRT). Missing, unreadable or mismatched public data omits these fields and never blocks publication. `winner-stats.json` at the site root is byte-identical to `public/winner-stats.json`. Losing, waiting, queued, invalid and unapplied batches are never read for these fields or represented here. - In a round file each entry has a `reason`. The round has a `note`, and a `reason` when it has a result. The `note` is empty unless the round had no result or has the outcome `abandoned` (section 4). These texts give a cause in words, for a person to read: the class of an error and its message. Before the validator publishes such a text, a marker replaces each part that it takes for private (`[removed-secret]`, `[removed-login]`, `[removed-query]` for the query string of a link, `[removed-address]` for an IP address), and a text of more than 600 characters is cut there and ends with a note of how many characters were cut. The same rule applies to the `reason` of a round in mining.json and in section 3. To decide what applies to your seat, read `outcome` and `status`, not the words of a text. - The LoRA of a winner has a download link while it is stacked on the head, and after its fold for as long as a rebuild of the head needs it: until a newer head is a checkpoint (section 1). ## 10. Train and score your batch at home `python -m sn120_v2.replicate` takes your file, checks it as the validator does, trains the LoRA from head M, scores the LoRA and null M on the tasks of a round, and judges the result with the win rule. It has no training code and no scoring code of its own: it runs the code of the box (the procedures of section 2 and of section 6) on your GPUs. So the GPU backend is published: it is the code under `sn120_v2/gpu/`, and this tool builds it for a machine that is not the box. The document of the tool is `v2/REPLICATE.md` in the code: https://github.com/AffineFoundation/affine/blob/v2/v2/REPLICATE.md. It has every argument, the fields of the report, and the complete list of what differs from the box. - Fresh clone, from the repository root: `git clone https://github.com/AffineFoundation/affine`, then `cd affine && git switch v2`. In a clean Python 3.12 venv, `python -m pip install -e './v2[gpu,envs,r2]'`. If an old torch pin conflicts, use a clean venv: `vllm==0.32.0` requires torch 2.13. Run each command below at that repository root; the editable install makes `sn120_v2` importable. No secrets are needed for these public reads. N is the number of your GPUs. - `python -m sn120_v2.replicate compare --mining-json https://affine.io/mining.json --gpus ` prints what differs between your machine and the box. It starts nothing and needs no GPU. - `python -m sn120_v2.replicate fetch --mining-json https://affine.io/mining.json --work ` gets the base files of head M through the signed links of section 1 and checks each file against the head manifest. With `eval_merged=true`, it also downloads and verifies the real fp32 king master, tens of GB, from `master` / `master_files`. Both sets are staged and renamed into cache only when complete. A later fetch retains correct files. The report gives base and master digests, directories, file counts and bytes. `--master-from ` can supply the master with `--from`; it is never replaced by an upcast bf16 base. The master is optional only when `eval_merged=false`. - `python v2/miner/affine_miner.py check --mining-json https://affine.io/mining.json --hotkey --tokenizer /cache --grade batch.json` checks your actual file and its token/reward rules before upload. - `python -m sn120_v2.replicate run --mining-json https://affine.io/mining.json --hotkey --work --gpus batch.json` checks the file, trains, scores and judges. For merged evaluation it verifies the master before training, uses `SoloRunner` to build the fp32-master + LoRA candidate, scores it against null M, then runs the official `gpu/kl.py` path. A missing or corrupt master fails before training. When either KL floor is enabled, the measurement uses up to `kl_rollouts` scored, non-error rollouts (the first scored sample of each task (default `kl_rollouts` 128 and, with `kl_max_tokens=0`, the full completion)); `kl_max_tokens` caps measured tokens per rollout. A positive `params.min_kl_seq` (currently 0) applies to mean `kl_seq`; a positive `params.min_kl_tok` (currently 0.0014) applies to summed KL divided by total measured tokens, `kl_tok`. When both floors are positive both must pass; equality passes. With both at zero no KL measurement runs. The report gives `kl_seq`, `kl_seq_se`, `kl_tok`, `kl_k`, `kl_tokens`, both floors and pass/fail in `kl_gate`, cap-hit details in `cap_hit`, and the one-batch result in `win_vs_null`. Add `--first-tasks ` for a one-GPU smoke test; fewer than `min_scored_tasks` cannot produce a winner. With no round argument it uses the open round, or the last closed round when none is open. There is no separate `replicate kl` subcommand. - **The file check does NOT train and does NOT measure `kl_seq` or `kl_tok`; a passing file check is NOT a passing KL gate.** Use `replicate run` above for the trained merged candidate and full live gate. The official floors are `params.min_kl_seq` and `params.min_kl_tok`, not fixed numbers in the miner tool. - **Training cost:** `max_train_token_steps = steps x tokens`, summed over kept training rows; minibatches do NOT multiply it. Worked example: cap 22,130,000 with steps=16 gives 1,383,125 tokens (integer floor). A bound's `decided` flag freezes the bound into `recipe_id`; you may still choose its value within the published range. - What differs from the box. The report of `run` names each difference under `differences`. Your install: the list of the packages of the box, with their versions, is not published, so in practice your install has another digest than the pinned one, and its versions of torch and vLLM can differ. The number of GPUs, when it is not 8. The time limits of a round: they do not apply unless you ask for them. The round has one batch, yours: `winner` in the report says that your LoRA beats null M by the win rule, not that it wins a real round, where the eligible LoRA with the highest delta wins. For such a difference the tool changes that one value in a local copy of the params. Each training value, each scoring value and each rule of the decision stays that of mining.json. - What a run cannot repeat exactly: the text of a rollout, and so its outcome code, and so `delta` and `z`; and the trained values of the LoRA, and so `lora_hash`. These depend on the GPU type, on the package versions and on the requests that a server computes together. Expect the same pass rate within the noise of sampling, not the same text for the same seed. What a run repeats exactly: the draw with its order and its weights, each seed, the prompt and the settings of each request, the rows that train with their advantages and tokens, the grade of a given text, and the decision for given outcome strings. - What is verified. The box trains and scores its rounds on GPUs with the code that `run` calls. The tool itself has not run on a real GPU yet. Tests run it on a CPU, with a stand-in for the training process, for the vLLM servers and for the grader. So it is not known which GPU is large enough, how long a run takes, or how close null M on your machine is to null M on the box. With `--round-file` and the round file of a closed round (section 9), the report compares the two, task by task. - A 100-task local delta has a standard error of about 5.3 percentage points, estimated from the public 2000-task SE scaled by √(n/100). - The miner tool can call the same code: `python v2/miner/affine_miner.py reproduce --mining-json mining.json --hotkey --irt-snapshot irt.json --round-seed --work --backend sn120_v2.replicate:backend batch.json`. This is the code of the box with the params as they are: the same trainer, evaluator, round runner and judging. It runs only on a machine with the pinned install, the pinned code and the GPU count of the params, so in practice only on the box. It needs the base files: run `fetch` with the same `--work` directory first. On any other machine use `python -m sn120_v2.replicate run`. - `python v2/miner/affine_miner.py bounds --mining-json mining.json` prints the bounds of section 2. ## 11. Every parameter Each value is pinned into a round when the round starts. The `train_seed_scope` formula is in section 2. The duplicate and null-update parameters are explained in `Duplicate and null batches` (section 5), and the machine-readable `contract.duplicate_policy` block repeats their thresholds and public evidence schema. | parameter | value | | --- | --- | | `netuid` | 120 | | `env` | math | | `env_pin` | none | | `batch_cap` | 6 | | `max_loras_per_box` | 32 | | `n_min_start` | 1 | | `n_gpus` | 8 | | `n_tasks` | 2000 | | `eval_time_budget_s` | 3600 | | `samples_per_task` | 1 | | `null_samples_per_task` | 2 | | `looks` | 0.25, 0.5, 1 | | `drop_alpha` | 0.05 | | `max_output_tokens` | 65536 | | `max_context_tokens` | 69632 | | `temperature` | 1 | | `top_p` | 0.95 | | `top_k` | 20 | | `dtype` | bfloat16 | | `kv_cache_dtype` | fp8 | | `max_num_seqs` | 512 | | `eval_merged` | yes | | `irt_draw_rule` | sqrt_fisher | | `irt_middle_band` | 0.2, 0.8 | | `irt_explore_frac` | 0.1 | | `rotation_enabled` | yes | | `rotation_active_size` | 10000 | | `rotation_rule` | info-guard | | `z_bar` | 0.5 | | `z_crown` | 1.5 | | `crown_gate` | argmax_symmetric | | `z_field_bar` | 0 | | `cap_hit_floor` | 0.33 | | `cap_hit_margin` | 0.02 | | `min_scored_tasks` | 100 | | `min_cover` | 0.95 | | `calibration_tol` | 0.003 | | `confirm_next_round` | yes | | `merge_after_confirm` | yes | | `min_kl_seq` | 0 | | `min_kl_tok` | 0.0014 | | `kl_rollouts` | 128 | | `kl_max_tokens` | 8192 | | `kl_time_limit_s` | 1200 | | `max_kl_tok` | 0.25 | | `recite_max_share` | 0.05 | | `anchor_n` | 300 | | `anchor_min_p` | 0.8 | | `anchor_min_rollouts` | 4 | | `anchor_hi_p` | 0.95 | | `anchor_hi_share` | 0.25 | | `anchor_z_veto` | 1.645 | | `anchor_min_scored` | 100 | | `train_seed_scope` | round | | `dedup_enabled` | yes | | `dedup_rollout_overlap` | 0.5 | | `dedup_cos_shared_seed` | 0.135 | | `dedup_cos_own_seed` | 0.002 | | `min_signal_rollouts` | 1 | | `min_step_norm` | 0 | | `fold_every_k` | 1 | | `max_batch_bytes` | 536870912 | | `max_prompts` | 20000 | | `max_rollouts` | 20000 | | `min_reasoning_tokens` | 32 | | `reasoning_token_share` | 0.5 | | `max_answer_only_frac` | 0.05 | | `max_answer_repeat_frac` | 0.1 | | `max_answer_repeat_count` | 32 | | `reward_tolerance` | 0 | | `min_pool_prompt_frac` | 0 | | `max_train_token_steps` | 22130000 | | `max_stages` | 5 | | `train_tokens_per_s_floor` | 0 | | `round_time_limit_s` | 10800 | | `train_time_budget_s` | 3600 | | `promote_reserve_s` | 600 | | `eval_chunk_tasks` | 500 | | `lease_timeout_s` | 12000 | | `max_infra_attempts` | 3 | | `squat_min_wait_s` | 10800 | | `squat_age_factor` | 2 | | `apply_retry_s` | 300 | | `apply_max_attempts` | 12 | | `kings_window` | 10 | | `null_prune_from_round` | r000098 | | `burn_uid` | 0 | | `weights_cadence_s` | 3600 | | `weights_rate_limit_blocks` | 100 | | `budget_usd_per_hour` | 200 | ## Rule changelog Date (UTC) / field / old → new. Dates identify shipped commits; the parameter table is the current contract. - 2026-11-24 / `min_kl_seq` + `min_kl_tok` / `min_kl_seq=10` → `min_kl_seq=0`, `min_kl_tok=0.0014` nats per token. - 2026-11-24 / `z_bar` + paired next-round confirmation / no z bar → crown and paid confirmation both require strict `z > 1`. - 2026-11-24 / squat trim / queue-rate-stretched wait → flat 6h cap (`squat_min_wait_s=10800`, `squat_age_factor=2`), retaining the zero-turn guard. - 2026-11-24 / confirming-round king + old-parent samples / inherited `1` → matched `2` per task (`null_samples_per_task=2`). - 2026-11-25 / `service` / phase alone → phase plus coarse public service state, reason and next-open estimate. - 2026-11-25 / local-delta measurement guidance / undocumented → a 100-task local delta has an SE of about 5.3 percentage points. - 2026-11-25 / per-round seating / the one-entry-per-round rule is hotkey-only; there is no coldkey seat limit. - 2026-11-25 / `z_bar` / `z_bar=1` → `z_bar=0.5`: crown needs strict `z > 0.5`, pending the paired next-round confirmation (fresh paired `z > 0.5`) before any payout. - 2026-11-25 / miner pool guidance / local `math_pool_v2_1.jsonl` presented as the pool → sample from the live official-active pool (`public/pool/summary.json` → `public/pool/active/.json`); reference generator defaults to it; `check` warns when most prompts are outside it. - 2026-11-25 / winner stats / canonical-only → byte-identical root `winner-stats.json` alias and optional per-crown fields derived only from crowned winners' public batches. - 2026-11-25 / miner walkthrough / scattered stale guidance → live-pool, reserve, checking, upload, confirmation and payout walkthrough in llms.txt and the miner quickstarts. - 2026-11-25 / miner-visible v4 edges / `check --grade` now uses the full verified live catalog including `gen:`; public params visibly show `max_stages` and the `sft_weight` default without changing hashes; older checkers name the upgrade command and `from_public_dict` tolerates future bounds; mining.json publication lag is shortened on the producer and at the end of site pull. - 2026-11-27 / `rotation_rule` / `info` → `info-guard` (`affine-pool-rotation-v3`): a candidate enters the active pool only with a recorded pool-quality guard PASS in the sealed public guard ledger; earlier rounds replay under their own rule versions. - 2026-11-25 / `affine-batch-v4` / flat GRPO batches only → 1–`max_stages` ordered GRPO/SFT stages, official SFT verification and summed per-stage training cost. - 2026-11-27 / `z_crown` / crown and confirmation shared `z_bar` (strict `z > 0.5`) → the crown uses `z_crown` (strict `z > 1.5` in the approved params); confirmation keeps `z_bar` (fresh paired `z > 0.5` and recorded crown-round `z > 0.5`); `confirm_next_round` stays on; existing params hashes are unchanged. - 2026-11-27 / Generator task check / unpublished → every scored Generator task gets deterministic checks and every task passing the 2-6/8 king rule gets an LLM judge; any task judged broken sets that miner's Generator score for the epoch to 0 and keeps all its tasks out of the pool; only the verdict category is published (`contract.generator_task_check`); params and params hashes are unchanged. - 2026-11-27 / `recite_max_share` + `max_kl_tok` / no recitation check, no KL ceiling → Anti-recitation: a batch whose training targets reproduce pool task text or reference answers (more than recite_max_share of target 10-grams found in active-pool task text, excluding the row's own prompt) cannot crown, and a pending crown whose batch fails this at confirmation fails confirmation unpaid. Behaviour KL ceiling: an entry whose measured KL vs head exceeds max_kl_tok nats/token cannot crown; a pending crown above it fails confirmation unpaid. Both are 0 (off) by default, so existing params hashes are unchanged. Head reverts: the operator can make an earlier folded head the head again. `head_version_id` is then that head's own id; `reverts` in the head chain names each revert with its `reason` and the reverted-away heads. Paid kings are unchanged. - 2026-11-27 / `anchor_n` easy-task anchors / none → with `anchor_n > 0` each round also scores a public, seeded sample of retired tasks the head solved (`anchor_*` params); an otherwise-eligible entry whose one-sided anchor z is below `-anchor_z_veto` cannot take the crown; anchors never count toward delta; `anchor_n=0` (the default) leaves rounds and params hashes unchanged. - 2026-11-28 / `merge_after_confirm` / A crown (z > z_crown) is not merged into the head until its LoRA passes a fresh paired re-test in the next round (z > z_bar). Until then miners train on and are judged against the unchanged head. A crown that fails confirmation is discarded and never touches the head; a legacy unconfirmed fold that fails is reverted. Only confirmed crowns are merged and paid. - `eval_time_budget_s`: the longest time that the box waits for one answer of a model in scoring. It is not the time of the scoring: the times of a round are in section 3. - `burn_uid`: the UID of the owner. It has no seat (section 4) and gets no weight: nothing is burned (section 7).