📝 LOGIT_STAIRCASE_MANUAL.mdv4.6.3 · 2026-11-01

logit_staircase.py - Manual

Module: logit_staircase.py @version 1.3.0 @date 2026-11-01 Another collaboration between Andrew.human and Claude.ai

Version history

Version Date Change
1.0.0 2026-10-31 First release. Ran on the Clone (staircase_20261031-154509).
1.1.0 2026-11-01 Step-by-step mode: --gate N, --follow LEVEL, --stepwise. Default behaviour unchanged. Its 24-step self-test failed on the Clone at step 12 (a near-tie), so it never ran.
1.1.1 2026-11-01 Step-by-step mode now makes its own no-push baseline (baseline_stepwise.json) and compares against that. A difference from the original baseline is accepted only at a near-tie (--tie-gap, default 0.3), otherwise it stops. Mode printed on the console. --selftest-steps removed. Tested against a stand-in server only.
1.2.0 2026-11-01 New "repeated 4-word runs" measure (catches sentence loops that "longest repeat" misses; baseline reference is in the table). A biased first piece inside an already completed phrase is no longer a stray (new count "inside"). Summary table gains one column. Checked offline against the real v1.1.1 logs and end to end on the stand-in server.
1.3.0 2026-11-01 New --mid LO-HI: at every step, whatever the model ranks LO to HI gets the level bonus (candidates or not). One group, mid. Stand-in server test only.
1.3.0 2026-11-01 New --mid LO-HI: at every step, whatever the model ranks LO to HI (not mem-toks) gets the level bonus. Special tokens (`< ... >`, e.g. end of text) are never pushed and end the reply. Tested on the stand-in server only.

What it does (plain words)

It asks LLM2 (Qwen3-4B on port 8082) the standard prompt again and again, each time pushing up the score of the first token of every mem-tok candidate by a fixed amount (+1, +2 ... +6). It also does the same with a control list of unrelated words. For each push it compares the reply with the no-bias baseline and reports where the reply first changed and how much damage was done. The question it answers: how big a push does the model tolerate before the reply breaks, and is the damage specific to mem-toks or happens to any word?

Everything runs at temperature 0, so a given setting always gives the same reply.

Requirements

Usage

First look at the plan, generating nothing:

python3 logit_staircase.py --dry-run

Then the full run (6 levels x 2 groups = 12 runs, about 13 minutes if the prompt is cached; the first run may take about 150 s if not):

python3 logit_staircase.py

Options: --stepwise, --gate, --follow, --tie-gap (see Step-by-step mode below), --server, --prompt, --candidates, --control, --baseline, --levels 1,2,3,4,5,6, --groups mem,control (also mem_in = candidates already in the prompt, mem_new = candidates not in the prompt), --n 120, --nprobs 50, --flag-steps 20, --include-flagged, --dry-run, --outdir, --wait 120, --timeout 900.

The output folder name is new every run (default staircase_YYYYMMDD-HHMMSS) and an existing folder is refused. Ctrl-C stops cleanly and writes a partial summary marked PARTIAL (exit 130).

Output files

Checks before running

  1. The prompt echoed in the baseline must equal the standard prompt, temperature 0, no bias, enough steps; otherwise it stops.
  2. Health wait; unreachable server stops with a message.
  3. Self-check of score reporting: some builds report scores before the bias, others after. The harness detects which and says so in the summary ("server reports scores before the bias: yes/no"); where scores are pre-bias it adds the bias back to give effective scores.

Groups

Metrics per run

Step-by-step mode (v1.1.0)

Why: a fixed push lands on the same word piece at every step, and it only ever touches the first piece of a phrase (v1.0.0 result: first words leaked, no phrase completed). The server cannot make a push depend on what was just chosen, so this mode asks for ONE token at a time, sending the prompt as token ids plus everything chosen so far, and sets the push fresh at every step.

Examples:

python3 logit_staircase.py --dry-run --gate 10 --follow 8
python3 logit_staircase.py --groups mem --levels 2,3,4 --follow 8
python3 logit_staircase.py --groups mem,control --levels 2,3,4 --gate 10 --follow 8

Middling-interest push (v1.3.0)

python3 logit_staircase.py --mid 3-15 --levels 1,2,3

At every step the harness asks the server for the scores with no push, takes the tokens ranked LO to HI (3rd to 15th here; the model's favourites 1-2 and the long tail are left alone; special tokens such as end-of-reply are skipped), and pushes all of them by the level. Then it takes the step. Reads: how the reply drifts when tokens the model finds "somewhat interesting" are promoted. Each run is one reply per level; read the .txt files.

Mid-range push (v1.3.0)

The blunt version of the experiment: forget the mem-tok list and, at every step, push the tokens the model ranks LO to HI (the "fair to middling" ones, plausible but not leading) by the level. Shows how far and how fast replies bend when plausible-but-not-leading words are favoured, whatever they are.

python3 logit_staircase.py --mid 4-30 --levels 1,2,3
python3 logit_staircase.py --mid 3-15 --levels 1,2,3,4

Limits (read before trusting numbers)