DOTTIE — WEIGHT GEOMETRY LAB
Run on the GEEKOM A9, Windows x64, 128 GB RAM

Goal
Test two ways for a second model to acquire something the first model learned. In the fact study a small Pythia donor learns a fictional fact with a real LoRA. Switch it off and on, release only the measured relationships, and use those relationships to fit a separate adapter in the larger, different-family SmolLM2. In the relation study a Pythia donor learns equality by ordinary training. A clean recipient builds its own edit, and the interference map checks where that edit could go while preserving a previously correct skill. Run both studies, keep the baselines, and report failures alongside successes.

1. Get the kit
Download https://rfsafe.app/geometric-reasoning/geometry-lab-kit.zip and extract the entire ZIP into a new local directory such as C:\AI\WeightGeometryLab. Keep the viewer files beside the Python files. Use a local NTFS folder. The runner saves completed files with atomic hard links. Reserve several GB for Python, PyTorch, the base model, and optional copies. The ordinary experiment saves small rank-one adapters. It does not need to store a full model for each seed.

2. Check Python and start
Use 64-bit Python 3.11 or 3.12. The Windows launcher detects either version. In the commands below, substitute -3.12 if that is your installed version. Verify a 3.11 installation with:
  py -3.11 -c "import struct,sys; print(sys.version); print(struct.calcsize('P') * 8)"

Double-click RUN-A9.cmd. Or, in PowerShell from the extracted folder:
  py -3.11 launch_lab.py

The launcher creates .venv inside this folder, installs the CPU build of PyTorch and pinned dependencies, runs an offline tensor self-test, downloads the pinned Hugging Face files, and verifies the original weights. Internet access is needed for the initial setup. No Hugging Face login is required for the public model. The default runs the cross-family fact study first and the relation plus interference study second on each of seeds 17, 29 and 43, using four CPU threads. It runs beside LM Studio as an independent process. It does not need LM Studio's model loader.

For the flagship fact transplant only, enter this from the extracted folder:
  .\RUN-A9.cmd --study fact --seeds 17

For the relation and interference map only:
  .\RUN-A9.cmd --study relation --seeds 17

For the reverse size direction (160M Pythia donor → fresh 70M Pythia recipient):
  .\RUN-A9.cmd --study relation --donor-size 160m --seeds 17

For both studies on one seed with the live viewer:
  py -3.11 launch_lab.py --seeds 17 --threads 4 --exit-on-finish

For an unattended three-seed study, saving the viewer reports:
  py -3.11 launch_lab.py --seeds 17 29 43 --threads 4 --no-browser --exit-on-finish

3. Follow the run
The launcher prints a local address and opens it automatically unless --no-browser is selected. The two dashboard links let you switch between Fact transplant and Run viewer. Select the fact view for the Pythia-to-SmolLM2 study and the relation view for the Pythia paired-rule study. After an unattended run, load the corresponding saved JSON into either viewer. Keep the terminal open during training. The server listens on 127.0.0.1. It serves the lab interface, current measurements and the completed reports for this session. Watch the donor loss, the responses to fresh development questions, and the positions of the same sixteen reference prompts at initialization and after each epoch. The first stage can spend time installing packages before the first graph appears.

Cross-family fact study
The donor is EleutherAI/pythia-70m-deduped (GPT-NeoX). The recipient is HuggingFaceTB/SmolLM2-135M (Llama architecture with a different tokenizer). Materialize the models in separate folders, then have the donor learn an invented association through LoRA. Capture the relation of shared questions to named reference prompts with its adapter off and on. In a separate receiving process, use the shared prompt identities and these relationships to fit a new adapter for SmolLM2. The answer to the planted association stays in the donor and the evaluator. Independently named reference prompts identify the possible answers. The recipient is doing a geometric fit; it receives no direct target-fact supervision in the geometry arm. A labeled recipient comparison is scored separately.
 
