Psychosonic Lab · Experiment 05
Does one pass mean it passes?
Our Agent Gym decides which AI models may do real work for us. Its most useful lesson was that one passing run proves less than it looks. A model passed every test in our suite, run after run, then did worse in real use than any other local model we checked. Running one test again and again at temperature 0 showed why. This page shows how the gym works, what it saw, and a script that runs the same check on your own Mac.
The question
What is being asked
If a model passes a test once, does it pass the same test the next time? Same model, same request, same Mac, at temperature 0, the setting that is meant to make a model's answers repeatable.
Why it matters
We let AI models draft real work for us, and a model gets a kind of work only after it passes our tests for it. gpt-oss 20B passed all 14 tasks of the suite on 4 full runs in July, so it got our code and app building work. In real use it was then the only local model with more bad results than good among the jobs we checked. If one pass can be luck, a test that runs once hands real work to a model that fails some of the time, and the failures turn up later, in work nobody is grading.
What counts as a pass
One task from the gym, the one that caught this. Convert a 54 section status document into one HTML page and lose nothing. The grader checks that every section heading, component name and figure survives, in order, with the closing trade-off paragraph and no outside files. It is mechanical, so the same answer always gets the same grade.
The gym behind it
What Agent Gym is
Our own test bench for AI models. Claude hands drafting to cheaper models, local ones on this Mac and some in the cloud, then checks what comes back. A model is trusted with a kind of work only if it scores 90 percent or better on that kind of task on two full runs in a row. Between 70 and 90 percent it may still draft, and everything it writes is checked in full. From 2026-07-01 to 2026-10-06 the gym made 132 runs over 38 model setups and 137 tasks, 1,630 graded answers in all.
Tests the model never sees
Every task has hidden tests. A model is scored on its first answer, on a second try after it sees a failing public check, or as an agent that reads files, runs commands and decides when it is done. The public checks only steer the retries. Passing them is not passing.
Tasks come from real failures
When delegated work goes wrong in real use, the failure becomes a task, and the suite only grows. The task on this page came from a model that wrote TatartCore for TarotCore in one of our documents. Its first version had 22 sections and every model passed it, because it was too short to strain anything. Scaled to 54 sections, it failed gpt-oss 20B on its first run with a heading written Baler where the source said Balancer, while BalancerUnit stayed spelled right in the text below it.
Three outcomes, not two
An answer can pass, fail, or never arrive. A model that runs out of time or token budget before it answers has not answered wrongly, so that counts as no answer. We learned this by getting it wrong. A 300 second limit marked a slow model wrong five times, and at 900 seconds none of the five ran out of time. A second clock inside a helper, 600 seconds under the gym's 900, threw away two right answers that took 736 and 797 seconds.
Graders are tested too
A grader has to pass a right answer before it grades anything. Our first grader for one research task failed three right answers out of three, because it banned a word that a correct answer needed. Those answers are now tests of the grader.
Training our own
Passing answers from larger models became training data for a small model of our own, a 14B fine tune. On held out app building tasks it scored 8 of 14, against 3 of 14 for the model it started from. A third round only tied the second, so it was not shipped.
A pass earns a repeat, not a job
Since August a full pass earns a confirm run of three repeats, and the gym flags any task whose repeats disagree. That rule came from the case on this page.
Method
One task, many runs
repeat-check.py sends the document task to a model in Ollama ten times, with nothing changed between runs. It grades every answer with the gym's own checks and keeps every answer, so a failure can be read and not only counted.
The gym's request
Ollama's chat endpoint, the gym's system line and prompt, temperature 0 and a 16,384 token context, not streamed. The script builds the prompt from the gym's section table, and it matches the gym's prompt byte for byte. Its grader agreed with the gym's on every answer we kept and on eight broken copies made to fail each kind of check.
Counting different answers
Each answer is fingerprinted with SHA-256. If temperature 0 made a model repeatable, ten runs would give one answer ten times. The script reports how many different answers came back.
No answer is not a wrong answer
An empty answer, a timeout, an error from Ollama, or running out of context before the answer is done is counted as no answer, apart from passes and fails. A run cut off partway through still keeps the part it wrote. Where the model returns its thinking, that is saved beside the answer, so an empty one can be explained.
Conditions
Before each run the script records the load average, the swap in use and whether the model was already loaded, and once the Ollama version, the model's digest and the Mac. Times are kept but not reported here, because this test is about answers, not speed.
Cold every time
A second check sent the same request 10 more times with the model loaded from scratch for each one. We started a fresh Ollama server before every run and ran the script against it with --n 1. Quitting Ollama between runs does the same on your Mac.
Fixing the batch
A third check fixed Ollama's batch size with the script's --num-batch, 512 and 1,024 in turn, one cold run each, and read Ollama's log to confirm the model really started with that size.
What Ollama did
Ollama keeps a log of its own. For every run we copied out its lines for that run: the batch size the model was started with, and whether the prompt was worked out fresh or restored from the cache of the request before. They sit beside each answer. Your Ollama keeps the same log in ~/.ollama/logs/server.log.
Looking inside
A fourth check asked the model for its own probability of every word it wrote, and for its runner up at each step. why-check.py does this through Ollama, and through llama.cpp's own server, which Ollama runs underneath, with no Ollama in the way. It compares two samples and finds the first word where they differ. We ran it with the batch at 512 and at 1,024, with the prompt worked out fresh and restored from the cache, on the GPU, and on the CPU alone.
Repeating each setup
A pair of samples that differ proves nothing unless the same setup, loaded again, gives the same numbers. So each setup outside Ollama's GPU path was loaded cold a second time and compared with its first sample.
A second Mac
go.sh runs the same checks on another Mac: the six samples of section 05, then ten cold loads of the task, each on a freshly started Ollama. install.sh sets the Mac up first. cross-chip.py compares two Macs' samples one by one, and calls a pair void if the two were taken on different days.
The same model file?
Ollama loaded a second copy of the model for these runs. gguf-compare.py reads both files, matches their tensors by name, and checks every tensor's bytes.
Materials
The script
One file of Python, 317 lines, standard library only. It talks only to Ollama on your own Mac and writes only inside the folder it makes. The task and the grader are inside it, so there is nothing else to download.
What you need
A Mac with Ollama and room for the model. gpt-oss 20B is a 13.8 GB download, and running it takes more memory than that. In the gym one run took between 145 and 544 seconds on an M3 Pro with 36 GB, so ten runs can take over an hour. Any model Ollama runs can be tested instead.
The gym's own files
The gym's run history, the answers it kept from this task, and the task and grader as they ran are in the data, copied out of the gym's run files by export-gym.py.
The follow up scripts
why-check.py, 166 lines, gguf-compare.py, 128 lines, and cross-chip.py, 112 lines, all standard library only. why-check.py reads the task from repeat-check.py, so keep them in one folder. All three are published beside the data, with go.sh and install.sh, the shell scripts the two Macs ran, which hold no paths of ours. The shell scripts that started the first Mac's earlier servers are not published, because they hold paths on our Mac. The flags they used are in the logs and launch files in the data.
Show the script in full
#!/usr/bin/env python3
"""repeat-check.py: ask a local model the same thing several times, and see if it answers the same.
Psychosonic Lab, experiment 05. https://psychosonicconsulting.com/lab/agent-gym
The task is the one from our Agent Gym that caught this: convert a 54 section status
document to one HTML page and lose nothing. Every run sends the identical request to
Ollama on your own Mac, at temperature 0, grades the answer with the gym's own checks,
and keeps the answer. At the end it says how many runs passed and how many DIFFERENT
answers came back. If temperature 0 made a model repeatable, that second number would
be 1.
Standard library only. It talks to Ollama on this Mac and to nothing else, and it writes
only inside the folder it makes.
python3 -B repeat-check.py run gpt-oss:20b # 10 runs
python3 -B repeat-check.py run gpt-oss:20b --n 20 --out my-runs
python3 -B repeat-check.py grade answer-01.html other.html
python3 -B repeat-check.py prompt # print exactly what is sent
An empty answer, a timeout or an error from Ollama is counted as NO ANSWER, not as a
fail: a model that never answered has not answered wrongly.
"""
import argparse
import csv
import datetime
import hashlib
import json
import os
import re
import subprocess
import sys
import time
import urllib.error
import urllib.request
# ---- the task, built exactly as the gym's build.py builds it ----------------------
# (section title, component name, number, claim). The names are made up or our own.
SECTIONS = [
("Corpus", "TarotCore", 952, "resolves against a corpus of {n} curated recipes"),
("Resolver", "FoodDrawResolver", 1540, "keys all {n} possible draws to exactly one dish"),
("Coverage", "DrawCoverageIndex", 781, "reports {n} draws resolved, the rest falling back"),
("Sharing", "RecipeDetailView", 3, "exports {n} artifacts: image, recipe text, library file"),
("Export", "MoreGarlicExport", 64, "chunks the payload at {n} KB before handoff"),
("Routing", "PrismApp", 7, "registers {n} URL scheme handlers"),
("Allergies", "AllergenFilter", 18, "screens against {n} declared allergen classes"),
("Journal", "ReadingJournal", 240, "retains {n} days of saved draws"),
("Fleet", "SmithAdapter", 14, "pins the fine-tune at {n}B parameters"),
("Holdout", "HoldoutGate", 8, "scored {n} of 14 against a base of 3 of 14"),
("Flywheel", "TaskFlywheel", 60, "generates {n} synthetic tasks per cycle"),
("Distill", "SftExtractor", 600, "trains for {n} iterations at sequence length 8192"),
("Witness", "DriftSensor", 256, "caps the re-verification interval at {n} runs"),
("Ledger", "UsageLedger", 887, "has recorded {n} delegated runs to date"),
("Vision", "VisionPrescreen", 5265, "read a {n}px tall scrolling capture without invention"),
("Residency", "ModelResidency", 36, "assumes a {n} GB unified-memory ceiling"),
("Latency", "SpeedLane", 8, "returns one-shots in under {n} seconds"),
("Quantize", "QuantPipeline", 4, "exports at {n}-bit for the Ollama runtime"),
("Context", "ContextSizer", 131, "auto-sizes the window up to {n}k tokens"),
("Failover", "OllamaFailover", 2, "keeps {n} loaded models resident at once"),
("Regression", "RegressionFeed", 11, "has promoted {n} real failures into gym tasks"),
("Status", "ReleaseGate", 90, "requires {n}% on two consecutive runs to promote"),
]
GENERATED = [
"Cache", "Queue", "Scheduler", "Indexer", "Tokenizer", "Sampler", "Batcher",
"Loader", "Serializer", "Validator", "Migrator", "Compactor", "Replayer",
"Throttle", "Backoff", "Checkpoint", "Snapshot", "Reconciler", "Dispatcher",
"Collector", "Normalizer", "Partitioner", "Balancer", "Watchdog", "Auditor",
"Rotator", "Sweeper", "Verifier", "Encoder", "Planner", "Tracer", "Profiler",
]
ALL = SECTIONS + [(n, f"{n}Unit", 1009 + i * 37, "holds {n} entries before it yields to the next stage")
for i, n in enumerate(GENERATED)]
TRADEOFF = (
"Gains are real but bounded: the ceiling here is capability-bound, not "
"process-bound, so more training data of the same shape will not move it. "
"Trading model size for speed costs accuracy on APP-BUILD, and that "
"trade-off is why the 30b keeps the speed lane while gpt-oss:20b keeps quality.")
def source_document():
out = ["# Prism / agent-gym — consolidated subsystem status", ""]
for title, ident, num, claim in ALL:
out += [f"## {title}", "",
f"The {ident} component {claim.format(n=num)}. This behavior is contractual and "
f"is verified on every run; do not restate it loosely or round the figure.", ""]
out += ["## Trade-off", "", TRADEOFF, ""]
return "\n".join(out)
SYSTEM = ("You convert source documents to styled, self-contained HTML. Output ONLY the HTML "
"— no markdown fences, no prose, no commentary. Preserve the source content EXACTLY: "
"every proper noun, every number, every claim. Never summarize, never drop a section, "
"never truncate. Long documents must be converted in full.")
PROMPT = ("Convert the source document below into a single self-contained HTML page.\n\n"
"Requirements:\n"
"- Inline <style> only. NO external stylesheets, fonts, scripts, or images.\n"
"- Preserve EVERY section, in order, as a heading plus its content.\n"
"- Preserve every component name and every number EXACTLY. Do not round, "
"normalize, or re-spell them.\n"
"- Preserve every claim including qualifiers. Do not summarize or condense.\n"
"- The document is long. Convert ALL of it — a truncated page is a failure.\n"
"- Dark theme, readable body text, monospace for identifiers.\n\n"
"Source document:\n\n" + source_document())
# The request the gym made: Ollama's chat endpoint, not streamed, temperature 0, and a
# 16,384 token context (the size the gym's helper picked for a prompt this long).
OPTIONS = {"temperature": 0, "num_ctx": 16384}
# ---- the grader, the gym's check.py ------------------------------------------------
def grade(html):
"""Return a list of problems. An empty list is a pass."""
errs = []
t = re.sub(r"<!--.*?-->", " ", html, flags=re.S)
t = re.sub(r"<(style|script)\b.*?</\1>", " ", t, flags=re.S | re.I)
t = re.sub(r"<[^>]+>", " ", t)
t = (t.replace("&", "&").replace("<", "<").replace(">", ">")
.replace(" ", " ").replace("'", "'").replace(""", '"'))
text = re.sub(r"\s+", " ", t).strip()
low = text.lower()
names = [i for _, i, _, _ in ALL if i not in text]
nums = [f"{s}:{n}" for s, _, n, _ in ALL if not re.search(rf"(?<![\d.]){n}(?![\d.])", text)]
if names:
errs.append(f"{len(names)}/{len(ALL)} component names lost: {names[:6]}")
if nums:
errs.append(f"{len(nums)}/{len(ALL)} figures lost or rounded: {nums[:6]}")
pos, heads = [], []
for title in [s for s, _, _, _ in ALL] + ["Trade-off"]:
m = re.search(rf"<h[1-6][^>]*>\s*{re.escape(title)}\s*</h[1-6]>", html, re.I)
heads.append(title) if m is None else pos.append(m.start())
if heads:
errs.append(f"missing section heading(s): {heads[:6]}")
elif pos != sorted(pos):
errs.append("section headings out of source order")
for label, alts in [("bounded qualifier", ["bounded"]),
("capability-bound vs process-bound", ["capability-bound"]),
("more same-shape data will not move it",
["will not move it", "won't move it", "not move it"]),
("the trade-off sentence", ["trade-off", "tradeoff"]),
("speed lane attribution", ["speed lane"])]:
if not any(a in low for a in alts):
errs.append(f"dropped claim: {label}")
if ALL[-1][1] not in text:
errs.append(f"final section lost ({ALL[-1][1]}), truncated")
if "speed lane" not in low:
errs.append("trade-off section (document tail) missing, truncated")
if not re.search(r"</html\s*>|</body\s*>", html, re.I):
errs.append("no closing </body> or </html>, truncated mid-document")
if len(text) <= 2200:
errs.append(f"rendered text implausibly short ({len(text)} chars), condensed?")
if not re.search(r"<style\b", html, re.I):
errs.append("no inline <style> block")
ext = re.findall(r'(?:src|href)\s*=\s*["\'](https?:)?//[^"\']+', html, re.I)
if ext:
errs.append(f"external asset reference(s), not self-contained: {ext[:3]}")
if re.search(r"@import", html, re.I):
errs.append("@import, not self-contained")
if re.search(r"<script\b[^>]*\ssrc\s*=", html, re.I):
errs.append("external <script src>, not self-contained")
return errs
def strip_fence(text):
"""The gym takes the HTML out of a ``` fence if the model wrapped it in one."""
text = text.strip()
m = re.search(r"```[a-zA-Z0-9_.+-]*[ \t]*\r?\n(.*?)```", text, re.S)
return m.group(1).strip() if m else text
# ---- talking to Ollama -----------------------------------------------------------------
def ollama(host, path, body=None, timeout=30):
req = urllib.request.Request(host + path, method="POST" if body is not None else "GET",
data=json.dumps(body).encode() if body is not None else None,
headers={"Content-Type": "application/json"})
with urllib.request.urlopen(req, timeout=timeout) as r:
return json.loads(r.read().decode())
def sh(*cmd):
try:
return subprocess.run(cmd, capture_output=True, text=True, timeout=10).stdout.strip()
except (OSError, subprocess.SubprocessError):
return ""
def swap_used():
m = re.search(r"used = ([\d.]+M)", sh("sysctl", "-n", "vm.swapusage"))
return m.group(1) if m else ""
def loaded(host, model):
try:
return any(m.get("name") == model or m.get("model") == model
for m in ollama(host, "/api/ps").get("models", []))
except (OSError, ValueError):
return None
def run(args):
host = args.host.rstrip("/")
try:
version = ollama(host, "/api/version").get("version", "")
tags = ollama(host, "/api/tags").get("models", [])
except (OSError, ValueError) as e:
sys.exit(f"Can't reach Ollama at {host} ({e}). Start it, then: ollama pull {args.model}")
digest = next((m.get("digest", "") for m in tags if m.get("name") == args.model
or m.get("model") == args.model), None)
if digest is None:
sys.exit(f"{args.model} is not pulled. Run: ollama pull {args.model}")
# Ollama picks how many prompt tokens it processes at once when it loads the model, and
# that changes the answer. --num-batch fixes it for the whole run.
options = dict(OPTIONS, **({"num_batch": args.num_batch} if args.num_batch else {}))
stamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
out = args.out or f"repeat-check-{stamp}"
os.makedirs(out, exist_ok=False)
meta = dict(script="repeat-check.py", started=stamp, model=args.model, model_digest=digest,
ollama=version, runs=args.n, options=options, host=host,
mac=sh("sysctl", "-n", "hw.model"), chip=sh("sysctl", "-n", "machdep.cpu.brand_string"),
memory_gb=round(int(sh("sysctl", "-n", "hw.memsize") or 0) / 2 ** 30),
macos=sh("sw_vers", "-productVersion"),
prompt_sha256=hashlib.sha256((SYSTEM + "\n" + PROMPT).encode()).hexdigest())
json.dump(meta, open(os.path.join(out, "meta.json"), "w"), indent=2)
body = {"model": args.model, "stream": False, "options": options,
"messages": [{"role": "system", "content": SYSTEM}, {"role": "user", "content": PROMPT}]}
rows = []
print(f"{args.model} on Ollama {version}, {args.n} runs, temperature 0. Answers go to {out}/")
for i in range(1, args.n + 1):
row = dict(run=i, started=datetime.datetime.now().isoformat(timespec="seconds"),
loadavg=round(os.getloadavg()[0], 2), swap_used=swap_used(),
model_loaded_before=loaded(host, args.model))
t0 = time.time()
try:
resp = ollama(host, "/api/chat", body, timeout=args.timeout)
msg = resp.get("message", {})
answer, thinking = strip_fence(msg.get("content", "")), msg.get("thinking", "") or ""
row.update(done_reason=resp.get("done_reason", ""), eval_count=resp.get("eval_count", ""),
error="")
except (OSError, ValueError) as e:
answer, thinking = "", ""
detail = e.read().decode("utf-8", "replace") if isinstance(e, urllib.error.HTTPError) else ""
row.update(done_reason="", eval_count="", error=f"{e} {detail}".strip()[:200])
row["seconds"] = round(time.time() - t0, 1)
name = f"answer-{i:02d}.html"
open(os.path.join(out, name), "w", encoding="utf-8").write(answer)
if thinking:
open(os.path.join(out, f"answer-{i:02d}.thinking.txt"), "w", encoding="utf-8").write(thinking)
if row["done_reason"] == "length":
# Out of context before the answer was done: no answer, even if part of one was
# written (Josh, 2026-10-25). The part stays in the answer file.
row.update(outcome="no answer", sha256="",
problems=f"context full after {int(row['eval_count']):,} tokens"
+ (", answer cut off" if answer.strip() else ", before any answer"))
elif not answer.strip():
row.update(outcome="no answer", problems=row["error"] or "empty answer", sha256="")
else:
errs = grade(answer)
row.update(outcome="fail" if errs else "pass", problems="; ".join(errs),
sha256=hashlib.sha256(answer.encode()).hexdigest())
row.update(answer=name, answer_chars=len(answer), thinking_chars=len(thinking))
rows.append(row)
print(f" run {i:2d}: {row['outcome']:9s} {row['seconds']:7.1f}s "
f"{row['sha256'][:12] or '-':12s} {row['problems'][:70]}")
with open(os.path.join(out, "results.csv"), "w", newline="", encoding="utf-8") as f:
w = csv.DictWriter(f, fieldnames=list(rows[0]))
w.writeheader()
w.writerows(rows)
answered = [r for r in rows if r["outcome"] != "no answer"]
passed = sum(r["outcome"] == "pass" for r in rows)
distinct = len({r["sha256"] for r in answered})
print(f"\n{passed} of {len(rows)} runs passed. {len(rows) - len(answered)} gave no answer.")
print(f"{distinct} different answer{'s' if distinct != 1 else ''} came back from "
f"{len(answered)} answered runs of the same request at temperature 0.")
if distinct == 1 and len(answered) > 1:
print("Every answer was the same, byte for byte. On this Mac this model repeats itself on "
"this task, so one run tells you what the others would. Please tell us that too.")
print(f"Raw data: {out}/results.csv and {out}/meta.json. "
"Send them to info@psychosonicconsulting.com if you like.")
def main():
ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
sub = ap.add_subparsers(dest="cmd", required=True)
r = sub.add_parser("run", help="send the task N times and grade every answer")
r.add_argument("model", help="an Ollama model tag, e.g. gpt-oss:20b")
r.add_argument("--n", type=int, default=10, help="how many runs (default 10)")
r.add_argument("--out", help="folder for the answers (default repeat-check-<time>)")
r.add_argument("--host", default="http://127.0.0.1:11434", help="Ollama's address")
r.add_argument("--timeout", type=int, default=1800, help="seconds to wait for one answer")
r.add_argument("--num-batch", type=int, help="fix Ollama's prompt batch size, e.g. 512 or 1024")
g = sub.add_parser("grade", help="grade HTML files with the same checks")
g.add_argument("files", nargs="+")
sub.add_parser("prompt", help="print the system line and prompt that are sent")
args = ap.parse_args()
if args.cmd == "run":
run(args)
elif args.cmd == "grade":
bad = 0
for p in args.files:
errs = grade(open(p, encoding="utf-8").read())
bad += bool(errs)
print(f"{p}: {'FAIL: ' + '; '.join(errs) if errs else 'pass'}")
sys.exit(1 if bad else 0)
else:
print("SYSTEM:\n" + SYSTEM + "\n\nPROMPT:\n" + PROMPT)
if __name__ == "__main__":
main()
Results
What the gym saw
Every run of this task on gpt-oss 20B in the gym, first answer only, at temperature 0. Answers link to the file the model wrote.
| Run | Sections | Ollama | Grade | What the grader found | Answer |
|---|---|---|---|---|---|
| 2026-07-18 20:25 | 22 (first version) | not recorded | pass | passed every check | 38d59808d2c2 |
| 2026-07-18 20:32 | 54 | not recorded | fail | no Balancer heading, the answer wrote Baler | 56d0a7a641d9 |
| 2026-08-13 22:03 | 54 | 0.32.9 | pass | passed every check | 7067d7e7c414 |
| 2026-08-15 09:09 | 54 | 0.32.13 | fail | none of the 54 names, figures or headings | not kept |
| 2026-08-15 09:21 | 54 | 0.32.13 | pass | passed every check | 33033c24329d |
| 2026-08-15 09:26 | 54 | 0.32.13 | pass | passed every check | 260c8be1292c |
| 2026-08-15 09:29 | 54 | 0.32.13 | pass | passed every check | 260c8be1292c |
| 2026-08-15 09:31 | 54 | 0.32.13 | pass | passed every check | 260c8be1292c |
5 runs on Ollama 0.32.13 on 2026-08-15, one after another, started between 09:09 and 09:31: 4 passed and 1 failed. The 4 passing answers were 2 different files, 3 of them identical byte for byte, and the failing answer differed from all of them. So one request at temperature 0 brought back at least 3 different answers in 5 tries.
The other rows used other Ollama versions, or the first 22 section version of the task, and are not counted with those 5. The answer marked not kept was overwritten by the gym's repair step, as section 07 explains.
Raw data: case.csv, history.csv with all 1,630 graded answers from the gym, meta.json, the task and grader as they ran in task/, and export-gym.py, which copied them out of the gym at commit 2b5cdd79.
This script, on our Mac
gpt-oss:20b, digest 9ba9cc2b4e02, on Ollama 0.40.11, Apple M3 Pro with 36 GB, macOS 27.0.1. Load average before each run 2.57 to 7.32. Run 1 loaded the model. Runs 2 to 10 found it already loaded.
| Run | Grade | Stopped because | Tokens | What the grader found | Answer |
|---|---|---|---|---|---|
| 1 | no answer | context full | 13,768 | context full after 13,768 tokens, answer cut off | cut off, see the part |
| 2 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
| 3 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
| 4 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
| 5 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
| 6 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
| 7 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
| 8 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
| 9 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
| 10 | pass | finished | 10,110 | passed every check | 08181a010ce0 |
9 of 10 passed, 1 gave no answer, and 1 different answer came back from 9 answered runs.
Run 1 filled the context partway through its answer. It wrote 22 of the 54 sections, in order, and was cut off. Every problem the grader found in the part is something that came after the cut. It counts as no answer, as section 03 says. This run was made before the script counted it that way, so its results.csv still grades the part fail.
Raw data: results.csv, meta.json, and every answer beside them.
Cold every time
The same request 10 more times on 2026-10-25, each on an Ollama started fresh for that run, so the model loaded from scratch every time. Ollama 0.40.11, same model digest and same prompt as above.
| Run | Grade | Stopped because | Tokens | What the grader found | Answer |
|---|---|---|---|---|---|
| 1 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 2 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 3 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 4 | no answer | Ollama error | none | HTTP Error 500: Internal Server Error {"error":"an error was encountered while running the | none |
| 5 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 6 | no answer | context full | 13,768 | empty answer | empty, see thinking |
| 7 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 8 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 9 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 10 | no answer | context full | 13,768 | empty answer | empty, see thinking |
7 of 10 passed, 3 gave no answer, and 1 different answer came back from 7 answered runs. Run 4 ended with an error from Ollama partway through the answer, so it counts as no answer, as section 03 says.
The 7 passing answers were 1 file byte for byte, and not the file the runs above gave once the model was loaded. The 2 runs that filled the context wrote the same 53,874 characters of thinking byte for byte and never reached an answer. Their thinking matches the passing runs' for the first 1,731 characters, then goes another way. So on 2026-10-25 this request took one of two fixed paths: one that finishes and passes, and one that thinks until the context is full.
Raw data: one folder per run, run-01/ to run-10/, each with its results.csv, meta.json, answer and thinking, in repeat-cold-2026-10-25-0737. The answers and thinking link from the table.
The batch, fixed
12 more cold runs on 2026-10-25, each with Ollama's batch fixed by the script's --num-batch, 512 and 1,024 in turn. Ollama's log shows every one started with the size it asked for.
| Run | Batch | Grade | Stopped because | Tokens | What the grader found | Answer |
|---|---|---|---|---|---|---|
| 1 | 512 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 2 | 1,024 | no answer | Ollama error | none | HTTP Error 500: Internal Server Error {"error":"an error was encountered while running the | none |
| 3 | 1,024 | no answer | context full | 13,768 | context full after 13,768 tokens, before any answer | empty, see thinking |
| 4 | 512 | no answer | Ollama error | none | HTTP Error 500: Internal Server Error {"error":"an error was encountered while running the | none |
| 5 | 512 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 6 | 1,024 | no answer | context full | 13,768 | context full after 13,768 tokens, before any answer | empty, see thinking |
| 7 | 1,024 | no answer | context full | 13,768 | context full after 13,768 tokens, before any answer | empty, see thinking |
| 8 | 512 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 9 | 512 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
| 10 | 1,024 | no answer | context full | 13,768 | context full after 13,768 tokens, before any answer | empty, see thinking |
| 11 | 1,024 | no answer | context full | 13,768 | context full after 13,768 tokens, before any answer | empty, see thinking |
| 12 | 512 | pass | finished | 8,435 | passed every check | 58e0356c0ea5 |
All 5 runs at 512 passed, with the file the cold runs above passed with. All 5 at 1,024 filled the context with the same 53,874 characters of thinking as the cold runs above that filled it, byte for byte. Runs 2 and 4 ended with an error from Ollama partway through, so they count as no answer. Those errors, and the one in the cold check, were a watchdog of ours on the same Mac stopping the model mid answer. It now leaves other Ollama servers alone.
Raw data: one folder per run in repeat-batch-cold-2026-10-25-1041 and repeat-batch-cold-2026-10-25-1650, each with its results.csv, meta.json (which records the batch asked for), answer, thinking and Ollama's log lines.
What changed the answer
Every run above, grouped by what Ollama did with it, read from Ollama's own log. 3 runs lost to an Ollama error are left out.
| Day | Prompt | Batch | Runs | What came back |
|---|---|---|---|---|
| 2026-10-24 | worked out fresh | 512 | 1 | no answer, the context filled partway through the answer |
| 2026-10-24 | restored from the cache | 512 | 9 | passed, all 9 the same file, 08181a010ce0 |
| 2026-10-25 | worked out fresh | 512 | 12 | passed, all 12 the same file, 58e0356c0ea5 |
| 2026-10-25 | worked out fresh | 1,024 | 7 | no answer, the context filled with thinking, the same thinking each time |
Within each of these 4 setups every run gave the same thing back, byte for byte. Three things changed the setup, and none of them was in the request we sent.
The date. Ollama's template for gpt-oss writes the day into the system message, Current date: {{ currentDate }}, so the same request on another day is another input. Every run on 2026-10-24 began its thinking "We need to output", and every run on 2026-10-25 began its thinking "We need to produce". The prompt's fingerprint in meta.json cannot show this, because Ollama adds the date after the script has sent the request.
Worked out fresh or restored. When the model is already loaded, Ollama restores the prompt from the cache of the request before and works out only its last token. On 2026-10-24 run 1 worked the prompt out fresh and runs 2 to 10 restored it. Run 1's thinking matches theirs for the first 1,612 characters, then goes another way.
The batch size. When Ollama starts the model it decides how many prompt tokens to work through at once, and its reply does not say which it chose. On 2026-10-25 it chose 1,024 for 2 runs and 512 for the other 8. The 2 runs that filled the context are the 2 at 1,024. Fixing the batch on purpose gave the same split: 5 of 5 runs at 512 passed, and 5 of 5 at 1,024 filled the context.
So temperature 0 did repeat. What did not repeat was the work behind the answer, and Ollama changed that without saying so.
Raw data: Ollama's log lines for each run sit beside its answer, as ollama-log-NN.txt and run-NN/ollama-log.txt, copied out of the server's log by runner-log.py.
Why the setup changes the answer
To see why, why-check.py asked gpt-oss for its own probability of every word it wrote, and for its runner up, and compared setups. Two setups that write the same words should give the same numbers. Each sample is the first 1,500 tokens the model wrote (700 on the CPU), all of it thinking, on this task. A token is a word or part of one, and token 1 is the model's marker for starting to think. The numbers are log probabilities. A lead of 0.02 means the word the model wrote was about 2 percent likelier than its runner up. A position counts as different if the probability of the token both runs wrote differs at all, and the typical and largest differences, in the same units, say how much.
First, the instrument. With probabilities switched on, the fresh sample at 512 wrote the same thinking, character for character, as the batch check's runs at 512 did, for the 6,423 characters it logged. The fresh sample at 1,024 did the same for 6,541. Asking for probabilities did not change the path. Ollama's log shows each sample started the model with the batch it was asked for, and the CPU samples with no layers on the GPU. Ollama reported that the restored sample read 2,611 of its 2,616 prompt tokens from its cache, and the fresh one none.
| What differs | Where | Tokens compared | Probabilities that differ before the first different token | Typical difference | Largest difference | First different token | Lead of the token each run wrote |
|---|---|---|---|---|---|---|---|
| The same setup again, prompt restored | Ollama, GPU, batch 512 | 1,500 | 0 of 1,500 | 0.0000 | 0.000 | none | none |
| Prompt worked out fresh, then restored | Ollama, GPU, batch 512 | 1,500 | 462 of 524 | 0.0003 | 0.037 | 525 | 0.0288 and 0.0201 |
| Prompt worked out fresh, then restored | Ollama, GPU, batch 1,024 | 1,500 | 369 of 407 | 0.0003 | 0.023 | 408 | 0.0045 and 0.0008 |
| Prompt worked out fresh, then restored | llama.cpp's own server, GPU, batch 512 | 1,500 | 140 of 143 | 0.0002 | 0.024 | 144 | 0.0038 and 0.0001 |
| Batch 512, then 1,024, prompt fresh | Ollama, GPU | 1,500 | 356 of 388 | 0.0019 | 0.109 | 389 | 0.0182 and 0.0072 |
| Batch 512, then 1,024, prompt restored | Ollama, GPU | 1,500 | 355 of 388 | 0.0016 | 0.111 | 389 | 0.0180 and 0.0048 |
| Batch 512, then 1,024, prompt fresh | llama.cpp's own server, GPU | 1,500 | 342 of 350 | 0.0022 | 0.069 | 351 | 0.0199 and 0.0015 |
| Batch 512, then 1,024, prompt fresh | Ollama, CPU only | 700 | 126 of 130 | 0.0068 | 0.099 | 131 | 0.0498 and 0.0089 |
| GPU, then CPU only, prompt fresh | Ollama, batch 512 | 700 | 44 of 47 | 0.0056 | 0.091 | 48 | 0.1136 and 0.0177 |
A second restored run in a row gave the same probabilities at every one of the 1,500 positions. Every other pair gave different probabilities, at least 88 percent of the positions before the first different token, so the numbers had parted long before the words did. At the first different token the two runs had the same two best words every time, in the other order. The word each run wrote led its runner up by 0.114 at most, and by less than 0.03 in 6 of the 8 pairs.
The same setup, loaded again
A pair that differs says little unless the same setup gives the same numbers when it is loaded cold a second time. 4 of 4 repeats matched their first sample at every position.
| Setup | Tokens compared | Probabilities that differ | Largest difference | First different token |
|---|---|---|---|---|
| Ollama, GPU, batch 512 | 1,500 | 0 of 1,500 | 0.000 | none |
| llama.cpp's own server, GPU, batch 512 | 1,500 | 0 of 1,500 | 0.000 | none |
| llama.cpp's own server, GPU, batch 1,024 | 1,500 | 0 of 1,500 | 0.000 | none |
| Ollama, CPU only, batch 512 | 700 | 0 of 700 | 0.000 | none |
The llama.cpp server's own log does not echo its batch, so the flags it was started with sit beside the samples in launch-*.txt. Raw data: run.txt and compare-*.json in why-control-2026-10-26-0127 and why-samedate-2026-10-26-0142.
Each of those setups repeats to the last digit, so the pairs above differ because of what changed between them. The batch moved the numbers in llama.cpp's own server and on the CPU alone. A restored prompt moved them in llama.cpp's own server. Ollama is not needed for either, and the batch did not need the GPU.
The date did it too, by accident. Our first control ran after midnight, on 2026-10-26, and Ollama wrote the new day into the prompt. Against the samples from 2026-10-25, the same setup opened its thinking with "output" where it had said "produce", at token 7, on the GPU and on the CPU alone. The two words were nearly tied there as well: on the GPU the word each run wrote led by 0.0110 and 0.0514, on the CPU by 0.0560 and 0.0063. That is the date change from the batch check, seen through the same instrument. Because of it, the Ollama repeats in the table were taken again on one day.
Raw data in why-2026-10-25-2314: every sample (ollama-b512-r1.json is the first), compare-*.json for each row, run.txt, and the servers' logs, server-*.log.
Was it the same model file?
Ollama now keeps two entries for gpt-oss 20B. The original has its runner set to ggml, Ollama's own engine, and names a model file written 2026-07-04. The other is a llamacpp variant, made by Ollama on 2026-10-07, that names a second copy of the file. The variant is the one ollama list shows, with the id 9ba9cc2b4e02, and the one the runs above loaded, through llama.cpp's server. Ollama's source has a step for this, compatmigrate/gptoss.go, that copies an old gpt-oss file with new names so that llama.cpp's server can read it.
gguf-compare.py read both files. Each holds 459 tensors, the model's numbers. 459 are identical byte for byte once 96 of them are matched under their new names. What changed is around them: 34 of the files' labels differ, almost all by a new prefix, and the architecture label went from gptoss to gpt-oss and the tokenizer label from default to gpt-4o. So the weights did not change. We did not check which engine ran the August gym runs, or whether the new tokenizer label splits this prompt into different tokens.
Raw data in gguf-compare-2026-10-25: result.json, and the two manifests, manifest-gpt-oss-20b.json and manifest-llamacpp-variant.json.
A second Mac
The same checks on a second Mac: a Mac mini with an Apple M4 and 24 GB of memory, beside the MacBook Pro with an Apple M3 Pro and 36 GB. Both ran Ollama 0.40.11, loaded the same model file (8ecb5d4ad617) in the same llama.cpp build (9ff0d7e90), and sent the same request. In every server on both, the whole model sat on the GPU and Ollama had to change nothing to fit it. Ollama writes the date into the prompt, so the MacBook Pro took its samples again on the same day, 2026-10-26, and the two are compared sample by sample. The two show different model ids, f38aa0c53da5 and 9ba9cc2b4e02, because the mini's copy is a separate download and the MacBook Pro's copy was converted from an older one (see "Was it the same model file?" above); both loaded the same file.
The mini ran an earlier copy of the published go.sh. It differs only in the summary printed at the end, which stopped on one comparison, so the mini's RESULT.txt was cut short and is not published. Every figure here is read from the JSON and CSV files that the same run wrote.
| Pair | Probabilities that differ before the first different token | First different token | Lead of the token each run wrote |
|---|---|---|---|
| The same setup loaded cold again, batch 512 | 0 of 1,500 | none | none |
| The same setup loaded cold again, batch 1,024 | 0 of 1,500 | none | none |
| Prompt worked out fresh, then restored, batch 512 | 68 of 73 | 74 | 0.0397 and 0.0281 (a) |
| Prompt worked out fresh, then restored, batch 1,024 | 860 of 933 | 934 | 0.0008 and 0.0003 |
| Batch 512, then 1,024, prompt fresh | 44 of 47 | 48 | 0.0744 and 0.0094 |
| Batch 512, then 1,024, prompt restored | 44 of 47 | 48 | 0.0804 and 0.0083 |
Every pair gave exactly the same figures on both Macs. More than that, the six samples taken on each matched the other's at all 1,500 positions, to the last digit, sample by sample. Where a batch or a restored prompt moved the model's words, it moved them at the same token with the same leads on an M4 as on an M3 Pro. In the pair marked (a), the two runs did not share the same two best words: a third word was nearly tied with them.
| Mac | Runs | Passed | Different answer files | Tokens | Seconds | Batch |
|---|---|---|---|---|---|---|
| Mac mini, Apple M4, 24 GB | 10 cold loads | 10 of 10 | 1 | 8,957 | 372 to 376 | 512, chosen by Ollama |
| MacBook Pro, Apple M3 Pro, 36 GB | 1 cold run, batch forced to 512, the same day | 1 of 1 | the same file | 8,957 | 588 | 512, forced |
On the mini all ten cold loads of the task passed and wrote one answer file, 8,957 tokens, and Ollama chose a batch of 512 every time. The MacBook Pro, with its batch forced to 512 on the same day, wrote that same file byte for byte, while it was busy with other work and had 17 GB of swap in use. Load changed how long it took, 588 seconds against 372 to 376, and not what it wrote.
Raw data in second-mac-2026-10-26: m4-stage1 and m4-cold from the mini, m3-stage1 and m3-cold-512 from the MacBook Pro, and cross-chip.json.
What this shows
One pass said little about the next
In the gym, the same request on the same day passed some runs and failed others. A model that passed once had not shown it would pass again.
Temperature 0 repeats, setup by setup
On our Mac, every run in the same setup gave back the same thing, byte for byte. Temperature 0 did what it promises.
Ollama changes the setup without saying so
The answer changed with the date, which Ollama writes into the prompt for gpt-oss, with whether the prompt came from Ollama's cache, and with the batch size Ollama picked when it started the model.
The batch size alone decided pass or no answer
With the batch fixed on purpose, one size passed every time and the other ran out of room every time, thinking the same thoughts byte for byte.
The numbers part before the words do
When the batch or the prompt path changed, the model's own probabilities for the words it wrote came out a little different at most positions, well before the words themselves differed. The text went another way at a word where the model had two nearly equal choices.
It happens without Ollama
A different batch changed the numbers in llama.cpp's own server and on the CPU alone, and a restored prompt changed them in llama.cpp's own server. Ollama is not needed for it, and the GPU is not the only place it happens.
Two Apple chips gave the same numbers
A MacBook Pro with an M3 Pro and a Mac mini with an M4, with different amounts of memory, gave the same probabilities for the same request to the last digit in every setup we tried, and the MacBook Pro wrote the mini's whole answer byte for byte. A batch or a restored prompt moves the model's words in the same place on both, so the effect is not one machine's.
The second Mac repeated itself too
Ten cold loads on the mini wrote one answer, and Ollama chose the batch that passes every time.
The weights stayed the same
The numbers inside the model file did not change. Ollama later wrote a second copy of the file with new names and labels around the same numbers.
One run tests one setup
A test that runs once has tested one setup, and the next run may get another. That is why the gym now runs a passing task again before it trusts the model with that work.
What this does not show
One task, one model
Everything here is one task and, from the gym, one model. Other tasks and other models may repeat perfectly. The gym's other repeated runs disagreed with themselves too, but between those repeats prompts, graders or model builds changed, so they are not counted here.
Small numbers
One fail in 5 runs fits a true failure rate anywhere from rare to common. Ten runs narrow that only a little. A rate to lean on takes more runs than this. The same goes for the 4 setups in section 05, which had between 1 and 12 runs each.
The failing answer was not kept
On 2026-08-15 the gym's repair step wrote its corrected answer over the first one, so the failing answer itself is gone. Only the grader's note survives, and it says what the grader says about an empty page: none of the 54 names, figures or headings. At the time the gym could not tell an empty answer from a wrong one, so we cannot say which it was. The script on this page keeps every answer.
Versions move
The August runs used Ollama 0.32.13. Ollama has changed since, and so has the file it loads for gpt-oss: on 2026-10-07 it made a second copy of the model with new tensor names and labels. Section 05 shows that all 459 tensors in that copy are the same as in the original, written 2026-07-04, so the weights did not change. We did not check which engine ran the August runs, or whether the new tokenizer label splits this prompt into different tokens. Ollama's template for gpt-oss puts the day into the prompt today, and we did not check whether the August one did. The 5 gym runs counted in section 05 all ran on 2026-08-15, so the date cannot be what made them differ.
How far the why goes
The date puts a different word into the prompt, so a different answer needs no explaining, and we did not test it. For the batch and the restored prompt, section 05 shows that the model's probabilities come out different and that the first different word was a near tie. It does not show which step inside the model makes the numbers differ. Adding the same numbers in a different order gives slightly different totals, which fits, but we did not look inside the model to see it. Each pair was sampled once, on one task and one model, for the first 1,500 tokens or 700 on the CPU, so the point where each pair parted is a single reading. Nothing here predicts why the runs at 1,024 went on to fill the context while the runs at 512 passed: the first different word only starts two paths apart.
llama.cpp does not say what it reused
Ollama reports how many prompt tokens it read from its cache. llama.cpp's own server reports only the total in its cache, prompt and answer together. For its restored rows we rely on its log, which shows the prompt being worked out for the first request and not for the second, and on the second sample differing from the first while the first repeats to the last digit.
Two chips from one maker
Both Macs have Apple GPUs and ran the same Ollama with the same llama.cpp build (9ff0d7e90). The agreement says nothing about GPUs from other makers, other versions of either, or the CPU path, which differs from the GPU's on one Mac (section 05).
The two Macs agree only on one day
Ollama writes the date into the prompt, so the two Macs were compared on 2026-10-26 only. The mini's samples were not compared with the MacBook Pro's earlier ones, which are from other days.
Why Ollama picked its batch
On 2026-10-25 the MacBook Pro's Ollama chose 1,024 for 2 of its 10 cold loads and those gave no answer. The mini's chose 512 in all ten. We did not find out what decides it.
Ollama chose more than the batch
Ollama decides how to load the model as well as the batch. In the why check its launch at 512 carried the flag --load-mode none and its launch at 1,024 did not. In the batch check, the 1 run that started with that flag gave what the other runs at 1,024 gave. The llama.cpp and CPU pairs differ in the batch only.
Temperature 0 only
Real use runs at the model's default temperature, which varies on purpose. Temperature 0 is meant to be the repeatable case, and this test is about that case only.
The real use record is not published
It comes from our own delegation log, which holds our private work. By 2026-08-13, 14 of gpt-oss 20B's jobs in it had been checked: 6 good and 8 bad. Every other local model checked by then had more good than bad. Most jobs are never checked, so this is a small sample of real use, not a rate.
We wrote the test
We built the gym, wrote the task and chose the case. The task is generated from a table, and every name in it is made up or our own.
Run it yourself
Download it and read it
Save repeat-check.py from this page and read it. This prints exactly what will be sent:
python3 -B repeat-check.py prompt
Grade our answers first
No model needed. Download two answers from the data and grade them:
python3 -B repeat-check.py grade 20260718-203225.html 20260815-092105.htmlThe first fails on the Balancer heading and the second passes.
Pull the model
ollama pull gpt-oss:20b
Run it ten times
python3 -B repeat-check.py run gpt-oss:20bIt prints each run as it lands, then how many passed and how many different answers came back. Every answer,
results.csv and meta.json go in a new folder.Try another model
python3 -B repeat-check.py run your-model:tag --n 10Any model Ollama can run. This is the run we have not done.
See why two setups differ
Save why-check.py beside repeat-check.py, which holds the task. Take two samples with a different batch and compare them:
python3 -B why-check.py sample ollama gpt-oss:20b a.json --num-batch 512 python3 -B why-check.py sample ollama gpt-oss:20b b.json --num-batch 1024 python3 -B why-check.py compare a.json b.jsonRestart Ollama between the two so each loads cold. The comparison prints the first token where they differ, how many positions already had different probabilities, and the two best words in each run at that token. Run the first command twice, restarting Ollama between, and the two samples should match to the last digit. For a run without Ollama, start llama.cpp's
llama-server with -b and -ub set, and use sample llama.On a second Mac
Copy repeat-check.py, why-check.py, go.sh and install.sh into one folder on the other Mac.
bash install.sh STAGES=1 bash go.sh STAGES=2 bash go.shQuit the Ollama app first, and do not start within an hour of midnight, because the date is in the prompt. gpt-oss 20B needs 24 GB of memory or more.
go.sh checks that the whole model sat on the GPU, which has to say YES, and writes a zip of its results. To compare two Macs that ran on the same day:python3 -I -B cross-chip.py A-stage1 B-stage1 A-stage2 B-cold-run outA pair taken on different days is reported as void.
Compare two model files
python3 -I -B gguf-compare.py OLD NEW --json result.jsonOllama's files are in
~/.ollama/models/blobs, named by checksum. Add --rename OLD=NEW for a tensor name that changed, as it did here.If every answer matches
Then that model repeats itself on your Mac, and one run tells you what ten would. That is a result too. Either way, send results.csv and meta.json to info@psychosonicconsulting.com and we will look.
The Lab
gpt-oss is made by OpenAI. Ollama, Claude and Claude Code belong to their owners. Apple, Mac and M3 Pro are trademarks of Apple Inc. None of them is affiliated with or endorses this page.
The Signal
A short note on building privacy-first software, plus the day each new app ships. No spam, unsubscribe anytime.
Free · ~1 email a week · your address stays yours · RSS feed