# Local mechanism experiments

We varied precision placement and integer codes while holding serialized file size constant within each comparison. All experiments used the same pinned starting checkpoint. The depth and projection tests used greedy FP32 inference on a local RTX 3070. The fixed-grid likelihood test used FP32 CPU inference. Each comparison kept its backend fixed.

## Where W3 fails

Original and fresh-ID suites each contained 40 list requests and 8 missing-value requests. First-digit accuracy uses only the 40 list requests. Ordered success uses all 48 and follows the existing suite scorer. The two suites share task templates. A separate probe predicted every gold answer token with the correct prompt and preceding gold tokens supplied.

| Configuration | Weight file (bytes) | First digit, original / fresh (out of 40 each) | Ordered success, original / fresh (out of 48 each) | Passage PPL |
|---|---:|---:|---:|---:|
| FP32 | 1,976,190,416 | 40 / 40 | 47 / 46 | 14.98 |
| W4 | 768,551,311 | 40 / 40 | 38 / 39 | 17.93 |
| W3 | 723,822,991 | 0 / 0 | 0 / 0 | 69.75 |
| First 8 blocks at W4 | 738,732,437 | 31 / 28 | 9 / 5 | 37.97 |
| Middle 8 blocks at W4 | 738,732,437 | 0 / 0 | 0 / 0 | 46.60 |
| Last 8 blocks at W4 | 738,732,437 | 0 / 0 | 0 / 0 | 36.93 |
| Early attention projections at W4 | 725,658,005 | 12 / 12 | 3 / 2 | 51.10 |
| Early MLP projections at W4 | 736,897,429 | 0 / 0 | 0 / 0 | 45.22 |

Every unpromoted decoder linear weight stayed at W3 in mixed runs. Group size was 32. Scales and retained parameters stayed at FP32. The three depth arms each promoted 119,275,520 weights and passed write/read tensor-equality checks. The component follow-up changed different numbers of weights (14,680,064 attention and 104,595,456 MLP). Only the depth arms constitute the equal-byte comparison.

With gold prefixes, original-set W4 matched 767/768 digit positions. W3 matched 174/768, and matched none of 40 first digits. That excludes a failure confined to termination. The early-placement rescue was partial. In the follow-up, the observed combined gain in first digits exceeded the sum of the separate gains on both ID sets. This is a descriptive interaction for these interventions. Different activation distributions and weight-error magnitudes across blocks remain possible explanations for layer sensitivity.

The passage check used plain text from 35 previously available distinct SQuAD articles, up to 192 tokens per passage, scoring 5,426 next tokens. Late placement had slightly lower sample PPL than early placement despite its weaker retrieval onset. Their paired late/early PPL ratio was 0.973 (95% article bootstrap interval 0.927–1.021). The data leave their expected prose-quality ordering unresolved.

## What an identical four-bit grid controls

We copied the released 459,383,592-byte artifact and rewrote only its packed weight-code slots. Every scale, zero point, group index and retained tensor compared exactly across files. The header and offsets stayed intact. For each of 357,826,560 quantized positions, the counterfactual selected a nearest representable value to the original reference weight on the same grid. Repacking was checked against the integer codes. This control isolates code assignment within the released grid and holds the other calibrated choices fixed.

| Endpoint | Released codes | Nearest-grid codes |
|---|---:|---:|
| Weight file (bytes) | 459,383,592 | 459,383,592 |
| MSE over quantized weights | 0.000008224 | 0.000005971 |
| Token-weighted Qasper window PPL | 28.99 | 31.99 |

12.25% of codes changed. Weight MSE fell 27.40%, while PPL rose 10.35% (paired 95% article bootstrap interval +8.66% to +12.06%). Nearest coding produced higher loss on 60/64 windows. The articles came from 64 distinct Qasper contexts excluding the 12 used in the earlier QA pilot. One seeded 192-token window per article yielded 12,224 scored next tokens. The interval describes article sampling at this checkpoint and grid. These windows were reserved from the earlier local evaluation; pretraining exposure is unknown.

## Why weight MSE and projection error disagree

For each of the 168 quantized linear projections, capture input activations X from the unchanged full-precision model on the same 64 windows. For each weight assignment set ΔW to the difference from its original decoder matrix. The full squared output error is ‖X ΔWᵀ‖², summed over positions, output channels, projections and articles. Its diagonal approximation sums ‖X[:,j]‖² × ‖ΔW[:,j]‖² over input channels and omits cross-channel terms. Both assignments receive exactly the same X. No generated model trajectories enter this local diagnostic.

Nearest codes reduce the diagonal approximation by 26.47% but increase total squared output error by 46.86%. Full error is higher on all 64 windows. For the released codes, cross terms subtract 49.54% of their own diagonal total. For nearest codes they add 0.78%. This algebraically identifies why the local projection errors move opposite to the weight-MSE proxy. The PPL contrast comes from separate end-to-end inference; the local decomposition does not quantify which projections mediate that increase.

## Reproduction

Use the local checkpoint and evaluation caches listed in `../contract-results/METHODS.md`. The fixed-grid experiment also requires the verified released weight file and LongBench archive in the Python temporary directory. Python, PyTorch, Transformers, NumPy, Matplotlib and safetensors are required. The scripts record the model revision and library version. Temporary experimental weight files are removed after recording their sizes, hashes and round-trip checks.

From the assignment directory:

```powershell
python -B poc/run_mechanism_ablation.py --device cuda --threads 6 --batch 6
python -B poc/run_fixed_grid_ablation.py --threads 4
python -B poc/run_activation_error.py --device cuda
python -B poc/analyze_mechanism_ablation.py
```

The eight depth/component configuration JSON files contain individual probe results, raw generations, artifact metadata and passage-level negative log likelihood. There are 768 new retrieval generations. The three original-suite controls reproduced all 144 archived answers after trimming outer whitespace. `fixed-grid.json` records both file hashes, projection-level weight errors and article losses. `activation-error.json` records a shared-input projection diagnostic. `summary.json` contains paired estimates. Bootstrap intervals use 10,000 draws of whole articles. Fresh IDs were evaluated on the same templates, and the component test was selected after the depth comparison. Pre-specified cross-method H1/H2 tests still require additional configurations and calibration seeds.