By default each run seed also sets a reproducible fact assignment. To blind the assignment independently, give the launcher one separate donor-only value per run with --fact-seeds. Only the donor uses these values to generate the answer key. The receiving code uses its own seed for optimization and control shuffles. The desired result is a correct, unaided answer on previously unseen wordings. Forced-choice accuracy and unrestricted generated text are distinct measures. Check both, along with old facts, shuffled reference relationships and the ability to deactivate the adapter and restore the baseline. Inspect which old facts were already correct, how many survived the edit, and whether the receiver simply started answering the planted word everywhere. Save every seed, even if the tiny donor failed to learn or the geometry control ties the actual result. Single-wording improvements and adapter dimensions do not establish knowledge transfer.

The local fact dashboard follows the run. Reopen runs/session-.../seed-17/fact/cross-family.json in transplant.html to replay it. For a short handoff to John, include clean, donor-on, receiver-transfer, and shuffled results on forced choice AND free answers; the previously correct protected answers lost; an example of a held-out question; and what the controls imply. Report every tested seed. See the fact dashboard for the geometry packet's exact fields and the exported native adapters.

Relation and interference study
Training uses ordinary full-model next-token cross-entropy on 96 labeled prompts. The donor stops when it gets both members right in at least 90% of the 12 development pairs, or reaches 40 epochs. The separate transfer process reloads the pristine model. It can use the released geometry, the prompt texts, pair memberships and four labeled anchors. The primary edit is fixed before the independent test labels are used. One separately marked control uses all transfer-bank labels.

4. Inspect what passes between the models
  geometry.json     72 reference prompts in 36 pairs, four anchor labels and a pairwise similarity matrix.
  donor.json        Donor scores and training snapshots for inspection.
  patch.safetensors Recipient detector, writer, edited tensor name and before/after SHA-256 hashes.
  adapter/          A PEFT LoRA, rank 1, alpha 1, built for this exact recipient checkpoint.
  viewer.json       Native scores, controls, per-example margins, geometry and exact-rollback checks.
  events.log        Ordered runtime measurements for the seed.

The donor packet contains zero donor weights, donor weight differences or donor answer logits. Each contrast is measured at the last input token before the answer. Pair centering cancels common prompt context. Pairwise cosine similarities are invariant to an orthogonal rotation of that activation space. Four reference labels give the two directions their names.

The fresh recipient fits a detector in the input coordinates of block 4's MLP output projection. A downstream logit-sensitivity measurement in that recipient supplies the writer. Their outer product is the proposed direct weight edit. LoRA A is the detector row, LoRA B the writer column. The launcher verifies that the PEFT adapter can be merged back into the same numerical tensor. A different base, width or tokenizer needs its own measurement and fit.

5. Read the results
Results are in runs/session-.../seed-17/relation (or seed-29/relation and seed-43/relation). Open viewer.html in this kit or https://rfsafe.app/geometric-reasoning/viewer.html and select a saved lab-report.json or viewer.json. File uploads in the public viewer are read in the browser. Use the epoch slider to replay the donor geometry. Select before/after to compare the recipient with the donor, then inspect individual rescued and regressed prompts.

Primary test: 48 items, 24 premise-flip pairs, on held-out wording.
Novel-symbol test: 32 items, 16 pairs, using eight previously unseen symbols.
Collateral test: 12 unrelated next-token prompts, separate from eight preservation prompts used in the fit.

A is the arbitrary code for different and B for same. A positive B-minus-A logit margin favors B. Forced-choice accuracy considers these two native token logits. Greedy accuracy checks the top token over the full vocabulary. Pair-both requires both the canonical and flipped answers. Paraphrase-both requires both wordings of the same relation.

Compare the donor-geometry patch with the untouched base, the base model’s own geometry at the same four labels, shuffled contrast directions, a norm-matched random detector and a direct-label fit. Direct labels form a separately identified supervised comparison.

