TASK. Make this model better at math by directly editing its weights. No gradient descent and no training.

THE MODEL. Qwen3.5-0.8B, text part: 24 layers of width 1,024. Layers 3, 7, 11, 15, 19 and 23 are full-attention layers with 8 query heads, 2 key/value heads of size 256 and a gated output; the other 18 are Gated DeltaNet linear-attention layers with 16 heads of size 128. Each layer has a SwiGLU MLP of width 3,584. RMSNorm. Vocabulary 248,320; input embedding and output layer are tied. Tensor names look like model.language_model.layers.15.mlp.down_proj.weight.

THE CURRENT MODEL is the pinned base at /models/base plus an ordered chain of additive patches: {chain_text}. Its variant name is:
    {variant}
You edit the current model. Your patch adds to it: the model you submit is `{variant_plus}`.

NOTE FROM THE PREVIOUS GENERATION (its diagnosis, as written by it; may be empty, may be wrong):
---
{handoff}
---

HOW IT WILL BE JUDGED. After you finish, someone else compares your submitted model with the current model on math problems you will never see, none of them in your practice data: the chat template with thinking enabled, user message = problem + newline + "Please reason step by step, and put your final answer within \boxed{{}}.", temperature 0.6, top_p 0.95, top_k 20, presence penalty 1.5, at most 32,768 new tokens; the last \boxed{{}} is graded with math-verify. Word problems and competition problems both count. It is also compared with thinking off.

YOUR ONLY DOOR to the model is this command, run with Bash:
    python3 "{door}" "{run_dir}" <command>
Commands:
    status                                      budgets and what you have spent
    py <script.py> [--gpu] [args...]            run your script on a remote machine (CPU: 8 cores, 32 GB; --gpu: one H100), limit 10 minutes per run. It sees the model files at /models/base, patches at /models/patches, practice benches at /bench/practice_*.jsonl
    fwd <variant> <bench> <protocol> <limit> [seed]    a forward pass: the variant answers the first <limit> problems of the bench, every answer is graded; prints a summary (accuracy, cut share, tokens, tokens per correct answer) and the remote folder of the raw outputs
    texts <fwd_id> [n]                          print the head and tail of n raw outputs of that pass
Your budget: {fwd} forward passes of at most {max_seqs} sequences; {py_cpu} CPU script runs; {py_gpu} GPU script runs. Refused calls cost nothing. Failed calls do cost.
Protocols you may use: think35 (the protocol above, cap 32,768; a pass takes about 10 to 15 minutes), think35_8k (same but capped at 8,192 tokens; about 3 to 5 minutes), nothink_nopen (thinking off, no presence penalty, cap 8,192; 1 to 3 minutes).
Benches: practice_math, practice_gsm8k (large; a pass always takes the first <limit> rows, in file order), and disjoint blocks of 128 problems you can hold out: practice_s3math_a to _d, practice_s3gsm8k_a to _d. Each row has id, prompt, problem, answer, and usually a reference solution.
Variant syntax: base | patch:<name> | stack:<a>+<b>+<c>, each with optional dose such as stack:<a>+<b>@0.5.
Same seed on the same bench gives the same per-item random numbers across variants, so paired comparisons are possible. Raw outputs of pass k are JSONL gzip files under /runs/editors/{run_id}/fwd<k>/ with fields id, sample, text, n_tokens, finish.

REMOTE SCRIPTS. A script may write only under /runs/editors/{run_id}/ and may save patches only as /models/patches/{run_id}_<name>. A patch is additive in float32 space, relative to whatever it is stacked on:
    import sys; sys.path.insert(0, "/root"); import patchlib
    patchlib.save_patch("/models/patches/{run_id}_myedit", {{tensor_name: dense_float32_numpy_delta}}, {{"note": "..."}})
To read the current model's weights, load the base safetensors file in /models/base and add the chain's deltas (patchlib.load_patch(dir) returns ({{name: (shape, flat_idx, flat_val)}}, manifest)). Readable patches are: {readable}. On --gpu you can load it for teacher-forced reads:
    from transformers import AutoModelForImageTextToText, AutoTokenizer
    tok = AutoTokenizer.from_pretrained("/models/base"); m = AutoModelForImageTextToText.from_pretrained("/models/base", dtype=torch.bfloat16, device_map={{"": 0}}).eval()
then add the chain's deltas in place under torch.no_grad(). m(**enc, output_hidden_states=True) gives 25 hidden states; forward hooks work; loading takes about 15 seconds; about 1 ms per token. Grade a text yourself with: sys.path.insert(0, "/root/vendor"); import mathqa; pred, _ = mathqa.extract(text); ok = mathqa.is_correct(pred, gold). Thinking-template text: tok.apply_chat_template([{{"role":"user","content":prompt}}], tokenize=False, add_generation_prompt=True, enable_thinking=True).

RULES. No gradients of any kind: no backward passes, autograd, optimizers, or iterative fitting of weights to a loss (the harness refuses scripts containing these). Generate only through fwd: py scripts may read the model teacher-forced but may not sample or generate text. No edits to the final norm or to the embedding/output layer, and no multiplying a whole tensor by a constant. No internet. Work only in {run_dir} and read nothing else under the lab folder except the door itself. Do not spawn subagents. Start parallel door commands at least 5 seconds apart. Door commands can take many minutes. Ending your reply ends your session and kills your background commands, so never end your reply while waiting for a result. Pass the Bash tool a timeout of 600000 ms for py. For fwd, start it in the background writing to a file in your run folder, then wait in a foreground Bash call with a timeout of 600000 ms, using: until grep -q 'forward passes used' <file>; do sleep 10; done (repeat the call if it times out). Keep printed output short.

TIME. Stop by {deadline} IST (check with `date`). Whatever is not submitted by then counts as no gain. Budget your forward passes against the clock; you do not need to use them all. Check the clock with date rather than estimating it: the session really lasts until that time, and stopping early earns nothing.

SUBMITTING. Before the deadline write two files in {run_dir}:
  final.json: {{"patch": "{run_id}_<name>", "dose": 1.0, "summary": "<what you changed, in one or two sentences>"}}, or {{"patch": null, "summary": "..."}} if you judge that no edit you found would help. The patch must already exist on the remote volume, and dose is the dose you want it applied at.
  NOTES.md: a handoff note of at most 400 words for an editor who will continue from your model if yours is accepted, or from the same current model if it is not: your diagnosis of what limits this model, the measured evidence, what you tried and what happened, what you would do next. Write findings, not a narrative of your session.
Then reply in under 80 words saying what you submitted.
