SmolLM2 session-recovery drill

This drill asks which details of a synthetic ferry session are recoverable
after restarting. Every condition uses the same pinned release of
HuggingFaceTB/SmolLM2-135M-Instruct, revision
12fd25f77366fa6b3b4b768ec3050bf629380bac.

What is compared

1. Uninterrupted. One worker generates the initial acknowledgement and
   then tests both versions of the saved application record in that process.
2. Transcript-only restart. A fresh worker gets the same completed chat
   and probe choices. The saved ferry record is empty.
3. Full-state restart. A fresh worker gets the same chat and the saved
   application record for each of the two versions.

Setup

Use Python 3.13 and a CPU environment. The local reference used Python
3.13.3, PyTorch 2.9.1+cpu, Transformers 4.57.3, and Safetensors 0.7.0
on Windows x64. Allow space for the roughly 271 MB archive, one extracted
copy, and the Python runtime packages. Expect fresh inference to take
several minutes on slower machines.

Run these commands in PowerShell from the extracted kit folder.

    py -3.13 -m venv .venv
    .\.venv\Scripts\python.exe -m pip install --index-url https://download.pytorch.org/whl/cpu torch==2.9.1
    .\.venv\Scripts\python.exe -m pip install --index-url https://pypi.org/simple transformers==4.57.3 safetensors==0.7.0
    .\.venv\Scripts\python.exe -m pip check

Run these commands in a Linux shell.

    python3.13 -m venv .venv
    . .venv/bin/activate
    python -m pip install --index-url https://download.pytorch.org/whl/cpu torch==2.9.1
    python -m pip install --index-url https://pypi.org/simple transformers==4.57.3 safetensors==0.7.0
    python -m pip check

On macOS use the Linux steps with the standard PyPI command
`python -m pip install torch==2.9.1` in place of the CPU-index command.
Wheel availability depends on your architecture. The drill runs on CPU.

Prepare, run, and verify

Use `python` from the activated virtual environment, or replace each
`python` below on Windows with `.\.venv\Scripts\python.exe`.

    python prepare_model.py prepare ./model-archive
    python drill.py run ./model-archive ./repeat-evidence.json
    python drill.py verify ./repeat-evidence.json

Preparation needs internet access to fetch the six pinned public files.
Inference loads an extracted local copy after checking it against the
included reference manifest. You can reuse a matching prepared archive.
For each repetition choose a fresh evidence filename.

This command checks the bundled example with the Python standard library.

    python drill.py verify ./example-evidence.json

`verify` uses the Python standard library and rechecks the recorded
evidence, including input and prompt hashes, probe scores, and the
stated assessment. `run` executes all three model workers and writes
an evidence record before checking it.
A nonzero exit from either command warrants reading the reported checks
or error details. To reproduce the result, run the inference yourself.

What the score means

The transcript discloses the ferry's hull color as a control. The next
task, last decision, and off-limits route are stored in an application
record. Two records assign different values to those three fields and
share the same transcript. The saved-fact score is out of six per arm.
For the transcript-only arm, the same three answers are compared with
both records because its input is identical across them. This caps its
score at three out of six even if it guesses. Each probe
scores the model's next-token logits for three single-token options,
including `unknown`, and selects the highest. `unknown` is available
for a missing answer and earns zero points on the saved-fact score.
The evidence records the exact synthetic exchange and application data,
the options and their raw logits, and the selected tokens. Matching
uninterrupted and restored answers and recovering the expected facts are
checked separately.

Scope and sharing

The comparison occurs between completed turns. The saved state is
application data inserted into the next prompt. Mid-generation replay,
hidden activations, the KV cache, random number generator state, and
subjective continuity are outside the scope of this test.
Each worker starts with an empty Hugging Face cache and uses offline
settings, local-files-only loading, and a Python socket guard. This is
application-level isolation. To check OS-level isolation, disable
external networking after preparation. A fresh extraction and repeat on
the original machine is a packaging check. A result from a separate
operator is an independent reproduction.

For a reproducibility report, share the new evidence JSON, your runtime
versions, and any changes you made to the setup. Keep the bundled fixture
unchanged when reproducing this result. All session data in the kit are
fictional. The setup command downloads the pinned model files separately.