Per-seed criterion declared in the runner: donor pair-both at least 75%; receiver pair-both at least 10 percentage points above the strongest of base, base-geometry, shuffled and random; neutral top-token agreement at least 90%; mean neutral Jensen–Shannon divergence at most 0.05 nats; exact rollback verified. These are pilot thresholds, not general standards. Report every seed individually, including failures. Treat passing on at least two of three prespecified seeds as a reason to repeat on a fresh sealed set. Do not choose settings based on the final holdouts.

6. Hand John the outcome
Give John each fact/cross-family.json and each relation/lab-report.json, or open them locally for him. Include the model revision, seeds, donor pair score, receiver pair scores for all arms, novel-symbol and neutral results, and one rescued / regressed case when available. If the donor fails on held-out questions, explain that the experiment lacks a strong donor for that seed. If base geometry performs as well as trained-donor geometry, a new contribution from donor training has not been demonstrated. A failure is a valid lab result. Keep the output and the original settings.


7. Compare placements for interference
The launcher runs interference_lab.py after each primary transfer. It compares three potential layers and an unmodified versus protected detector for each layer. Use the Interference map in the viewer to compare signed pre-edit predictions, losses among previously correct agreement answers, and target pair accuracy. The old-skill task uses English singular/plural agreement. Only the part actually answered correctly at baseline can subsequently be lost.

A selection file records the calibration decision before the held-out tests. The implementation can decline every placement. A protected detector removes its component in the measured old-task subspace. An orthogonal result on these prompts is not a promise about all previous knowledge. Controls, disjoint nouns, actual regressions and restoration checks let you evaluate the risk map itself. The standard run creates interference-selection.json and interference.json, then combines transfer and interference in lab-report.json. The viewer can open that combined file, either component alone, or the completed CPU reference.

To run placement analysis by itself after the donor export, use the seed folder containing geometry.json:
  .\.venv\Scripts\python.exe interference_lab.py --model models\pythia70m-base --out runs\separate-donor --seed 17 --threads 4

To study a real recall dip later, freeze prompts for the older skill, identify what was correct before training, and measure exactly those same cases across candidate edits. Keep fresh prompts aside for the final evaluation. The supplied pilot uses agreement because it can be measured without your private prompts.

Run individual stages or prove the handoff
After the launcher has installed the environment, the following PowerShell commands use its Python directly. Pick new output directories:
  .\.venv\Scripts\python.exe geometry_lab.py self-test --threads 4
  .\.venv\Scripts\python.exe geometry_lab.py download --model models\pythia70m-base
  .\.venv\Scripts\python.exe geometry_lab.py donor --model models\pythia70m-base --out runs\separate-donor --seed 17 --threads 4
  .\.venv\Scripts\python.exe geometry_lab.py transfer --model models\pythia70m-base --packet runs\separate-donor\geometry.json --out runs\separate-recipient --seed 17 --threads 4 --check-peft

For a stricter separation, copy just geometry.json to a new directory or second machine and run the last command there with the pinned base. The transfer can run without donor.json. Donor-only summary charts will be absent from that report.

Optional full checkpoint and rollback
The normal experiment verifies the edit in memory and leaves the base on disk untouched. To create an independent merged checkpoint and a separate restored copy after the example above:
  .\.venv\Scripts\python.exe geometry_lab.py apply --model models\pythia70m-base --out runs\separate-recipient --dest models\edited-seed17
  .\.venv\Scripts\python.exe geometry_lab.py rollback --model models\pythia70m-base --out runs\separate-recipient --edited models\edited-seed17 --dest models\restored-seed17

If interrupted, completed seed reports remain valid. Relaunch with only the unfinished seeds in --seeds; the launcher creates a fresh session directory. For a failed transfer whose geometry.json was already saved, use the separate transfer command with a fresh recipient directory. Keep any completed or partial session for comparison.

Model provenance
EleutherAI/pythia-70m-deduped, Apache-2.0. Revision c92722694b14c67e3f8ed3bf164bb2456449e720. Pinned model.safetensors SHA-256 3da388330e4549156d76b58d6d268c63cd005e9336b4f4d2d378421e7b7a33fd.
https://huggingface.co/EleutherAI/pythia-70m-deduped/tree/c92722694b14c67e3f8ed3bf164bb2456449e720

Research extension
After a replicated simple result, freeze a fresh set of prompts and replace the equality task with an arbitrary learned codebook or a cyclic relation. Use --donor-size 160m for the implemented larger-to-smaller Pythia arm. The donor exports its measurements from block 8 at width 768 and the receiver fits its own block 4 update at width 512. Never transfer the donor adapter directly in this control. Compare also with an ordinary supervised recipient given the same example and label budget. A representation becoming readable, a model changing native answers, and broad factual learning are three different measurements.

Replaying the included 70M relation artifacts
reference-donor/geometry.json is the actual packet from the public CPU seed-17 relation study. The sibling donor.json contains optional evaluation and visualization metadata. reference-adapter/adapter_config.json and adapter_model.safetensors are the actual rank-one PEFT adapter. The hash-bound patch.safetensors can be applied to a separate copy with the commands under Optional full checkpoint and rollback. These artifacts are for inspection and repeatability. This seed did not meet the promotion criteria. No placement qualified.

To independently reconstruct the geometry-only fit from the included packet after setup:
  .\.venv\Scripts\python.exe geometry_lab.py transfer --model models\pythia70m-base --packet reference-donor\geometry.json --out runs\replay-seed17 --seed 17 --threads 4 --check-peft

For gpt-oss-120b later
First replicate a cross-family effect on the small models with unseen facts, fresh wording and sham geometry. Tag the same semantic position before the answer in each tokenizer. Use separate calibration questions to compare recipient layers and fit a recipient-native direction. Benchmark against an equal-norm random change, a sham mapping, an independently estimated target direction and the untouched target. Evaluate on fresh wording, protected knowledge, and correct free completion. Use a new disposable checkpoint or switchable adapter and verify restoration. Repeat the map and fit in gpt-oss-20b before considering 120b. The small exported LoRA is specific to its receiving model. The kit implements the small-model protocols; no 120b checkpoint is needed to run it.

Model sources
SmolLM2-135M base, Apache-2.0, 269,060,552-byte tensor artifact, pinned revision 93efa2f097d58c2a74874c7e644dbc9b0cee75a2, SHA-256 80521b40281d6ce74e35c9282c22539e75aa0ac8578892b2a59955ef78d55da1.
https://huggingface.co/HuggingFaceTB/SmolLM2-135M/tree/93efa2f097d58c2a74874c7e644dbc9b0cee75a2
Pythia-160m-deduped optional donor, revision 582159a2dfe3e712a8d47ae83dec95ae3bde8e7e, tensor SHA-256 bbaae5c00917b163baa499fc8eb64859ee0c850c5fdecfc32f4d70dc07213575.
https://huggingface.co/EleutherAI/pythia-160m-deduped/tree/582159a2dfe3e712a8d47ae83dec95ae3bde8e7e

Inspect two of your own existing adapters without opening their base model
  .\.venv\Scripts\python.exe adapter_map.py adapters\first adapters\second --out runs\adapter-map.json

Open the JSON in the Run viewer under “Read two LoRA adapters directly”. The same tool can read standard linear-module factors for a 120b LoRA. It reports signed effective-weight angles, input and output subspace overlap, singular values and omitted components. It compares only a verified-by-operator or matching declared base for angles. Supply --same-base only if you have checked that the two folders really target the identical checkpoint. Packed expert tensors, DoRA and other unsupported components are disclosed. Use saved grades on each skill to decide what overlap means for its behavior.

Decision for a future, sealed fact replication
The public seeds are development evidence. For an independent confirmation, reserve three new seeds and fresh question templates before fitting. Record this proposed rule before inspecting their outcomes. The donor should first give the intended first word on at least 5/6 target prompts. Require the recipient to get at least 4/6 unaided, at least two more than the best of clean, donor-off and shuffled geometry; keep all but at most one previously correct unrestricted protected answer; and maintain accuracy on the other fictional ports. Require this on at least two of the three reserved seeds before moving to a larger architecture. The cross-family runner emits the raw counts, prompts, continuations and scores. These are suggested promotion criteria for a future replication, not a preregistration of the displayed pilot. Verify templates and outputs separately from training.

Public CPU reference outcomes
On the three fixed training and fact seeds 17, 29 and 43, the planted Vimora colors were gold, blue and blue. In six new wordings per seed, donor free recall was 5/6, 5/6 and 1/6. The untouched recipient scored 0/6 on all three. The geometry recipient scored 1/6, 3/6 and 0/6; shuffled geometry scored 0/6, 3/6 and 2/6. Previously familiar protected prompts yielded 4/8 correct free answers at baseline and 1/8, 1/8 and 3/8 after editing. These 18 phrasings cover three codebook draws on one architecture pair. The controls and regressions do not support promoting these LoRAs. For seed 17, the only correct target continuation repeated “gold”; inspect generated text as well as the first-word score.

The complete kit contains the three public cross-family reports and reference-fact/ with the actual seed-17 donor and recipient LoRAs plus the geometry-only cross-packet.json. To fit a fresh SmolLM2 adapter from the shipped packet alone after setup, copy the packet into its own folder and execute:
  .\.venv\Scripts\python.exe cross_family.py recipient --recipient-model models\smollm2-135m-base --packet reference-fact\cross-packet.json --out runs\fact-from-packet --seed 17 --threads 4

The full optional 160M → 70M seed-17 run is in relation-160m-seed17.json. Its donor solved 7/24 held-out pairs, the receiver 1/24 after the geometry edit, and the shuffled control 3/24. Both 70M-native adapters can be compared in adapter-map-seed17.json.

Attach, merge, and reverse the actual cross-family result
Both native PEFT files from seed 17 are supplied in reference-fact. The verified training recipient was SmolLM2-135M. To create separate, inspectable native copies after initial setup:
  .\.venv\Scripts\python.exe cross_family.py apply --role recipient --adapter reference-fact\transfer-adapter --recipient-model models\smollm2-135m-base --dest models\smol-vimora-test
  .\.venv\Scripts\python.exe cross_family.py rollback --role recipient --recipient-model models\smollm2-135m-base --edited models\smol-vimora-test --dest models\smol-vimora-restored

Use only new --dest folders. A successful merge receipt checks the effective rank-12 matrix against PEFT. The rollback receipt checks every reloaded model tensor against the pinned base. reference-fact/native-verification.json records the verified seed-17 donor and recipient round trips. This is an inspection artifact. The measured behavior fell short of a usable factual transplant.

Read the lightning map
The fact study runs lightning_lab.py after it saves the cross-family results. Open Lightning map from the local viewer, or open lightning.html and choose the run’s fact/lightning.json. The shipped lightning-seed17.json replays the published measurement. Each color follows one fixed prompt — Vimora’s harbor lamp (new) and frozen water (protected). Trace how silencing one earlier attention/MLP output changes the receiving adapter’s four strongest singular components. Select a component and read the answer each prompt produced when that component was removed from the full update. Compare unrestricted top tokens, expected-word margins and the four-option ranking. The diagram samples components and individual prompts; a crossing of drawn lines carries no measurement of its own.

Reproduce the published lightning map from only the native recipient and the supplied reference files:
  .\.venv\Scripts\python.exe lightning_lab.py --model models\smollm2-135m-base --adapter reference-fact\transfer-adapter --report cross-family-seed17.json --out runs\lightning.json --threads 4

Use the measured opposing effects to propose a new edit on calibration examples. Score its benefits on all new concepts, all protected concepts, and fresh wording before saving it for daily use. Record both gains and regressions after each successive addition.

In the seed-17 lightning replay, removing mode 1 changed the number of correct unrestricted target words from 1/6 to 0/6 and protected words from 1/8 back to 4/8. All three lost, previously correct protected answers returned. The same mode removal gave different results on the other independently trained adapters. Replay lightning-seed29.json and lightning-seed43.json to check. The four leading singular directions describe this particular trained adapter. Each seed’s adapter has its own directions.

Reference hardware and a separate same-seed repeat
The public seed-17 fact and lightning reports use an Intel Xeon 6787P Linux CPU, Python 3.12.3, torch 2.8.0+cpu, Transformers 4.55.4 and PEFT 0.17.1. The flagship command used --threads 6 (one inter-op thread), --seed 17 --fact-seed 17 --steps 150 --batch 24 --capture-batch 8 --lr .012 --temperature 18. Two independent six-thread runs produced public packet SHA-256 888ee29f6166d667aa095384bf2ed5fc97360207254c14101bd1425da56cf376. The study’s other two public seeds, 29 and 43, used four threads. The default A9 launcher uses four CPU threads. Fitting again with a different CPU reduction order can change the learned factors and answers.

To reproduce the six-thread reference settings directly in the installed environment:
  .\.venv\Scripts\python.exe cross_family.py run --seed 17 --fact-seed 17 --threads 6 --out runs\fact-six-threads

An additional four-thread run completed both studies and the lightning map end to end. Open cross-family-seed17-threads4.json or lightning-seed17-threads4.json with their respective viewers. Its recipient got 1/6 free target answers and 2/8 protected answers. Removing mode 1 lost the only target answer and recovered frozen water. The fixed reference prompt changed from gold to green, and the protected prompt from blue to ice. For the original six-thread edit those transitions were gold to lit and blue to ice. Keep the shipped seed-17 packet and native adapter for exact inspection of the published reference. Distinguish replay of these exact artifacts from retraining on your A9.

Learning to learn — the seed-crystal experiment
Open growth.html directly in a browser from the extracted kit, or select Learning to learn on the lab home page. This small numerical experiment runs in the browser on the A9. It needs its four growth files and lab.css in the same folder. No checkpoint download or Python setup is needed for this study.

Begin with “Learned evidence check”. Pick Above the reference or Within tolerance and step through the verified-example budgets. Compare the learned start with Shuffled seed labels and No seed training. The table and chart show all three on the same later practice examples. Inspect a proposed update, the earlier skills it had to preserve, and the sealed test performance. The three facets visualize measured task accuracy. The weights table and temporary removal of the checker expose the actual shared representation.

Repeat with run seeds 17, 29 and 43. Save each JSON from the page. Record seed-training cost, later examples to criterion, prior-skill scores, and what the fixed direction removal did. A useful result would be cheaper subsequent learning and retention on tasks that depend on the same check. The verifier and the update-acceptance rule are supplied by the experiment. A further study would train the model to choose its own way to check an answer and evaluate that choice on a new task family.

The reference runs reached 85% on the above-reference decision after 8, 32 and 8 examples with the learned checker, versus 16, 80 and 32 with the fresh model. For tolerance the counts were 8, 16 and 40 versus 8, 32 and 40. Each result also requires the earlier skills to stay within four percentage points of their own stage-entry scores on unseen cases. The learned and shuffled starts each used 96 extra labeled examples. Every stage still ran for its full 128 practice cases.

For a machine-readable handoff, run this one command in the extracted folder if Node.js is already installed. It runs all three studies and saves each full report as a new JSON file. The browser download button produces the same data for the selected seed.
  node -e "const fs=require('node:fs'), lab=require('./growth-engine.js'); for (const seed of [17,29,43]) fs.writeFileSync('learning-to-learn-seed'+seed+'.json',JSON.stringify(lab.run(seed)),{flag:'wx'})"
Use a new output folder or rename existing reports before repeating the command. The wx flag protects existing reports.
