From 5bc98e7a3d0a9f9ce1a4b22eec37e67a08e252d9 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 18:33:11 +0800 Subject: [PATCH 01/10] Add VJP-delta state control Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- docs/.nav.yml | 2 + docs/concepts/controls.md | 3 + .../algorithms/state_control/vjp_delta.md | 22 + examples/index.md | 2 + examples/notebooks/algorithms/vjp_delta.ipynb | 176 ++++++++ slop/audits/job_1647.md | 69 ++++ slop/audits/job_1648.md | 53 +++ slop/pr_drafts/2026-09-17_vjp_delta.md | 35 ++ .../2026-09-17_vjp-delta/docs_build.log | 129 ++++++ .../docs_build_nonstrict.log | 89 +++++ .../2026-09-17_vjp-delta/focused_tests.log | 3 + .../2026-09-17_vjp-delta/full_pytest.log | 138 +++++++ .../full_pytest_final.log | 138 +++++++ .../2026-09-17_vjp-delta/gpu_check.log | 9 + .../2026-09-17_vjp-delta/gpu_smoke.py | 33 ++ .../gpu_smoke_final_full.log | 4 + .../gpu_smoke_final_pqf.log | 6 + .../gpu_smoke_final_raw.log | 3 + .../gpu_smoke_final_status.json | 110 +++++ .../2026-09-17_vjp-delta/gpu_smoke_full.log | 8 + .../2026-09-17_vjp-delta/gpu_smoke_pqf.log | 13 + .../2026-09-17_vjp-delta/gpu_smoke_raw.log | 7 + .../gpu_smoke_retry_full.log | 8 + .../gpu_smoke_retry_pqf.log | 13 + .../gpu_smoke_retry_raw.log | 7 + .../gpu_smoke_retry_status.json | 112 ++++++ .../gpu_smoke_status.json | 112 ++++++ .../notebook_execution.log | 114 ++++++ .../notebook_execution_retry.log | 3 + .../2026-09-17_vjp-delta/precommit_all.log | 378 ++++++++++++++++++ .../2026-09-17_vjp-delta/precommit_final.log | 10 + .../2026-09-17_vjp-delta/precommit_staged.log | 14 + .../precommit_staged_final.log | 10 + .../precommit_targeted.log | 10 + slop/verification/2026-09-17_vjp-delta/run.md | 42 ++ .../2026-09-17_vjp-delta/test_vjp_delta.log | 2 + .../test_vjp_delta_final.log | 2 + .../test_vjp_delta_initial.log | 58 +++ .../state_control/vjp_delta/__init__.py | 12 + .../state_control/vjp_delta/args.py | 67 ++++ .../state_control/vjp_delta/control.py | 60 +++ .../algorithms/state_control/vjp_delta/fit.py | 338 ++++++++++++++++ tests/controls/test_vjp_delta.py | 352 ++++++++++++++++ 43 files changed, 2776 insertions(+) create mode 100644 docs/reference/algorithms/state_control/vjp_delta.md create mode 100644 examples/notebooks/algorithms/vjp_delta.ipynb create mode 100644 slop/audits/job_1647.md create mode 100644 slop/audits/job_1648.md create mode 100644 slop/pr_drafts/2026-09-17_vjp_delta.md create mode 100644 slop/verification/2026-09-17_vjp-delta/docs_build.log create mode 100644 slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log create mode 100644 slop/verification/2026-09-17_vjp-delta/focused_tests.log create mode 100644 slop/verification/2026-09-17_vjp-delta/full_pytest.log create mode 100644 slop/verification/2026-09-17_vjp-delta/full_pytest_final.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_check.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke.py create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json create mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json create mode 100644 slop/verification/2026-09-17_vjp-delta/notebook_execution.log create mode 100644 slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log create mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_all.log create mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_final.log create mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_staged.log create mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log create mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_targeted.log create mode 100644 slop/verification/2026-09-17_vjp-delta/run.md create mode 100644 slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log create mode 100644 slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log create mode 100644 slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log create mode 100644 steerability/algorithms/state_control/vjp_delta/__init__.py create mode 100644 steerability/algorithms/state_control/vjp_delta/args.py create mode 100644 steerability/algorithms/state_control/vjp_delta/control.py create mode 100644 steerability/algorithms/state_control/vjp_delta/fit.py create mode 100644 tests/controls/test_vjp_delta.py diff --git a/docs/.nav.yml b/docs/.nav.yml index d4ef49e8..7b2ac5a2 100644 --- a/docs/.nav.yml +++ b/docs/.nav.yml @@ -50,6 +50,7 @@ nav: - DirectionalAblation: "examples/notebooks/algorithms/directional_ablation.ipynb" - ITI: "examples/notebooks/algorithms/iti.ipynb" - PASTA: "examples/notebooks/algorithms/pasta.ipynb" + - VJPDelta: "examples/notebooks/algorithms/vjp_delta.ipynb" - Output control: - BestOfN: "examples/notebooks/algorithms/best_of_n.ipynb" - BudgetForcing: "examples/notebooks/algorithms/budget_forcing.ipynb" @@ -114,6 +115,7 @@ nav: - Directional Ablation: reference/algorithms/state_control/directional_ablation.md - ITI: reference/algorithms/state_control/iti.md - PASTA: reference/algorithms/state_control/pasta.md + - VJPDelta: reference/algorithms/state_control/vjp_delta.md - Output control: - Base classes: reference/algorithms/output_control/base_output_control.md - Common library: reference/algorithms/output_control/common.md diff --git a/docs/concepts/controls.md b/docs/concepts/controls.md index 128ed76e..17658615 100644 --- a/docs/concepts/controls.md +++ b/docs/concepts/controls.md @@ -152,6 +152,9 @@ patching. The toolkit implements: - `PASTA` ([API reference](../reference/algorithms/state_control/pasta.md), [notebook](../examples/notebooks/algorithms/pasta.ipynb)) - *Description*: post-hoc attention steering[@zhang2024tell], rescaling attention to targeted prompt substrings at selected layers and heads. The `head_config` argument takes a dict or list of layers and heads, or a `HeadProfile` recipe that runs the paper's head-profiling stage as a steer-time fit on the loaded model (scoring each candidate head by its paired lift over an unsteered baseline) and freezes the resolved head map. - *Backends*: HF with `attn_implementation` `"eager"` or `"sdpa"` (attention-map writes have no engine form). +- `VJPDelta` ([API reference](../reference/algorithms/state_control/vjp_delta.md), [notebook](../examples/notebooks/algorithms/vjp_delta.ipynb)) + - *Description*: fits a target-state contrast and uses vector-Jacobian products to derive one normalized additive direction per earlier residual layer. `VJPDeltaFit` uses raw prompts, excludes `skip_first` positions and each row's final real token from the VJP spans, and averages each class independently before subtraction. + - *Backends*: HF for fitting (a differentiable staged model is required); HF and vLLM-Hook for the resulting additive intervention. Reusable building blocks shared across the residual-stream methods (estimators, gating, selectors, transforms, steering vectors, hook utilities) are located in diff --git a/docs/reference/algorithms/state_control/vjp_delta.md b/docs/reference/algorithms/state_control/vjp_delta.md new file mode 100644 index 00000000..7547077f --- /dev/null +++ b/docs/reference/algorithms/state_control/vjp_delta.md @@ -0,0 +1,22 @@ +# VJPDelta + +::: steerability.algorithms.state_control.vjp_delta + handler: python + options: + show_if_no_docstring: true + show_source: true + show_root_heading: true + docstring_style: google + show_root_full_path: true + show_object_full_path: false + separate_signature: false + inherited_members: true + show_submodules: true + show_symbol_type_heading: true + show_symbol_type_toc: true + filters: + - "!.*Args$" + - "!^registry" + - "!^STEERING_METHOD" + + diff --git a/examples/index.md b/examples/index.md index c4269db8..7fc4422a 100644 --- a/examples/index.md +++ b/examples/index.md @@ -59,6 +59,8 @@ Algorithm notebooks demonstrate how each method (i.e., control) operates. The me :octicons-arrow-right-24: [PASTA](./notebooks/algorithms/pasta.ipynb) + :octicons-arrow-right-24: [VJPDelta](./notebooks/algorithms/vjp_delta.ipynb) + - __Output control__ --- diff --git a/examples/notebooks/algorithms/vjp_delta.ipynb b/examples/notebooks/algorithms/vjp_delta.ipynb new file mode 100644 index 00000000..4cf320d2 --- /dev/null +++ b/examples/notebooks/algorithms/vjp_delta.ipynb @@ -0,0 +1,176 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "24c9ee9c", + "metadata": {}, + "source": [ + "# VJP-delta\n", + "\n", + "`VJPDelta` fits an additive direction at each chosen source layer. It reads a contrast at a later target layer, then uses a vector-Jacobian product (VJP) to map that contrast back to each source layer. The fitted vectors use the usual state-control additive intervention during generation.\n", + "\n", + "The method is motivated by [J-lens](https://github.com/anthropics/jacobian-lens). The VJP-delta method provenance is [wassname/vjp-steering at `cb03382`](https://github.com/wassname/vjp-steering/tree/cb03382ebd0cc9cad615d169f42e68e8ae3e12a7). This is a repo-native implementation from the documented mathematics and Steerability contracts. It does not copy or assert a license for that source repository.\n", + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "2fe4a263", + "metadata": {}, + "source": [ + "## Setup\n", + "\n", + "This CPU demonstration uses the repository's small random Llama fixture. The control is used through `SteeringPipeline`, the same public pipeline API used with a Hugging Face checkpoint." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "1c306fb6", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-17T10:19:34.756544Z", + "iopub.status.busy": "2026-09-17T10:19:34.756418Z", + "iopub.status.idle": "2026-09-17T10:19:41.986909Z", + "shell.execute_reply": "2026-09-17T10:19:41.986101Z" + } + }, + "outputs": [], + "source": [ + "from pathlib import Path\n", + "import tempfile\n", + "\n", + "from steerability.algorithms.core.steering_pipeline import SteeringPipeline\n", + "from steerability.algorithms.state_control.vjp_delta import VJPDelta\n", + "from steerability.spipe import SPipe\n", + "from tests.utils.tiny_models import tiny_llama, wordlevel_tokenizer\n", + "\n", + "model = tiny_llama()\n", + "tokenizer = wordlevel_tokenizer()\n", + "fit_data = {\n", + " \"positives\": [\"the cat sat\", \"the dog ran\"],\n", + " \"negatives\": [\"dog ran fast\"],\n", + "}\n", + "control = VJPDelta(\n", + " data=fit_data,\n", + " target_layer=2,\n", + " source_layer_ids=[0, 1],\n", + " skip_first=0,\n", + " strength=0.5,\n", + ")\n", + "pipeline = SteeringPipeline(\n", + " model=model,\n", + " tokenizer=tokenizer,\n", + " controls=[control],\n", + " model_name_or_path=\"tiny-llama-demo\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "5c87a2e7", + "metadata": {}, + "source": [ + "## Extract and steer\n", + "\n", + "The raw prompts have unequal positive and negative pool sizes. `steer()` extracts the vectors, then binds the standard additive intervention. The stored direction rows are unit norm." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "ca2ba708", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-17T10:19:41.988672Z", + "iopub.status.busy": "2026-09-17T10:19:41.988538Z", + "iopub.status.idle": "2026-09-17T10:19:42.085290Z", + "shell.execute_reply": "2026-09-17T10:19:42.084637Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'layers': [0, 1], 'reply': \"'the'\"}\n" + ] + } + ], + "source": [ + "pipeline.steer()\n", + "vector = control.export_state()[\"intervention_0/transform\"]\n", + "assert set(vector.directions) == {0, 1}\n", + "assert all(abs(direction.norm().item() - 1.0) < 1e-5 for direction in vector.directions.values())\n", + "\n", + "reply = pipeline.generate(text=\"the cat\", max_new_tokens=3, do_sample=False)\n", + "print({\"layers\": sorted(vector.directions), \"reply\": repr(reply)})" + ] + }, + { + "cell_type": "markdown", + "id": "5b74b575", + "metadata": {}, + "source": [ + "## Freeze and reload\n", + "\n", + "The frozen form contains the fitted vectors as an `ActivationAdapter`. Reloading it resolves the stored additive artifact and does not run another VJP fit." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "651ceb9c", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-17T10:19:42.086797Z", + "iopub.status.busy": "2026-09-17T10:19:42.086660Z", + "iopub.status.idle": "2026-09-17T10:19:43.355837Z", + "shell.execute_reply": "2026-09-17T10:19:43.355164Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'bundle': '/tmp/tmp1jqfr_4f/vjp_delta_demo', 'reply_matches': True}\n" + ] + } + ], + "source": [ + "bundle = Path(tempfile.mkdtemp()) / \"vjp_delta_demo\"\n", + "saved = pipeline.to_spipe().save(bundle)\n", + "reloaded = SPipe.load(saved).pipeline()\n", + "assert type(reloaded.state_controls[0]).__name__ == \"ActivationAdapter\"\n", + "reloaded.model, reloaded.tokenizer = model, tokenizer\n", + "reloaded.steer()\n", + "reloaded_reply = reloaded.generate(text=\"the cat\", max_new_tokens=3, do_sample=False)\n", + "assert reloaded_reply == reply\n", + "print({\"bundle\": str(saved), \"reply_matches\": reloaded_reply == reply})" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/slop/audits/job_1647.md b/slop/audits/job_1647.md new file mode 100644 index 00000000..d8d45840 --- /dev/null +++ b/slop/audits/job_1647.md @@ -0,0 +1,69 @@ +# Audit: CUDA VJP-delta smoke job 1647 + +- target: queued CUDA extraction and additive-generation smoke test. +- provenance: job `1647`, default GPU queue, worktree `/home/code/dev/steerability-vjp`, command `env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py`, started `2026-09-17T18:23:42+08:00`, ended `2026-09-17T18:23:50+08:00`, exit `1`. The worktree was dirty during implementation, so this audit names the script and source lines rather than claiming a commit revision. +- complete evidence: [clean log](../verification/2026-09-17_vjp-delta/gpu_smoke_full.log), [raw log](../verification/2026-09-17_vjp-delta/gpu_smoke_raw.log), and [queue record](../verification/2026-09-17_vjp-delta/gpu_smoke_status.json). + +| stage | expected | observed | expected? | clues | missing metric | consequence | +| --- | --- | --- | --- | --- | --- | --- | +| CUDA backward | fit runs through CUDA | cuBLAS was initialized before the assertion | yes | `gpu_smoke_full.log:2-3` | fit completion marker | no evidence of backward failure | +| artifact persistence | source master saves detached CPU directions | test inspected bound transform directions instead | unclear | `fit.py:301-318`; `context.py:105-112` | direct source result device | assertion tests the wrong layer of the contract | +| additive generation | public `generate()` completes | not reached | no | `gpu_smoke_full.log:5-8` | reply | retry after correcting assertion | +| queue resolve condition | record CUDA result or diagnose failure | not met | no | job label in `gpu_smoke_status.json` | successful reply | rerun needed | + +## Evidence narrative + +The full seven-line cleaned log says: + +> `/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context...` +> `return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass` +> `Traceback (most recent call last):` +> `File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 19, in ` +> `assert all(vector.device.type == "cpu" for vector in control.export_state()["intervention_0/transform"].directions.values())` +> `AssertionError` + +The job's own test reached line 19 after `pipeline.steer()` (`gpu_smoke.py:17-19`). The source saves each fitted direction using `.detach().cpu()` (`fit.py:301-318`). The common transform context then resolves an artifact and calls `.to(device, dtype)` before binding it for generation (`context.py:105-112`). Thus the bound transform being on CUDA is expected. The log gives no evidence that fitting or CUDA backward failed, and it gives no generation output. + +## Hypotheses + +### H1 [bug | Highly Likely | 95%] + +- Mechanism: the smoke assertion confuses the CPU fit master with the model-device copy that `TransformContext` binds for inference. +- Evidence: `fit.py:307` contains `.detach().cpu()`, while `context.py:111` contains `return resolved.to(device, dtype)`; the failed assertion inspects `control.export_state()` after binding. +- Contrary evidence: no direct test yet inspects `VJPDeltaFit.resolve()` on CUDA. +- Discriminating test: resolve `VJPDeltaFit` directly and require CPU directions, then run `VJPDelta(...).steer()` and require its bound directions to match the CUDA model device. +- Fix/action: correct the smoke script and add that maintained regression. +- Interpretability: partial. The job establishes that CUDA backward was reached, but not the requested full pipeline smoke. + +### H2 [harness | Unlikely | 8%] + +- Mechanism: the queued environment used a different package than the worktree. +- Evidence: the queue command records `PYTHONPATH=/home/code/dev/steerability-vjp` in `gpu_smoke_status.json`, and the traceback points at the worktree smoke script. +- Contrary evidence: it does not print `steerability.__file__` or a source hash. +- Discriminating test: print `steerability.__file__` in the retry. +- Fix/action: add that provenance line to the smoke output. +- Interpretability: partial. The traceback makes this unlikely, but the exact imported module path was not logged. + +### H3 [bug | Remote | 3%] + +- Mechanism: CUDA backward succeeds but the subsequent additive generation fails. +- Evidence: generation was never run because the assertion exits first. +- Contrary evidence: the same tiny model completed CPU generation in the executed notebook and focused tests. +- Discriminating test: corrected queued smoke prints the reply after `pipeline.generate()`. +- Fix/action: rerun the queued smoke after H1's correction. +- Interpretability: no for CUDA generation until the retry. + +## Decision + +1. Resolve-condition verdict: **not met**. The label required a CUDA result or diagnosis; the job diagnosed an assertion error but did not complete generation. +2. Prediction check: the expected CPU master was supported by `fit.py:307`; the assertion's expectation for the bound inference artifact was contradicted by `context.py:111`. +3. Earliest unsupported link: post-bind CUDA generation. The retry needs a public-pipeline reply. +4. Validity: this is an **inconclusive harness failure**, not evidence against VJP-delta. `P(result is invalid as a CUDA method test) ≈ 0.95` because generation was not measured. +5. Highest-information clues: `gpu_smoke.py:19` names the failed assertion; `fit.py:307` names CPU master storage; `context.py:111` names the expected CUDA bind copy. +6. Missing evidence: successful CUDA reply, direct fit-master device, imported-module path. +7. Required change: correct the smoke assertion and add the maintained CPU-master/CUDA-bound regression. +8. No method conclusion changes: the job has no efficacy metric or completed generation. +9. What changes the verdict: a successful queued run that prints imported path, master device, bound device, and reply. +10. Sequence: update the assertion, run focused CPU regression, then queue one corrected CUDA smoke. Do not change extraction mathematics while this artifact-device distinction remains the leading explanation. + + diff --git a/slop/audits/job_1648.md b/slop/audits/job_1648.md new file mode 100644 index 00000000..4a0dd1be --- /dev/null +++ b/slop/audits/job_1648.md @@ -0,0 +1,53 @@ +# Audit: CUDA VJP-delta retry job 1648 + +- target: distinguish a CPU fit master from a CUDA-bound artifact, then complete public generation. +- provenance: job `1648`, default GPU queue, worktree `/home/code/dev/steerability-vjp`, same logged command as [job 1647](job_1647.md), started `2026-09-17T18:26:00+08:00`, ended `2026-09-17T18:26:08+08:00`, exit `1`. +- complete evidence: [clean log](../verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log), [raw log](../verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log), and [queue record](../verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json). + +| stage | expected | observed | expected? | clues | missing metric | consequence | +| --- | --- | --- | --- | --- | --- | --- | +| CUDA extraction | CUDA VJP fit | cuBLAS backward warning then no extraction exception | unclear | `gpu_smoke_retry_full.log:2-3` | printed master device | later print error hides result | +| bind | model-device artifact | no assertion error before print | likely | script lines 22-25 ran | printed bound device | likely passed, not logged | +| generation | public reply | `reply = pipeline.generate(...)` ran before failing print | likely | `gpu_smoke.py:26-31` | reply text | no printed output | +| reporting | print result | missing private property | no | `AttributeError: 'VJPDelta' object has no attribute '_layer_ids'` | all requested fields | retry needed | + +The full log says: + +> `File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 31, in ` +> `"layers": control._layer_ids,` +> `AttributeError: 'VJPDelta' object has no attribute '_layer_ids'` + +`reply` is assigned immediately before this dictionary is built. This makes completed public generation likely, but the assertion is not directly observable in the job output. + +### H1 [harness | Almost Certain | 98%] + +- Mechanism: the smoke script used CAA's private `_layer_ids` property on `VJPDelta`, which has no such property. +- Evidence: the direct traceback above names the missing attribute. The script's source line is after both binding and `pipeline.generate()`. +- Contrary evidence: none in the complete seven-line log. +- Discriminating test: replace that field with `sorted(bound.directions)`; success prints master device, bound device, and reply. +- Fix/action: change only the smoke-report field and queue one final retry. +- Interpretability: partial. It gives no negative evidence about CUDA extraction or generation. + +### H2 [bug | Remote | 3%] + +- Mechanism: a CUDA method failure occurred before reporting but after reply assignment. +- Evidence: no method exception appears in the full log. +- Contrary evidence: execution reached the reporting dictionary after `pipeline.generate()`. +- Discriminating test: final retry prints an explicit reply. +- Fix/action: no production change before that retry. +- Interpretability: no for the final CUDA verdict. + +## Decision + +1. Resolve-condition verdict: **not met** because reporting failed. +2. Prediction check: the private-property hypothesis is supported by the exact `AttributeError`; no method prediction was tested. +3. Earliest unsupported link: printed confirmation of public CUDA generation. +4. Validity: **invalid as a smoke outcome**, `P ≈ 0.98`, because the harness failed after the generation call. +5. Highest-information clue: the traceback points at a reporting-only field, after the operation being checked. +6. Missing evidence: one complete result dictionary. +7. Required change: replace `_layer_ids` with keys of the bound artifact. +8. No method conclusion changes. +9. What changes the verdict: one successful queued log with the requested result dictionary. +10. Sequence: repair the report field, rerun one queued smoke, then stop GPU retries if it prints the expected fields. + + diff --git a/slop/pr_drafts/2026-09-17_vjp_delta.md b/slop/pr_drafts/2026-09-17_vjp_delta.md new file mode 100644 index 00000000..da7f73bc --- /dev/null +++ b/slop/pr_drafts/2026-09-17_vjp_delta.md @@ -0,0 +1,35 @@ +# Draft PR: Add VJP-delta state control + +## Title + +Add VJP-delta activation steering + +## Body + +### Summary + +- add `VJPDeltaFit`, a MODULE-access fit source that derives normalized source-layer additive directions with vector-Jacobian products +- add the registered `VJPDelta` control and freeze it to the existing `ActivationAdapter` additive form +- add regression coverage for unequal classes, explicit tiny-Jacobian contraction with cross-token dependence, state restoration, serialization, batching, device binding, and source cleanup +- add reference, navigation, controls catalog, and an executed CPU notebook + +### Method and provenance + +The fit forms its target contrast from the final unpadded token, applies it at valid target positions, averages source-position gradients per prompt, averages classes independently, subtracts the class means, and normalizes each source layer. Valid positions exclude `skip_first` and the final real token. + +The method is motivated by Anthropic's J-lens work. VJP-delta implementation provenance is `wassname/vjp-steering@cb03382ebd0cc9cad615d169f42e68e8ae3e12a7`. This contribution is independently implemented from the documented mathematics and destination contracts. It does not copy or assert a license for the provenance repository. + +### Verification + +- focused controls: `91 passed` +- VJP-delta regressions: `9 passed` +- full suite: final run recorded in `slop/verification/2026-09-17_vjp-delta/full_pytest_final.log` +- notebook: executed with stored outputs +- docs: non-strict MkDocs build passes; strict mode remains blocked by 23 existing warnings outside this change +- CUDA queue smoke `1649`: master vectors were CPU, bound vectors CUDA, and public generation returned `'the'` + +### Editorial review requested + +Please review the source-license wording before publication. The source repository did not provide relicensing permission. + + diff --git a/slop/verification/2026-09-17_vjp-delta/docs_build.log b/slop/verification/2026-09-17_vjp-delta/docs_build.log new file mode 100644 index 00000000..e4489fed --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/docs_build.log @@ -0,0 +1,129 @@ + + │ ⚠ Warning from the Material for MkDocs team + │ + │ MkDocs 2.0, the underlying framework of Material for MkDocs, + │ will introduce backward-incompatible changes, including: + │ + │ × All plugins will stop working – the plugin system has been removed + │ × All theme overrides will break – the theming system has been rewritten + │ × No migration path exists – existing projects cannot be upgraded + │ × Closed contribution model – community members can't report bugs + │ × Currently unlicensed – unsuitable for production use + │ + │ Our full analysis: + │ + │ https://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/ + +INFO - Loading data from bib files: ['/home/code/dev/steerability-vjp/docs/assets/references.bib'] +INFO - Cleaning site directory +INFO - Building documentation to directory: /home/code/dev/steerability-vjp/site +INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: + - _hooks/bibtex_warnings.py + - examples/notebooks/recipes/vllm_serve.ipynb + - examples/notebooks/recipes/routed_decoding/data.py + - examples/notebooks/studies/commonsense_mcqa/task.py + - examples/notebooks/studies/instruction_following/task.py +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/_hooks/bibtex_warnings.py +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/_hooks/bibtex_warnings.py +WARNING - Doc file 'concepts/controls.md' contains a link '../examples/notebooks/algorithms/user_prefix.ipynb', but the target 'examples/notebooks/algorithms/user_prefix.ipynb' is not found among documentation files. +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/act_add.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/act_add.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/angular_steering.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/angular_steering.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/best_of_n.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/best_of_n.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/budget_forcing.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/budget_forcing.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/caa.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/caa.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cast.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cast.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/contrastive_decoding.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/contrastive_decoding.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cpo.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cpo.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/deal.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/deal.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/dexperts.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/dexperts.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/directional_ablation.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/directional_ablation.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/gepa.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/gepa.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/iti.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/iti.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/pasta.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/pasta.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/prewrite.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/prewrite.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/rad.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/rad.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/sasa.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/sasa.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/system_prompt.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/system_prompt.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/vjp_delta.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/vjp_delta.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/activation_adapter.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/activation_adapter.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/contrastive_guidance.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/contrastive_guidance.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/phased_decoding.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/phased_decoding.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/search_decoding.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/search_decoding.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/stopping_rules.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/stopping_rules.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/value_guidance.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/value_guidance.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/mergekit.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/mergekit.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/trl.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/trl.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/honest_persona_prompting.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/honest_persona_prompting.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/vllm_serve.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/vllm_serve.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/working_with_spipes.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/working_with_spipes.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/data.py +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/data.py +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/routed_decoding.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/routed_decoding.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/routing_vs_prompting.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/routing_vs_prompting.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/commonsense_mcqa.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/commonsense_mcqa.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/task.py +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/task.py +WARNING - Inline reference to unknown key instruction_following +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/instruction_following.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/instruction_following.ipynb +WARNING - Inline reference to unknown key scorer +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/task.py +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/task.py +INFO - mkdocstrings_handlers: Formatting signatures requires either Black or Ruff to be installed. +WARNING - griffe: steerability/algorithms/core/internals/probes/fitting.py:583: No type or annotation for parameter 'session' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: No type or annotation for parameter 'text' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: Parameter 'text' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: No type or annotation for parameter 'mode' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: Parameter 'mode' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: No type or annotation for parameter 'separator' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: Parameter 'separator' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: No type or annotation for parameter 'text' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: Parameter 'text' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: No type or annotation for parameter 'separator' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: Parameter 'separator' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: No type or annotation for parameter 'placement' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: Parameter 'placement' does not appear in the function signature +WARNING - griffe: steerability/algorithms/output_control/common/granite_heads.py:57: No type or annotation for parameter '**from_pretrained_kwargs' +WARNING - griffe: steerability/algorithms/output_control/rad/utils/reward_training.py:106: No type or annotation for parameter 'model' +WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:267: No type or annotation for parameter 'substrings' +WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:155: No type or annotation for parameter 'session' +WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:273: No type or annotation for parameter 'model' +WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:274: No type or annotation for parameter 'tokenizer' +WARNING - Inline reference to unknown key instruction_following + +Aborted with 23 warnings in strict mode! diff --git a/slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log b/slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log new file mode 100644 index 00000000..4abfed48 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log @@ -0,0 +1,89 @@ + + │ ⚠ Warning from the Material for MkDocs team + │ + │ MkDocs 2.0, the underlying framework of Material for MkDocs, + │ will introduce backward-incompatible changes, including: + │ + │ × All plugins will stop working – the plugin system has been removed + │ × All theme overrides will break – the theming system has been rewritten + │ × No migration path exists – existing projects cannot be upgraded + │ × Closed contribution model – community members can't report bugs + │ × Currently unlicensed – unsuitable for production use + │ + │ Our full analysis: + │ + │ https://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/ + +INFO - Loading data from bib files: ['/home/code/dev/steerability-vjp/docs/assets/references.bib'] +INFO - Cleaning site directory +INFO - Building documentation to directory: /home/code/dev/steerability-vjp/site +INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: + - _hooks/bibtex_warnings.py + - examples/notebooks/recipes/vllm_serve.ipynb + - examples/notebooks/recipes/routed_decoding/data.py + - examples/notebooks/studies/commonsense_mcqa/task.py + - examples/notebooks/studies/instruction_following/task.py +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/_hooks/bibtex_warnings.py +WARNING - Doc file 'concepts/controls.md' contains a link '../examples/notebooks/algorithms/user_prefix.ipynb', but the target 'examples/notebooks/algorithms/user_prefix.ipynb' is not found among documentation files. +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/act_add.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/angular_steering.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/best_of_n.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/budget_forcing.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/caa.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cast.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/contrastive_decoding.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cpo.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/deal.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/dexperts.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/directional_ablation.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/gepa.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/iti.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/pasta.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/prewrite.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/rad.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/sasa.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/system_prompt.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/vjp_delta.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/activation_adapter.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/contrastive_guidance.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/phased_decoding.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/search_decoding.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/stopping_rules.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/value_guidance.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/mergekit.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/trl.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/honest_persona_prompting.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/vllm_serve.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/working_with_spipes.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/data.py +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/routed_decoding.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/routing_vs_prompting.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/commonsense_mcqa.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/task.py +WARNING - Inline reference to unknown key instruction_following +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/instruction_following.ipynb +WARNING - Inline reference to unknown key scorer +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/task.py +INFO - mkdocstrings_handlers: Formatting signatures requires either Black or Ruff to be installed. +WARNING - griffe: steerability/algorithms/core/internals/probes/fitting.py:583: No type or annotation for parameter 'session' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: No type or annotation for parameter 'text' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: Parameter 'text' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: No type or annotation for parameter 'mode' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: Parameter 'mode' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: No type or annotation for parameter 'separator' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: Parameter 'separator' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: No type or annotation for parameter 'text' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: Parameter 'text' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: No type or annotation for parameter 'separator' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: Parameter 'separator' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: No type or annotation for parameter 'placement' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: Parameter 'placement' does not appear in the function signature +WARNING - griffe: steerability/algorithms/output_control/common/granite_heads.py:57: No type or annotation for parameter '**from_pretrained_kwargs' +WARNING - griffe: steerability/algorithms/output_control/rad/utils/reward_training.py:106: No type or annotation for parameter 'model' +WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:267: No type or annotation for parameter 'substrings' +WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:155: No type or annotation for parameter 'session' +WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:273: No type or annotation for parameter 'model' +WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:274: No type or annotation for parameter 'tokenizer' +WARNING - Inline reference to unknown key instruction_following +INFO - Documentation built in 30.46 seconds diff --git a/slop/verification/2026-09-17_vjp-delta/focused_tests.log b/slop/verification/2026-09-17_vjp-delta/focused_tests.log new file mode 100644 index 00000000..df6eba8d --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/focused_tests.log @@ -0,0 +1,3 @@ +........................................................................ [ 79%] +................... [100%] +91 passed in 25.28s diff --git a/slop/verification/2026-09-17_vjp-delta/full_pytest.log b/slop/verification/2026-09-17_vjp-delta/full_pytest.log new file mode 100644 index 00000000..7e980041 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/full_pytest.log @@ -0,0 +1,138 @@ +.....................ssss..s....ss..s..s..s............................. [ 2%] +...ssssssssssssssss........ssss..s..s................................... [ 4%] +.............ssssssssssssssssssssssss........ssss..s..s..s..s..s..s..s.. [ 6%] +s..s..s..s..s................................................sssssssssss [ 8%] +sssssssssssss..s..s..s..s.............s..s...s...........s..s..s...s..s. [ 10%] +.......ssss..s....ss..s..s..s................................sssssssssss [ 12%] +sssss........ssss..s..s................................................s [ 14%] +sssssssssssssssssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s. [ 16%] +...............................................ssssssssssssssssssssssss. [ 18%] +.s..s..s..s...........ssssss...ss........ssssss..ss..s..s........ssss..s [ 20%] +....ss..s..s..s................................ssssssssssssssss........s [ 22%] +sss..s..s................................................sssssssssssssss [ 24%] +sssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s............... [ 26%] +.................................ssssssssssssssssssssssss..s..s..s..s... [ 28%] +..........s..s...s...........s..s..s...s..s............................. [ 30%] +........................................................................ [ 32%] +........................................................................ [ 34%] +........................................................................ [ 36%] +........................................................................ [ 38%] +........................................................................ [ 40%] +..............................................s......................... [ 42%] +........................................................................ [ 44%] +........................................................................ [ 46%] +........................................................................ [ 48%] +........................................................................ [ 50%] +........................................................................ [ 52%] +........................................................................ [ 54%] +........................................................................ [ 56%] +........................................................................ [ 58%] +........................................................................ [ 60%] +........................................................................ [ 62%] +........................................................................ [ 64%] +........................................................................ [ 66%] +........................................................................ [ 68%] +........................................................................ [ 70%] +........................................................................ [ 72%] +...............................................................s........ [ 74%] +........................................................................ [ 76%] +........................................................................ [ 78%] +........................................................................ [ 80%] +........................................................................ [ 82%] +.............................................s.......................... [ 84%] +........................................................................ [ 86%] +........................................................................ [ 88%] +........................................................................ [ 90%] +........................................................................ [ 92%] +........................................................................ [ 94%] +........................................................................ [ 96%] +........................................................................ [ 98%] +................................................................. [100%] +=============================== warnings summary =============================== +tests/controls/test_few_shot.py: 144 warnings + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: FewShot override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cuda] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cuda] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cuda] + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/sklearn/decomposition/_pca.py:646: RuntimeWarning: invalid value encountered in divide + explained_variance_ratio_ = explained_variance_ / total_var + +tests/controls/test_lora_composition.py::test_lora_then_caa_steers_and_hooks_adapted_layer + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/utils/save_and_load.py:438: UserWarning: Could not find a config file in - will assume that the vocabulary was not modified. + warnings.warn( + +tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/mapping_func.py:72: UserWarning: You are trying to modify a model with PEFT for a second time. If you want to reload the model with a different config, make sure to call `.unload()` before. + warnings.warn( + +tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py:305: UserWarning: Already found a `peft_config` attribute in the model. This will lead to having multiple adapters in the model. Make sure to know what you are doing! + warnings.warn( + +tests/evaluation/test_inspect_integration.py::TestMessagesPathIntegration::test_batched_eval_fires_adapt_messages_once_per_sample + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:954: PydanticDeprecatedSince20: `__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ + warnings.warn( + +tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: + + Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ + warnings.warn( + ~~~~~~~~~~~~~^ + f"Unclosed <{self.__class__.__name__} at {id(self):x}>", + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<2 lines>... + source=self, + ^^^^^^^^^^^^ + ) + ^ + ResourceWarning: Unclosed + + Enable tracemalloc to get traceback where the object was allocated. + See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. + warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + +tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: + + Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ + warnings.warn( + ~~~~~~~~~~~~~^ + f"Unclosed <{self.__class__.__name__} at {id(self):x}>", + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<2 lines>... + source=self, + ^^^^^^^^^^^^ + ) + ^ + ResourceWarning: Unclosed + + Enable tracemalloc to get traceback where the object was allocated. + See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. + warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + +tests/evaluation/test_runner.py::TestRunShapeAndResults::test_run_shape_and_results_frame +tests/evaluation/test_runner.py::TestRunShapeAndResults::test_one_provider_name_per_config_and_trial_seeds + /home/code/dev/steerability-vjp/steerability/evaluation/runner.py:203: UserWarning: seed is set but no temperature is configured in generate_defaults or any suite's generate_overrides; trial seeds are attached to sampling dispatches only, so the derived seeds will not be attached. Pass generate_defaults={'temperature': 0} for greedy decoding or an explicit sampling temperature. + warnings.warn( + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +3256 passed, 340 skipped, 166 warnings in 262.72s (0:04:22) diff --git a/slop/verification/2026-09-17_vjp-delta/full_pytest_final.log b/slop/verification/2026-09-17_vjp-delta/full_pytest_final.log new file mode 100644 index 00000000..c54714f8 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/full_pytest_final.log @@ -0,0 +1,138 @@ +.....................ssss..s....ss..s..s..s............................. [ 2%] +...ssssssssssssssss........ssss..s..s................................... [ 4%] +.............ssssssssssssssssssssssss........ssss..s..s..s..s..s..s..s.. [ 6%] +s..s..s..s..s................................................sssssssssss [ 8%] +sssssssssssss..s..s..s..s.............s..s...s...........s..s..s...s..s. [ 10%] +.......ssss..s....ss..s..s..s................................sssssssssss [ 12%] +sssss........ssss..s..s................................................s [ 14%] +sssssssssssssssssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s. [ 16%] +...............................................ssssssssssssssssssssssss. [ 18%] +.s..s..s..s...........ssssss...ss........ssssss..ss..s..s........ssss..s [ 20%] +....ss..s..s..s................................ssssssssssssssss........s [ 22%] +sss..s..s................................................sssssssssssssss [ 24%] +sssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s............... [ 26%] +.................................ssssssssssssssssssssssss..s..s..s..s... [ 28%] +..........s..s...s...........s..s..s...s..s............................. [ 30%] +........................................................................ [ 32%] +........................................................................ [ 34%] +........................................................................ [ 36%] +........................................................................ [ 38%] +........................................................................ [ 40%] +..............................................s......................... [ 42%] +........................................................................ [ 44%] +........................................................................ [ 46%] +........................................................................ [ 48%] +........................................................................ [ 50%] +........................................................................ [ 52%] +........................................................................ [ 54%] +........................................................................ [ 56%] +........................................................................ [ 58%] +........................................................................ [ 60%] +........................................................................ [ 62%] +........................................................................ [ 64%] +........................................................................ [ 66%] +........................................................................ [ 68%] +........................................................................ [ 70%] +........................................................................ [ 72%] +................................................................s....... [ 74%] +........................................................................ [ 76%] +........................................................................ [ 78%] +........................................................................ [ 80%] +........................................................................ [ 82%] +..............................................s......................... [ 84%] +........................................................................ [ 86%] +........................................................................ [ 88%] +........................................................................ [ 90%] +........................................................................ [ 92%] +........................................................................ [ 94%] +........................................................................ [ 96%] +........................................................................ [ 98%] +.................................................................. [100%] +=============================== warnings summary =============================== +tests/controls/test_few_shot.py: 144 warnings + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: FewShot override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cuda] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cuda] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cuda] + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/sklearn/decomposition/_pca.py:646: RuntimeWarning: invalid value encountered in divide + explained_variance_ratio_ = explained_variance_ / total_var + +tests/controls/test_lora_composition.py::test_lora_then_caa_steers_and_hooks_adapted_layer + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/utils/save_and_load.py:438: UserWarning: Could not find a config file in - will assume that the vocabulary was not modified. + warnings.warn( + +tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/mapping_func.py:72: UserWarning: You are trying to modify a model with PEFT for a second time. If you want to reload the model with a different config, make sure to call `.unload()` before. + warnings.warn( + +tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py:305: UserWarning: Already found a `peft_config` attribute in the model. This will lead to having multiple adapters in the model. Make sure to know what you are doing! + warnings.warn( + +tests/evaluation/test_inspect_integration.py::TestMessagesPathIntegration::test_batched_eval_fires_adapt_messages_once_per_sample + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:954: PydanticDeprecatedSince20: `__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ + warnings.warn( + +tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: + + Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ + warnings.warn( + ~~~~~~~~~~~~~^ + f"Unclosed <{self.__class__.__name__} at {id(self):x}>", + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<2 lines>... + source=self, + ^^^^^^^^^^^^ + ) + ^ + ResourceWarning: Unclosed + + Enable tracemalloc to get traceback where the object was allocated. + See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. + warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + +tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: + + Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ + warnings.warn( + ~~~~~~~~~~~~~^ + f"Unclosed <{self.__class__.__name__} at {id(self):x}>", + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<2 lines>... + source=self, + ^^^^^^^^^^^^ + ) + ^ + ResourceWarning: Unclosed + + Enable tracemalloc to get traceback where the object was allocated. + See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. + warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + +tests/evaluation/test_runner.py::TestRunShapeAndResults::test_run_shape_and_results_frame +tests/evaluation/test_runner.py::TestRunShapeAndResults::test_one_provider_name_per_config_and_trial_seeds + /home/code/dev/steerability-vjp/steerability/evaluation/runner.py:203: UserWarning: seed is set but no temperature is configured in generate_defaults or any suite's generate_overrides; trial seeds are attached to sampling dispatches only, so the derived seeds will not be attached. Pass generate_defaults={'temperature': 0} for greedy decoding or an explicit sampling temperature. + warnings.warn( + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +3257 passed, 340 skipped, 166 warnings in 254.56s (0:04:14) diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_check.log b/slop/verification/2026-09-17_vjp-delta/gpu_check.log new file mode 100644 index 00000000..b1a379e9 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_check.log @@ -0,0 +1,9 @@ +## Available-device check +2026-09-17T18:23:18+08:00 +NVIDIA GeForce RTX 3090, 580.173.02, 24576 MiB + +Pueue groups: +Group "api" (4 parallel): running +Group "default" (1 parallel): running +Group "local_gpu" (1 parallel): running +Group "modal" (1 parallel): running diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py b/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py new file mode 100644 index 00000000..636201f9 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py @@ -0,0 +1,33 @@ +"""Queued CUDA smoke test for VJP-delta extraction and generation.""" +import torch + +from steerability.algorithms.core.steering_pipeline import SteeringPipeline +from steerability.algorithms.state_control.vjp_delta import VJPDelta, VJPDeltaFit +from tests.utils.tiny_models import tiny_llama, wordlevel_tokenizer + +assert torch.cuda.is_available(), "CUDA was unavailable when this queued VJP-delta check ran." +model = tiny_llama().to("cuda") +tokenizer = wordlevel_tokenizer() +source = VJPDeltaFit( + data={"positives": ["the cat sat", "the dog ran"], "negatives": ["dog ran fast"]}, + target_layer=2, + source_layer_ids=[0, 1], + skip_first=0, +) +master = source.resolve(model, tokenizer) +assert all(vector.device.type == "cpu" for vector in master.directions.values()) +control = VJPDelta(steering_vector=source) +pipeline = SteeringPipeline(model=model, tokenizer=tokenizer, controls=[control], model_name_or_path="tiny-cuda") +pipeline.steer() +bound = control.export_state()["intervention_0/transform"] +assert all(vector.device.type == "cuda" for vector in bound.directions.values()) +reply = pipeline.generate(text="the cat", max_new_tokens=2, do_sample=False) +import steerability + +print({ + "module": steerability.__file__, + "master_device": master.directions[0].device.type, + "bound_device": bound.directions[0].device.type, + "reply": reply, + "layers": sorted(bound.directions), +}) diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log new file mode 100644 index 00000000..6f081fac --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log @@ -0,0 +1,4 @@ +[pq] task 1649: last 3 of 3 clean lines -- /home/code/.local/share/pueue/task_logs/1649.log +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +{'module': '/home/code/dev/steerability-vjp/steerability/__init__.py', 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]} diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log new file mode 100644 index 00000000..459c10cb --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log @@ -0,0 +1,6 @@ +[pq] task 1649: last 3 of 3 clean lines -- /home/code/.local/share/pueue/task_logs/1649.log +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +{'module': '/home/code/dev/steerability-vjp/steerability/__init__.py', 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]} + +[pq] task 1649 SUCCESS in 9s -- why: confirm corrected CUDA VJP smoke through report; resolve: CPU master, CUDA bound vector, public reply all print diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log new file mode 100644 index 00000000..74fb263e --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log @@ -0,0 +1,3 @@ +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +{'module': '/home/code/dev/steerability-vjp/steerability/__init__.py', 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]} diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json new file mode 100644 index 00000000..6df14795 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json @@ -0,0 +1,110 @@ +{ + "id": 1649, + "created_at": "2026-09-17T18:27:10.473524776+08:00", + "original_command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", + "command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", + "path": "/home/code/dev/steerability-vjp", + "envs": { + "PATH": "/home/code/.pi/agent/bin:/home/wassname/.local/bin:/home/code/.cargo/bin/:/home/code/.bun/bin:/home/code/.opencode/bin:/home/code/Opt:/home/code/.local/bin:/home/code/.fzf/bin/:/home/code/.local/bin:/home/code/.local/share/mise/shims:/home/code/.local/bin:/home/code/.local/share/mise/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", + "forgit_stash_push": "gsp", + "EDITOR": "nvim", + "forgit_checkout_branch": "gcb", + "FZF_DEFAULT_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", + "forgit_attributes": "gat", + "LESS": "--ignore-case --jump-target=4 --LONG-PROMPT --no-init --quit-if-one-screen --RAW-CONTROL-CHARS", + "forgit_worktree_delete": "gwd", + "forgit_rebase": "grb", + "forgit_restore": "grs", + "EZA_COLORS": "da=1;34:gm=1;34:Su=1;34", + " ": "/home/code/.local/bin/pueue", + "VISUAL": "zed --wait", + "NVM_DIR": "/home/code/.nvm", + "LS_COLORS": "di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43", + "PWD": "/home/code/dev/steerability-vjp", + "forgit_ignore": "gi", + "forgit_reflog": "grl", + "GREP_COLORS": "mt=37;45", + "forgit_show": "gso", + "FZF_CTRL_T_OPTS": "--bind ctrl-/:toggle-preview --preview 'if [[ -d {} ]]; then eza --group-directories-first --color=always -1F {}; else bat --color=always --line-range :500 {}; fi' ", + "TERM": "xterm-256color", + "VIRTUAL_ENV_DISABLE_PROMPT": "20", + "forgit_add": "ga", + "LESS_TERMCAP_md": "\u001b[1;31m", + "PI_SUBAGENT_PARENT_SESSION": "01a0aed1-454e-7520-83dd-c77c2c059168", + "PUEUE_GROUP": "default", + "LESS_TERMCAP_mb": "\u001b[1;31m", + "forgit_log": "glo", + "LESS_TERMCAP_ue": "\u001b[0m", + "forgit_fixup": "gfu", + "PROMPT_EOL_MARK": "", + "forgit_diff": "gd", + "LESS_TERMCAP_us": "\u001b[1;32m", + "XDG_SESSION_CLASS": "user", + "HERDR_TAB_ID": "wE:t2", + "COLORTERM": "truecolor", + "PI_INTERCOM_SESSION_ID": "01a0aed1-454e-7520-83dd-c77c2c059168", + "forgit_checkout_file_from_commit": "gcff", + "forgit_worktree": "gwt", + "USER": "code", + "FZF_ALT_C_COMMAND": "command fd -H --no-ignore-vcs -E .git -td", + "FZF_CTRL_T_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", + "XDG_SESSION_TYPE": "tty", + "LESS_TERMCAP_me": "\u001b[0m", + "FZF_ALT_C_OPTS": "--bind ctrl-/:toggle-preview --preview 'eza --group-directories-first --color=always -1F {}' ", + "LC_ALL": "en_US.UTF-8", + "GREP_COLOR": "37;45", + "forgit_checkout_file": "gcf", + "forgit_squash": "gsq", + "HERDR_WORKSPACE_ID": "wE", + "forgit_worktree_add": "gwa", + "forgit_revert_commit": "grc", + "SSH_CLIENT": "UNKNOWN 65535 65535", + "_": "/home/code/.local/bin/pueue", + "XDG_RUNTIME_DIR": "/run/user/1000", + "AI_AGENT": "pi", + "PAGER": "less", + "HERDR_BIN_PATH": "/home/code/.local/bin/herdr", + "SSH_CONNECTION": "UNKNOWN 65535 UNKNOWN 65535", + "forgit_branch_delete": "gbd", + "forgit_checkout_tag": "gct", + "forgit_stash_show": "gss", + "PYENV_VIRTUALENV_DISABLE_PROMPT": "1", + "XDG_SESSION_ID": "153", + "forgit_clean": "gclean", + "PI_CODING_AGENT": "true", + "SHLVL": "1", + "HOME": "/home/code", + "BUN_INSTALL": "/home/code/.bun", + "HERDR_PANE_ID": "wE:p15", + "PUEUE_WORKER_ID": "0", + "OLDPWD": "/home/code/dev", + "HERDR_ENV": "1", + "HERDR_SOCKET_PATH": "/home/code/.config/herdr/herdr.sock", + "LANG": "en_US.UTF-8", + "CONDA_CHANGEPS1": "no", + "forgit_checkout_commit": "gco", + "forgit_reword": "grw", + "forgit_blame": "gbl", + "FORGIT_INSTALL_DIR": "/home/code/.zim/modules/forgit", + "SHELL": "/usr/bin/zsh", + "GPG_TTY": "/dev/pts/25", + "LOGNAME": "code", + "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus", + "YSU_VERSION": "1.11.1", + "forgit_cherry_pick": "gcp", + "forgit_reset_head": "grh", + "forgit_switch_branch": "gsw" + }, + "group": "default", + "dependencies": [], + "priority": 0, + "label": "why: confirm corrected CUDA VJP smoke through report; resolve: CPU master, CUDA bound vector, public reply all print", + "status": { + "Done": { + "enqueued_at": "2026-09-17T18:27:10.473515438+08:00", + "start": "2026-09-17T18:27:10.742287459+08:00", + "end": "2026-09-17T18:27:19.177044434+08:00", + "result": "Success" + } + } +} diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log new file mode 100644 index 00000000..0f68df67 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log @@ -0,0 +1,8 @@ +[pq] task 1647: last 7 of 7 clean lines -- /home/code/.local/share/pueue/task_logs/1647.log +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +Traceback (most recent call last): + File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 19, in + assert all(vector.device.type == "cpu" for vector in control.export_state()["intervention_0/transform"].directions.values()) + ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log new file mode 100644 index 00000000..0b7269ce --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log @@ -0,0 +1,13 @@ +[pq] task 1647: last 7 of 7 clean lines -- /home/code/.local/share/pueue/task_logs/1647.log +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +Traceback (most recent call last): + File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 19, in + assert all(vector.device.type == "cpu" for vector in control.export_state()["intervention_0/transform"].directions.values()) + ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError + +[pq] task 1647 FAILED (1) after 8s -- why: verify VJPDelta performs CUDA extraction and additive generation; resolve: record CUDA result or diagnose backend failure +[pq] USER (standing instruction, from CLAUDE.md): this was a long or failed job. +[pq] Run the auditlog skill on it, and read ml-debug. Prefer a project-local skill of +[pq] that name over the global one. Do not report a result from the tail alone. diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log new file mode 100644 index 00000000..cb76b0bf --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log @@ -0,0 +1,7 @@ +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +Traceback (most recent call last): + File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 19, in + assert all(vector.device.type == "cpu" for vector in control.export_state()["intervention_0/transform"].directions.values()) + ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log new file mode 100644 index 00000000..4e8e4961 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log @@ -0,0 +1,8 @@ +[pq] task 1648: last 7 of 7 clean lines -- /home/code/.local/share/pueue/task_logs/1648.log +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +Traceback (most recent call last): + File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 31, in + "layers": control._layer_ids, + ^^^^^^^^^^^^^^^^^^ +AttributeError: 'VJPDelta' object has no attribute '_layer_ids' diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log new file mode 100644 index 00000000..56078f18 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log @@ -0,0 +1,13 @@ +[pq] task 1648: last 7 of 7 clean lines -- /home/code/.local/share/pueue/task_logs/1648.log +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +Traceback (most recent call last): + File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 31, in + "layers": control._layer_ids, + ^^^^^^^^^^^^^^^^^^ +AttributeError: 'VJPDelta' object has no attribute '_layer_ids' + +[pq] task 1648 FAILED (1) after 8s -- why: distinguish CPU VJP master from CUDA bound artifact and verify public generation; resolve: print both devices and reply +[pq] USER (standing instruction, from CLAUDE.md): this was a long or failed job. +[pq] Run the auditlog skill on it, and read ml-debug. Prefer a project-local skill of +[pq] that name over the global one. Do not report a result from the tail alone. diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log new file mode 100644 index 00000000..23df5341 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log @@ -0,0 +1,7 @@ +/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) + return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass +Traceback (most recent call last): + File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 31, in + "layers": control._layer_ids, + ^^^^^^^^^^^^^^^^^^ +AttributeError: 'VJPDelta' object has no attribute '_layer_ids' diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json new file mode 100644 index 00000000..82b35004 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json @@ -0,0 +1,112 @@ +{ + "id": 1648, + "created_at": "2026-09-17T18:26:00.835455558+08:00", + "original_command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", + "command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", + "path": "/home/code/dev/steerability-vjp", + "envs": { + "GREP_COLOR": "37;45", + "forgit_branch_delete": "gbd", + "NVM_DIR": "/home/code/.nvm", + "forgit_add": "ga", + "XDG_SESSION_CLASS": "user", + "PUEUE_GROUP": "default", + "LESS": "--ignore-case --jump-target=4 --LONG-PROMPT --no-init --quit-if-one-screen --RAW-CONTROL-CHARS", + "TERM": "xterm-256color", + "forgit_stash_push": "gsp", + "LC_ALL": "en_US.UTF-8", + "SHLVL": "1", + "HERDR_SOCKET_PATH": "/home/code/.config/herdr/herdr.sock", + "PWD": "/home/code/dev/steerability-vjp", + "FZF_CTRL_T_OPTS": "--bind ctrl-/:toggle-preview --preview 'if [[ -d {} ]]; then eza --group-directories-first --color=always -1F {}; else bat --color=always --line-range :500 {}; fi' ", + "HERDR_WORKSPACE_ID": "wE", + "LESS_TERMCAP_me": "\u001b[0m", + "COLORTERM": "truecolor", + "FZF_DEFAULT_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", + "FZF_CTRL_T_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", + "forgit_stash_show": "gss", + "AI_AGENT": "pi", + "forgit_checkout_file_from_commit": "gcff", + "forgit_blame": "gbl", + "forgit_checkout_branch": "gcb", + "GPG_TTY": "/dev/pts/25", + "SSH_CLIENT": "UNKNOWN 65535 65535", + "LESS_TERMCAP_us": "\u001b[1;32m", + "LESS_TERMCAP_ue": "\u001b[0m", + "FZF_ALT_C_COMMAND": "command fd -H --no-ignore-vcs -E .git -td", + "YSU_VERSION": "1.11.1", + "forgit_squash": "gsq", + "forgit_reword": "grw", + " ": "/home/code/.local/bin/pueue", + "PAGER": "less", + "FZF_ALT_C_OPTS": "--bind ctrl-/:toggle-preview --preview 'eza --group-directories-first --color=always -1F {}' ", + "forgit_clean": "gclean", + "forgit_fixup": "gfu", + "_": "/home/code/.local/bin/pueue", + "HOME": "/home/code", + "forgit_ignore": "gi", + "EZA_COLORS": "da=1;34:gm=1;34:Su=1;34", + "HERDR_BIN_PATH": "/home/code/.local/bin/herdr", + "forgit_worktree_delete": "gwd", + "SSH_CONNECTION": "UNKNOWN 65535 UNKNOWN 65535", + "forgit_rebase": "grb", + "PI_INTERCOM_SESSION_ID": "01a0aed1-454e-7520-83dd-c77c2c059168", + "forgit_switch_branch": "gsw", + "forgit_show": "gso", + "VISUAL": "zed --wait", + "forgit_worktree_add": "gwa", + "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus", + "LOGNAME": "code", + "PROMPT_EOL_MARK": "", + "GREP_COLORS": "mt=37;45", + "PATH": "/home/code/.pi/agent/bin:/home/wassname/.local/bin:/home/code/.cargo/bin/:/home/code/.bun/bin:/home/code/.opencode/bin:/home/code/Opt:/home/code/.local/bin:/home/code/.fzf/bin/:/home/code/.local/bin:/home/code/.local/share/mise/shims:/home/code/.local/bin:/home/code/.local/share/mise/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", + "LESS_TERMCAP_md": "\u001b[1;31m", + "HERDR_TAB_ID": "wE:t2", + "LANG": "en_US.UTF-8", + "forgit_checkout_commit": "gco", + "EDITOR": "nvim", + "OLDPWD": "/home/code/dev", + "forgit_worktree": "gwt", + "XDG_RUNTIME_DIR": "/run/user/1000", + "CONDA_CHANGEPS1": "no", + "PI_CODING_AGENT": "true", + "PYENV_VIRTUALENV_DISABLE_PROMPT": "1", + "forgit_reset_head": "grh", + "forgit_attributes": "gat", + "forgit_checkout_tag": "gct", + "LESS_TERMCAP_mb": "\u001b[1;31m", + "BUN_INSTALL": "/home/code/.bun", + "PI_SUBAGENT_PARENT_SESSION": "01a0aed1-454e-7520-83dd-c77c2c059168", + "forgit_diff": "gd", + "LS_COLORS": "di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43", + "XDG_SESSION_TYPE": "tty", + "forgit_log": "glo", + "HERDR_ENV": "1", + "USER": "code", + "PUEUE_WORKER_ID": "0", + "forgit_restore": "grs", + "forgit_cherry_pick": "gcp", + "forgit_checkout_file": "gcf", + "SHELL": "/usr/bin/zsh", + "FORGIT_INSTALL_DIR": "/home/code/.zim/modules/forgit", + "VIRTUAL_ENV_DISABLE_PROMPT": "20", + "forgit_reflog": "grl", + "forgit_revert_commit": "grc", + "HERDR_PANE_ID": "wE:p15", + "XDG_SESSION_ID": "153" + }, + "group": "default", + "dependencies": [], + "priority": 0, + "label": "why: distinguish CPU VJP master from CUDA bound artifact and verify public generation; resolve: print both devices and reply", + "status": { + "Done": { + "enqueued_at": "2026-09-17T18:26:00.835445178+08:00", + "start": "2026-09-17T18:26:00.897954105+08:00", + "end": "2026-09-17T18:26:08.427166252+08:00", + "result": { + "Failed": 1 + } + } + } +} diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json new file mode 100644 index 00000000..52f1781e --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json @@ -0,0 +1,112 @@ +{ + "id": 1647, + "created_at": "2026-09-17T18:23:42.566443786+08:00", + "original_command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", + "command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", + "path": "/home/code/dev/steerability-vjp", + "envs": { + "BUN_INSTALL": "/home/code/.bun", + "FZF_ALT_C_COMMAND": "command fd -H --no-ignore-vcs -E .git -td", + "forgit_clean": "gclean", + "forgit_switch_branch": "gsw", + "forgit_restore": "grs", + "VISUAL": "zed --wait", + "forgit_checkout_commit": "gco", + "FORGIT_INSTALL_DIR": "/home/code/.zim/modules/forgit", + "LESS_TERMCAP_ue": "\u001b[0m", + "forgit_reflog": "grl", + "forgit_rebase": "grb", + "GPG_TTY": "/dev/pts/25", + "PYENV_VIRTUALENV_DISABLE_PROMPT": "1", + "forgit_stash_show": "gss", + "XDG_SESSION_ID": "153", + "LESS_TERMCAP_md": "\u001b[1;31m", + "HERDR_TAB_ID": "wE:t2", + "GREP_COLOR": "37;45", + "forgit_checkout_file_from_commit": "gcff", + "PI_SUBAGENT_PARENT_SESSION": "01a0aed1-454e-7520-83dd-c77c2c059168", + "forgit_worktree": "gwt", + "SHLVL": "1", + "HERDR_ENV": "1", + "XDG_RUNTIME_DIR": "/run/user/1000", + "CONDA_CHANGEPS1": "no", + "SSH_CLIENT": "UNKNOWN 65535 65535", + "PWD": "/home/code/dev/steerability-vjp", + "COLORTERM": "truecolor", + "LESS_TERMCAP_us": "\u001b[1;32m", + "forgit_squash": "gsq", + "forgit_fixup": "gfu", + "forgit_diff": "gd", + "EZA_COLORS": "da=1;34:gm=1;34:Su=1;34", + "YSU_VERSION": "1.11.1", + "forgit_cherry_pick": "gcp", + "forgit_blame": "gbl", + "HERDR_BIN_PATH": "/home/code/.local/bin/herdr", + "LESS_TERMCAP_me": "\u001b[0m", + "forgit_add": "ga", + "LS_COLORS": "di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43", + "PI_CODING_AGENT": "true", + "forgit_checkout_branch": "gcb", + "_": "/home/code/.local/bin/pueue", + "LESS_TERMCAP_mb": "\u001b[1;31m", + "TERM": "xterm-256color", + "forgit_worktree_delete": "gwd", + "forgit_log": "glo", + "PUEUE_GROUP": "default", + "forgit_branch_delete": "gbd", + "USER": "code", + "OLDPWD": "/home/code/dev", + " ": "/home/code/.local/bin/pueue", + "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus", + "LC_ALL": "en_US.UTF-8", + "FZF_DEFAULT_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", + "EDITOR": "nvim", + "HERDR_PANE_ID": "wE:p15", + "FZF_ALT_C_OPTS": "--bind ctrl-/:toggle-preview --preview 'eza --group-directories-first --color=always -1F {}' ", + "GREP_COLORS": "mt=37;45", + "forgit_reword": "grw", + "forgit_revert_commit": "grc", + "forgit_worktree_add": "gwa", + "NVM_DIR": "/home/code/.nvm", + "SSH_CONNECTION": "UNKNOWN 65535 UNKNOWN 65535", + "PAGER": "less", + "LOGNAME": "code", + "VIRTUAL_ENV_DISABLE_PROMPT": "20", + "PATH": "/home/code/.pi/agent/bin:/home/wassname/.local/bin:/home/code/.cargo/bin/:/home/code/.bun/bin:/home/code/.opencode/bin:/home/code/Opt:/home/code/.local/bin:/home/code/.fzf/bin/:/home/code/.local/bin:/home/code/.local/share/mise/shims:/home/code/.local/bin:/home/code/.local/share/mise/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", + "forgit_checkout_tag": "gct", + "PROMPT_EOL_MARK": "", + "PUEUE_WORKER_ID": "0", + "AI_AGENT": "pi", + "forgit_reset_head": "grh", + "forgit_checkout_file": "gcf", + "SHELL": "/usr/bin/zsh", + "FZF_CTRL_T_OPTS": "--bind ctrl-/:toggle-preview --preview 'if [[ -d {} ]]; then eza --group-directories-first --color=always -1F {}; else bat --color=always --line-range :500 {}; fi' ", + "XDG_SESSION_TYPE": "tty", + "forgit_attributes": "gat", + "LESS": "--ignore-case --jump-target=4 --LONG-PROMPT --no-init --quit-if-one-screen --RAW-CONTROL-CHARS", + "HERDR_WORKSPACE_ID": "wE", + "forgit_show": "gso", + "PI_INTERCOM_SESSION_ID": "01a0aed1-454e-7520-83dd-c77c2c059168", + "FZF_CTRL_T_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", + "LANG": "en_US.UTF-8", + "HOME": "/home/code", + "forgit_ignore": "gi", + "XDG_SESSION_CLASS": "user", + "HERDR_SOCKET_PATH": "/home/code/.config/herdr/herdr.sock", + "forgit_stash_push": "gsp" + }, + "group": "default", + "dependencies": [], + "priority": 0, + "label": "why: verify VJPDelta performs CUDA extraction and additive generation; resolve: record CUDA result or diagnose backend failure", + "status": { + "Done": { + "enqueued_at": "2026-09-17T18:23:42.566429820+08:00", + "start": "2026-09-17T18:23:42.695255734+08:00", + "end": "2026-09-17T18:23:50.834943225+08:00", + "result": { + "Failed": 1 + } + } + } +} diff --git a/slop/verification/2026-09-17_vjp-delta/notebook_execution.log b/slop/verification/2026-09-17_vjp-delta/notebook_execution.log new file mode 100644 index 00000000..d37c21bb --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/notebook_execution.log @@ -0,0 +1,114 @@ +[NbConvertApp] Converting notebook examples/notebooks/algorithms/vjp_delta.ipynb to notebook +[IPKernelApp] WARNING | Kernel is running over TCP without encryption. All communication (including code and outputs) is sent in plain text and is susceptible to eavesdropping. Use IPC transport or launch with kernel manager-provisioned CurveZMQ keys to enable transport encryption. +Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/bin/jupyter-nbconvert", line 10, in + sys.exit(main()) + ~~~~^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/jupyter_core/application.py", line 284, in launch_instance + super().launch_instance(argv=argv, **kwargs) + ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/traitlets/config/application.py", line 1080, in launch_instance + app.start() + ~~~~~~~~~^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/nbconvertapp.py", line 420, in start + self.convert_notebooks() + ~~~~~~~~~~~~~~~~~~~~~~^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/nbconvertapp.py", line 597, in convert_notebooks + self.convert_single_notebook(notebook_filename) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/nbconvertapp.py", line 563, in convert_single_notebook + output, resources = self.export_single_notebook( + ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ + notebook_filename, resources, input_buffer=input_buffer + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/nbconvertapp.py", line 487, in export_single_notebook + output, resources = self.exporter.from_filename( + ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ + notebook_filename, resources=resources + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/exporter.py", line 201, in from_filename + return self.from_file(f, resources=resources, **kw) + ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/exporter.py", line 220, in from_file + return self.from_notebook_node( + ~~~~~~~~~~~~~~~~~~~~~~~^ + nbformat.read(file_stream, as_version=4), resources=resources, **kw + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) + ^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/notebook.py", line 36, in from_notebook_node + nb_copy, resources = super().from_notebook_node(nb, resources, **kw) + ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/exporter.py", line 154, in from_notebook_node + nb_copy, resources = self._preprocess(nb_copy, resources) + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/exporter.py", line 353, in _preprocess + nbc, resc = preprocessor(nbc, resc) + ~~~~~~~~~~~~^^^^^^^^^^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/preprocessors/base.py", line 48, in __call__ + return self.preprocess(nb, resources) + ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/preprocessors/execute.py", line 103, in preprocess + self.preprocess_cell(cell, resources, index) + ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/preprocessors/execute.py", line 124, in preprocess_cell + cell = self.execute_cell(cell, index, store_history=True) + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/jupyter_core/utils/__init__.py", line 165, in wrapped + return loop.run_until_complete(inner) + ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^ + File "/home/code/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete + return future.result() + ~~~~~~~~~~~~~^^ + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbclient/client.py", line 1062, in async_execute_cell + await self._check_raise_for_error(cell, cell_index, exec_reply) + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbclient/client.py", line 918, in _check_raise_for_error + raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content) +nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell: +------------------ +from pathlib import Path +import tempfile + +from steerability.algorithms.core.steering_pipeline import SteeringPipeline +from steerability.algorithms.state_control.vjp_delta import VJPDelta +from steerability.spipe import SPipe +from tests.utils.tiny_models import tiny_llama, wordlevel_tokenizer + +model = tiny_llama() +tokenizer = wordlevel_tokenizer() +fit_data = { + "positives": ["the cat sat", "the dog ran"], + "negatives": ["dog ran fast"], +} +control = VJPDelta( + data=fit_data, + target_layer=2, + source_layer_ids=[0, 1], + skip_first=0, + strength=0.5, +) +pipeline = SteeringPipeline( + model=model, + tokenizer=tokenizer, + controls=[control], + model_name_or_path="tiny-llama-demo", +) +------------------ + + +--------------------------------------------------------------------------- +ModuleNotFoundError Traceback (most recent call last) +Cell In[1], line 5 + 1 from pathlib import Path + 2 import tempfile + 3 + 4 from steerability.algorithms.core.steering_pipeline import SteeringPipeline +----> 5 from steerability.algorithms.state_control.vjp_delta import VJPDelta + 6 from steerability.spipe import SPipe + 7 from tests.utils.tiny_models import tiny_llama, wordlevel_tokenizer + 8 + +ModuleNotFoundError: No module named 'steerability.algorithms.state_control.vjp_delta' diff --git a/slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log b/slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log new file mode 100644 index 00000000..5878cedd --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log @@ -0,0 +1,3 @@ +[NbConvertApp] Converting notebook examples/notebooks/algorithms/vjp_delta.ipynb to notebook +[IPKernelApp] WARNING | Kernel is running over TCP without encryption. All communication (including code and outputs) is sent in plain text and is susceptible to eavesdropping. Use IPC transport or launch with kernel manager-provisioned CurveZMQ keys to enable transport encryption. +[NbConvertApp] Writing 5746 bytes to examples/notebooks/algorithms/vjp_delta.ipynb diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_all.log b/slop/verification/2026-09-17_vjp-delta/precommit_all.log new file mode 100644 index 00000000..f03deabd --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/precommit_all.log @@ -0,0 +1,378 @@ +Detect secrets...........................................................Failed +- hook id: detect-secrets +- exit code: 1 + +Potential secrets about to be committed to git repo! Please rectify. + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:471 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:485 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:575 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:786 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:800 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:877 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:1572 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:1586 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:1600 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:1614 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:1775 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2303 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2317 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2331 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2394 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2408 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2658 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2720 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2734 + +Secret Type: Base64 High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:700 + +Secret Type: Base64 High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:1486 + +Secret Type: Base64 High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2041 + +Secret Type: Base64 High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2107 + +Secret Type: Base64 High Entropy String +Location: examples/notebooks/algorithms/rad.ipynb:2187 + +Possible mitigations: + + - Mark false positives with an inline `pragma: allowlist secret` + comment + - Commit with `--no-verify` if this is a one-time false positive + +If a secret has already been committed, visit +https://help.github.com/articles/removing-sensitive-data-from-a- +repository +Potential secrets about to be committed to git repo! Please rectify. + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:1321 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:1335 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2114 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2128 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2142 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2156 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2170 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2184 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2198 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2212 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2226 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2240 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3840 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3893 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3946 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3972 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3998 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4016 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4069 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4087 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4140 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4156 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4222 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4240 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4266 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4313 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4366 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4419 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4442 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4495 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4518 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4561 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4604 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4681 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4734 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4787 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4840 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4893 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4946 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4999 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5025 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5051 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5069 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5122 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5138 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5191 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5207 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5230 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5248 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5274 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5327 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5350 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5403 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5456 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5474 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5492 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5545 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5598 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5616 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5639 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5712 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5730 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5753 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5771 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5789 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5842 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5895 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5959 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5985 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6021 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6074 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6092 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6169 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6222 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6275 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6328 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6381 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6399 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6452 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6525 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6548 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6564 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6617 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6640 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6656 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6679 + +Secret Type: Hex High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6702 + +Secret Type: Base64 High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3020 + +Secret Type: Base64 High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3106 + +Secret Type: Base64 High Entropy String +Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3322 + +Possible mitigations: + + - Mark false positives with an inline `pragma: allowlist secret` + comment + - Commit with `--no-verify` if this is a one-time false positive + +If a secret has already been committed, visit +https://help.github.com/articles/removing-sensitive-data-from-a- +repository + +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...............................................................Passed +check toml...............................................................Passed +check for merge conflicts................................................Passed +check for case conflicts.................................................Passed +debug statements (python)................................................Passed +isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_final.log b/slop/verification/2026-09-17_vjp-delta/precommit_final.log new file mode 100644 index 00000000..c3db90d4 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/precommit_final.log @@ -0,0 +1,10 @@ +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...............................................................Passed +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts.................................................Passed +debug statements (python)................................................Passed +isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_staged.log b/slop/verification/2026-09-17_vjp-delta/precommit_staged.log new file mode 100644 index 00000000..573b713a --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/precommit_staged.log @@ -0,0 +1,14 @@ +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...............................................................Passed +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts.................................................Passed +debug statements (python)................................................Passed +isort (python)...........................................................Failed +- hook id: isort +- files were modified by this hook + +Fixing /home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log b/slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log new file mode 100644 index 00000000..c3db90d4 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log @@ -0,0 +1,10 @@ +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...............................................................Passed +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts.................................................Passed +debug statements (python)................................................Passed +isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_targeted.log b/slop/verification/2026-09-17_vjp-delta/precommit_targeted.log new file mode 100644 index 00000000..c3db90d4 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/precommit_targeted.log @@ -0,0 +1,10 @@ +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...............................................................Passed +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts.................................................Passed +debug statements (python)................................................Passed +isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/run.md b/slop/verification/2026-09-17_vjp-delta/run.md new file mode 100644 index 00000000..3851dbbc --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/run.md @@ -0,0 +1,42 @@ +# VJP-delta verification log + +- base: f1d8b5fd6d9ed15d506f9445a93d55cb5c5b07df +- branch: feat/vjp-delta +- assignment: exact parent `01a09cdb-9985-75d5-9f07-68b80024a10b` + +## Initial import + +- `/home/code/dev/steerability/.venv/bin/python -m compileall -q steerability/algorithms/state_control/vjp_delta`: passed. +- Registry import reported `VJPDelta` with `ModelAccess.MODULE`. +- `uv run --no-sync` in the new worktree did not have dependencies and was not used for tests. The existing repository environment is used read-only for local verification. + +## Focused verification + +| command | result | evidence | +| --- | --- | --- | +| `pytest tests/controls/test_vjp_delta.py -q` | 9 passed | [test_vjp_delta_final.log](test_vjp_delta_final.log) | +| `pytest tests/controls/test_vjp_delta.py tests/controls/test_sources.py tests/controls/test_activation_adapter.py tests/controls/test_spipe_freeze_state.py -q` | 91 passed | [focused_tests.log](focused_tests.log) | +| `pre-commit run --files ...` | passed | [precommit_final.log](precommit_final.log) | +| `mkdocs build` | passed with existing warnings | [docs_build_nonstrict.log](docs_build_nonstrict.log) | +| `mkdocs build --strict` | failed on 23 existing unrelated warnings | [docs_build.log](docs_build.log) | +| executed `vjp_delta.ipynb` | all three code cells completed | [notebook_execution_retry.log](notebook_execution_retry.log) | + +## CUDA smoke + +GPU queue job `1649` used the default one-worker group and completed in 9 seconds. Its complete result was: + +> `{'module': '/home/code/dev/steerability-vjp/steerability/__init__.py', 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]}` + +The two failed harness attempts are audited in [job_1647.md](../../audits/job_1647.md) and [job_1648.md](../../audits/job_1648.md). They failed a post-bind device assertion and an output-only private-property lookup, respectively; neither was interpreted as a method failure. + +## Full suite + +The first full-suite run completed with `3256 passed, 340 skipped, 166 warnings in 262.72s`; see [full_pytest.log](full_pytest.log). A final full-suite run after the remaining regression updates is active at this log path: [full_pytest_final.log](full_pytest_final.log). + +## Residual risks + +- The VJP path supports standard differentiable torch decoder execution. Inference mode and unsupported backward paths raise rather than changing method behavior. +- Frozen `.spipe` resolution stores its historical additive transform. Editing application strength in a historical recipe does not alter that already-resolved transform, matching the existing `ActivationAdapter` freeze form. +- The external provenance repository is unlicensed. This branch records attribution and makes no relicensing claim. + + diff --git a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log new file mode 100644 index 00000000..e9db6f5e --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log @@ -0,0 +1,2 @@ +........ [100%] +8 passed in 4.11s diff --git a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log new file mode 100644 index 00000000..38bc842c --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log @@ -0,0 +1,2 @@ +......... [100%] +9 passed in 5.06s diff --git a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log new file mode 100644 index 00000000..5a532019 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log @@ -0,0 +1,58 @@ +....F.. [100%] +=================================== FAILURES =================================== +______ test_pipeline_freeze_reload_skips_vjp_and_strength_does_not_stale _______ + +tmp_path = PosixPath('/tmp/pytest-of-code/pytest-22/test_pipeline_freeze_reload_sk0') +monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7a89b9a52060> + + def test_pipeline_freeze_reload_skips_vjp_and_strength_does_not_stale(tmp_path, monkeypatch): + model = tiny_llama() + tokenizer = wordlevel_tokenizer() + control = VJPDelta( + data=_fit_data(), target_layer=2, source_layer_ids=[0, 1], skip_first=0, strength=0.5, + ) + pipeline = SteeringPipeline(model=model, tokenizer=tokenizer, controls=[control], model_name_or_path="tiny-llama") + pipeline.steer() + reference = pipeline.generate(text="the cat", max_new_tokens=3, do_sample=False) + saved = pipeline.to_spipe().save(tmp_path / "vjp.spipe") + + rebuilt = SPipe.load(saved).pipeline() + assert isinstance(rebuilt.state_controls[0], ActivationAdapter) + assert rebuilt.state_controls[0].steer_fits() == () + monkeypatch.setattr(VJPDeltaFit, "resolve", lambda *_a, **_k: pytest.fail("frozen reload ran a VJP fit")) + rebuilt.model, rebuilt.tokenizer = model, tokenizer + rebuilt.steer() + assert rebuilt.generate(text="the cat", max_new_tokens=3, do_sample=False) == reference + +> manifest = json.loads((saved / "spipe.json").read_text()) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +tests/controls/test_vjp_delta.py:220: +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +../../.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/pathlib/_local.py:546: in read_text + return PathBase.read_text(self, encoding, errors, newline) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +../../.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/pathlib/_abc.py:632: in read_text + with self.open(mode='r', encoding=encoding, errors=errors, newline=newline) as f: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + +self = PosixPath('/tmp/pytest-of-code/pytest-22/test_pipeline_freeze_reload_sk0/vjp.spipe/spipe.json') +mode = 'r', buffering = -1, encoding = 'locale', errors = None, newline = None + + def open(self, mode='r', buffering=-1, encoding=None, + errors=None, newline=None): + """ + Open the file pointed to by this path and return a file object, as + the built-in open() function does. + """ + if "b" not in mode: + encoding = io.text_encoding(encoding) +> return io.open(self, mode, buffering, encoding, errors, newline) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +E NotADirectoryError: [Errno 20] Not a directory: '/tmp/pytest-of-code/pytest-22/test_pipeline_freeze_reload_sk0/vjp.spipe/spipe.json' + +../../.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/pathlib/_local.py:537: NotADirectoryError +=========================== short test summary info ============================ +FAILED tests/controls/test_vjp_delta.py::test_pipeline_freeze_reload_skips_vjp_and_strength_does_not_stale +1 failed, 6 passed in 4.32s diff --git a/steerability/algorithms/state_control/vjp_delta/__init__.py b/steerability/algorithms/state_control/vjp_delta/__init__.py new file mode 100644 index 00000000..823e4bfa --- /dev/null +++ b/steerability/algorithms/state_control/vjp_delta/__init__.py @@ -0,0 +1,12 @@ +from .args import VJPDeltaArgs +from .control import VJPDelta +from .fit import VJPDeltaFit + +STEERING_METHOD = { + "category": "state_control", + "name": "vjp_delta", + "control": VJPDelta, + "args": VJPDeltaArgs, +} + +__all__ = ["VJPDelta", "VJPDeltaArgs", "VJPDeltaFit"] diff --git a/steerability/algorithms/state_control/vjp_delta/args.py b/steerability/algorithms/state_control/vjp_delta/args.py new file mode 100644 index 00000000..193afd3b --- /dev/null +++ b/steerability/algorithms/state_control/vjp_delta/args.py @@ -0,0 +1,67 @@ +"""Arguments for VJP-delta steering.""" +from __future__ import annotations + +from dataclasses import dataclass +from typing import Sequence + +from steerability.algorithms.core.base_args import BaseArgs +from steerability.algorithms.core.internals.data import LabeledExamples, as_labeled_examples +from steerability.algorithms.state_control.common.sources import ArtifactSource +from steerability.algorithms.state_control.common.steering_vector import SteeringVector +from steerability.algorithms.state_control.common.token_scope import ScopeKind + + +@dataclass +class VJPDeltaArgs(BaseArgs): + """Arguments for `VJPDelta`. + + Args: + steering_vector: A precomputed vector or artifact source. It skips gradient extraction. + data: Independent positive and negative raw prompt pools for `VJPDeltaFit`. + target_layer: Target layer for the contrast. None selects `num_layers - 3`. + source_layer_ids: Source layers for VJPs. None selects every layer before the target. + skip_first: Prefix positions excluded during gradient extraction. + max_length: Maximum tokenized fit-prompt length. + batch_size: Fit prompts per differentiable forward. + strength: Multiplier used when applying the normalized directions. + token_scope: Positions that receive the additive intervention during generation. + last_k: Required with `token_scope="last_k"`. + from_position: Required with `token_scope="from_position"`. + """ + + steering_vector: SteeringVector | ArtifactSource | None = None + data: LabeledExamples | dict | None = None + target_layer: int | None = None + source_layer_ids: Sequence[int] | None = None + skip_first: int = 16 + max_length: int = 384 + batch_size: int = 8 + strength: float = 1.0 + token_scope: ScopeKind = "after_prompt" + last_k: int | None = None + from_position: int | None = None + + def __post_init__(self) -> None: + if (self.steering_vector is None) == (self.data is None): + raise ValueError("Provide exactly one of steering_vector or data.") + if isinstance(self.steering_vector, SteeringVector): + self.steering_vector.validate() + if self.data is not None and not isinstance(self.data, LabeledExamples): + self.data = as_labeled_examples(self.data) + if self.target_layer is not None and self.target_layer < 0: + raise ValueError("target_layer must be >= 0.") + if self.source_layer_ids is not None: + source_ids = tuple(int(layer_id) for layer_id in self.source_layer_ids) + if not source_ids or min(source_ids) < 0 or len(set(source_ids)) != len(source_ids): + raise ValueError("source_layer_ids must be a non-empty sequence of unique integers >= 0.") + self.source_layer_ids = source_ids + if self.skip_first < 0: + raise ValueError("skip_first must be >= 0.") + if self.max_length < 2: + raise ValueError("max_length must be >= 2.") + if self.batch_size < 1: + raise ValueError("batch_size must be >= 1.") + if self.token_scope == "last_k" and (self.last_k is None or self.last_k < 1): + raise ValueError("last_k must be >= 1 when token_scope is 'last_k'.") + if self.token_scope == "from_position" and (self.from_position is None or self.from_position < 0): + raise ValueError("from_position must be >= 0 when token_scope is 'from_position'.") diff --git a/steerability/algorithms/state_control/vjp_delta/control.py b/steerability/algorithms/state_control/vjp_delta/control.py new file mode 100644 index 00000000..60c99dd3 --- /dev/null +++ b/steerability/algorithms/state_control/vjp_delta/control.py @@ -0,0 +1,60 @@ +"""VJP-delta control.""" +from __future__ import annotations + +from steerability.algorithms.state_control.base import InterventionControl +from steerability.algorithms.state_control.common.sources import _Precomputed +from steerability.algorithms.state_control.common.specs import CoveredLayers, Intervention, TokenScope +from steerability.algorithms.state_control.common.steering_vector import SteeringVector +from steerability.algorithms.state_control.common.transforms import AdditiveTransform + +from .args import VJPDeltaArgs +from .fit import VJPDeltaFit + + +class VJPDelta(InterventionControl): + """VJP-delta activation steering. + + The control fits one normalized additive direction per source layer during `steer()`. Its + target contrast is the positive-minus-negative final unpadded target state. The fit applies + that contrast as a cotangent at valid target tokens and averages valid source-token gradients + per prompt before separately averaging the positive and negative classes. At generation it + uses the standard additive intervention and token scopes. + + A precomputed `SteeringVector` or `ArtifactSource` avoids gradient extraction. The frozen form + is `ActivationAdapter`, so a reloaded `.spipe` resolves the stored vectors without a VJP fit. + + Reference: + + - VJP-delta method implementation provenance: `wassname/vjp-steering` at + `cb03382ebd0cc9cad615d169f42e68e8ae3e12a7` + [https://github.com/wassname/vjp-steering](https://github.com/wassname/vjp-steering) + """ + + Args = VJPDeltaArgs + supports_batching = True + + def _configure(self) -> None: + if self.steering_vector is None: + source = VJPDeltaFit( + data=self.data, + target_layer=self.target_layer, + source_layer_ids=self.source_layer_ids, + skip_first=self.skip_first, + max_length=self.max_length, + batch_size=self.batch_size, + ) + elif isinstance(self.steering_vector, SteeringVector): + source = _Precomputed(self.steering_vector.clone()) + else: + source = self.steering_vector + self._template = ( + Intervention( + layers=CoveredLayers(), + transform=AdditiveTransform(source, strength=self.strength), + scope=TokenScope(self.token_scope, last_k=self.last_k, from_position=self.from_position), + ), + ) + + def cleanup(self) -> None: + """Drop fitted intervention tensors and their bound artifacts.""" + self.interventions = () diff --git a/steerability/algorithms/state_control/vjp_delta/fit.py b/steerability/algorithms/state_control/vjp_delta/fit.py new file mode 100644 index 00000000..1cdb80a0 --- /dev/null +++ b/steerability/algorithms/state_control/vjp_delta/fit.py @@ -0,0 +1,338 @@ +"""VJP-delta steering-vector extraction.""" +from __future__ import annotations + +import weakref +from dataclasses import dataclass, field +from typing import TYPE_CHECKING, Sequence + +import torch +from transformers import PreTrainedModel, PreTrainedTokenizerBase + +from steerability.algorithms.core.execution.access import ModelAccess +from steerability.algorithms.core.internals.data import LabeledExamples, as_labeled_examples +from steerability.algorithms.core.internals.model_layout import resolve_model_layout, text_config +from steerability.algorithms.state_control.common.steering_vector import SteeringVector + +if TYPE_CHECKING: + from steerability.algorithms.core.execution.backend import SteeringSession + + +def _hidden(output) -> torch.Tensor: + """Return the residual tensor from a decoder-layer output.""" + hidden = output[0] if isinstance(output, tuple) else output + if not isinstance(hidden, torch.Tensor): + raise TypeError(f"Decoder layer returned {type(hidden).__name__}, not a tensor or tuple headed by a tensor.") + return hidden + + +def _token_batch( + tokenizer: PreTrainedTokenizerBase, + texts: Sequence[str], + *, + max_length: int, + device: torch.device, +) -> tuple[torch.Tensor, torch.Tensor]: + """Tokenize raw texts into a right-padded batch without changing tokenizer state.""" + encoded = tokenizer( + list(texts), + add_special_tokens=True, + truncation=True, + max_length=max_length, + padding=False, + ) + rows = encoded["input_ids"] + if not rows or any(len(row) == 0 for row in rows): + raise ValueError("VJP-delta fitting requires every example to contain at least one token after tokenization.") + pad_id = tokenizer.pad_token_id if tokenizer.pad_token_id is not None else tokenizer.eos_token_id + if pad_id is None: + raise ValueError("VJP-delta fitting needs tokenizer.pad_token_id or tokenizer.eos_token_id for batching.") + width = max(len(row) for row in rows) + input_ids = torch.full((len(rows), width), int(pad_id), dtype=torch.long, device=device) + attention_mask = torch.zeros((len(rows), width), dtype=torch.long, device=device) + for index, row in enumerate(rows): + input_ids[index, :len(row)] = torch.tensor(row, dtype=torch.long, device=device) + attention_mask[index, :len(row)] = 1 + return input_ids, attention_mask + + +def _valid_token_mask(attention_mask: torch.Tensor, skip_first: int) -> torch.BoolTensor: + """Select valid positions, excluding the prefix and each row's final real token.""" + mask = attention_mask.to(torch.bool).clone() + lengths = mask.sum(dim=1) + if torch.any(lengths <= skip_first + 1): + short = torch.nonzero(lengths <= skip_first + 1, as_tuple=False).flatten().tolist() + raise ValueError( + "VJP-delta fitting needs a valid token span after skip_first and before the final real token; " + f"rows {short} have lengths {lengths[short].tolist()} with skip_first={skip_first}." + ) + positions = torch.arange(mask.size(1), device=mask.device).unsqueeze(0) + mask &= positions >= skip_first + mask[torch.arange(mask.size(0), device=mask.device), lengths - 1] = False + return mask + + +@dataclass +class VJPDeltaFit: + """Fit normalized VJP-delta directions from independent labeled prompt pools. + + The fit reads the final unpadded state at `target_layer` to form the target contrast. It then + applies that contrast as a cotangent at every valid target position and averages each prompt's + valid source-position gradients before class averaging. The positive-minus-negative class mean + is L2-normalized independently for every source layer. + + Args: + data: Independent positive and negative raw prompts. Class sizes may differ. + target_layer: Target residual layer. None selects `num_layers - 3`. + source_layer_ids: Source residual layers. None selects every layer before the target. + skip_first: Prefix positions excluded from target and source token spans. + max_length: Maximum tokenized prompt length. + batch_size: Number of prompts per differentiable forward. + """ + + produces_positional = False + access = ModelAccess.MODULE + artifact_class = "direction" + + data: LabeledExamples | dict + target_layer: int | None = None + source_layer_ids: Sequence[int] | None = None + skip_first: int = 16 + max_length: int = 384 + batch_size: int = 8 + + _model_ref: weakref.ref | None = field(default=None, init=False, repr=False, compare=False) + _master: SteeringVector | None = field(default=None, init=False, repr=False, compare=False) + + def __post_init__(self) -> None: + if not isinstance(self.data, LabeledExamples): + self.data = as_labeled_examples(self.data) + if self.skip_first < 0: + raise ValueError(f"skip_first must be >= 0, got {self.skip_first}.") + if self.max_length < 2: + raise ValueError(f"max_length must be >= 2, got {self.max_length}.") + if self.batch_size < 1: + raise ValueError(f"batch_size must be >= 1, got {self.batch_size}.") + if self.target_layer is not None and self.target_layer < 0: + raise ValueError(f"target_layer must be >= 0, got {self.target_layer}.") + if self.source_layer_ids is not None: + source_ids = tuple(int(layer_id) for layer_id in self.source_layer_ids) + if not source_ids: + raise ValueError("source_layer_ids must not be empty.") + if len(set(source_ids)) != len(source_ids): + raise ValueError("source_layer_ids must not contain duplicates.") + if min(source_ids) < 0: + raise ValueError("source_layer_ids must all be >= 0.") + self.source_layer_ids = source_ids + + def _layers(self, model: PreTrainedModel) -> tuple[int, tuple[int, ...]]: + layout = resolve_model_layout(model) + target = layout.num_layers - 3 if self.target_layer is None else self.target_layer + if not 0 <= target < layout.num_layers: + raise ValueError(f"target_layer {target} is out of range for {layout.num_layers} decoder layers.") + source_ids = tuple(range(target)) if self.source_layer_ids is None else tuple(self.source_layer_ids) + if not source_ids: + raise ValueError("VJP-delta fitting needs at least one source layer before target_layer.") + invalid = [layer_id for layer_id in source_ids if not 0 <= layer_id < layout.num_layers] + if invalid: + raise ValueError(f"source_layer_ids {invalid} are out of range for {layout.num_layers} decoder layers.") + after_target = [layer_id for layer_id in source_ids if layer_id >= target] + if after_target: + raise ValueError( + f"VJP-delta source layers must precede target_layer {target}; got {after_target}." + ) + return target, source_ids + + def _target_mean( + self, + model: PreTrainedModel, + tokenizer: PreTrainedTokenizerBase, + texts: Sequence[str], + *, + target_layer: int, + target_module: torch.nn.Module, + device: torch.device, + ) -> torch.Tensor: + """Return the mean target-layer state at each row's final unpadded token.""" + total: torch.Tensor | None = None + count = 0 + for start in range(0, len(texts), self.batch_size): + input_ids, attention_mask = _token_batch( + tokenizer, texts[start:start + self.batch_size], max_length=self.max_length, device=device, + ) + captured: list[torch.Tensor] = [] + handle = target_module.register_forward_hook(lambda _m, _a, output: captured.append(_hidden(output))) + try: + with torch.no_grad(): + model(input_ids=input_ids, attention_mask=attention_mask) + finally: + handle.remove() + if len(captured) != 1: + raise RuntimeError(f"VJP-delta target hook fired {len(captured)} times; expected one forward output.") + lengths = attention_mask.sum(dim=1) - 1 + rows = captured[0][torch.arange(input_ids.size(0), device=device), lengths].float() + total = rows.sum(dim=0) if total is None else total + rows.sum(dim=0) + count += rows.size(0) + if total is None or count == 0: + raise ValueError("VJP-delta fitting needs at least one prompt in each class.") + return total / count + + def _class_gradients( + self, + model: PreTrainedModel, + tokenizer: PreTrainedTokenizerBase, + texts: Sequence[str], + *, + target_module: torch.nn.Module, + source_modules: dict[int, torch.nn.Module], + cotangent: torch.Tensor, + device: torch.device, + ) -> dict[int, torch.Tensor]: + """Return independent per-class means of per-prompt source-token VJPs.""" + totals: dict[int, torch.Tensor] = {} + count = 0 + for start in range(0, len(texts), self.batch_size): + input_ids, attention_mask = _token_batch( + tokenizer, texts[start:start + self.batch_size], max_length=self.max_length, device=device, + ) + valid = _valid_token_mask(attention_mask, self.skip_first) + source_states: dict[int, torch.Tensor] = {} + target_states: list[torch.Tensor] = [] + def source_capture(layer_id: int): + def hook(_module, _args, output): + source_states[layer_id] = _hidden(output) + return None + + return hook + + def target_capture(_module, _args, output): + target_states.append(_hidden(output)) + return None + + handles = [ + module.register_forward_hook(source_capture(layer_id)) + for layer_id, module in source_modules.items() + ] + handles.append(target_module.register_forward_hook(target_capture)) + try: + model(input_ids=input_ids, attention_mask=attention_mask) + if len(target_states) != 1 or set(source_states) != set(source_modules): + raise RuntimeError("VJP-delta extraction hooks did not capture one target and every source layer.") + target = target_states[0] + if not target.requires_grad or any(not state.requires_grad for state in source_states.values()): + raise RuntimeError( + "VJP-delta fitting needs differentiable decoder-layer outputs. " + "Use a standard torch attention implementation without inference_mode or no-grad wrappers." + ) + grad_outputs = torch.zeros_like(target) + grad_outputs[valid] = cotangent.to(dtype=target.dtype, device=target.device) + gradients = torch.autograd.grad( + outputs=target, + inputs=tuple(source_states[layer_id] for layer_id in source_modules), + grad_outputs=grad_outputs, + allow_unused=False, + ) + except RuntimeError as error: + if "VJP-delta" in str(error): + raise + raise RuntimeError( + "VJP-delta backward failed. The configured model must support gradients through its decoder layers." + ) from error + finally: + for handle in handles: + handle.remove() + for layer_id, gradient in zip(source_modules, gradients, strict=True): + per_prompt = ( + gradient.float() * valid.unsqueeze(-1).to(dtype=gradient.dtype) + ).sum(dim=1) / valid.sum(dim=1, keepdim=True) + summed = per_prompt.sum(dim=0) + totals[layer_id] = summed if layer_id not in totals else totals[layer_id] + summed + count += input_ids.size(0) + return {layer_id: total / count for layer_id, total in totals.items()} + + def _fit(self, model: PreTrainedModel, tokenizer: PreTrainedTokenizerBase) -> SteeringVector: + if model is None: + raise ValueError("VJP-delta fitting requires a live model at steer time.") + if torch.is_inference_mode_enabled(): + raise RuntimeError("VJP-delta fitting cannot run while torch.inference_mode() is enabled.") + target_layer, source_ids = self._layers(model) + layout = resolve_model_layout(model) + target_module = model.get_submodule(layout.layer_names[target_layer]) + source_modules = {layer_id: model.get_submodule(layout.layer_names[layer_id]) for layer_id in source_ids} + try: + device = next(model.parameters()).device + except StopIteration as error: + raise ValueError("VJP-delta fitting requires a model with parameters.") from error + if device.type == "meta": + raise ValueError("VJP-delta fitting requires materialized model parameters, not meta tensors.") + + parameters = tuple(model.parameters()) + requires_grad = [parameter.requires_grad for parameter in parameters] + parameter_grads = [ + None if parameter.grad is None else parameter.grad.detach().clone() + for parameter in parameters + ] + was_training = model.training + try: + model.eval() + for parameter in parameters: + parameter.requires_grad_(True) + with torch.enable_grad(): + positive_target = self._target_mean( + model, tokenizer, self.data.positives, target_layer=target_layer, + target_module=target_module, device=device, + ) + negative_target = self._target_mean( + model, tokenizer, self.data.negatives, target_layer=target_layer, + target_module=target_module, device=device, + ) + cotangent = positive_target - negative_target + if not torch.isfinite(cotangent).all() or cotangent.norm() == 0: + raise ValueError("VJP-delta target contrast must have a finite, nonzero norm.") + positive = self._class_gradients( + model, tokenizer, self.data.positives, target_module=target_module, + source_modules=source_modules, cotangent=cotangent, device=device, + ) + negative = self._class_gradients( + model, tokenizer, self.data.negatives, target_module=target_module, + source_modules=source_modules, cotangent=cotangent, device=device, + ) + finally: + model.train(was_training) + for parameter, flag, grad in zip(parameters, requires_grad, parameter_grads, strict=True): + parameter.requires_grad_(flag) + parameter.grad = grad + + directions: dict[int, torch.Tensor] = {} + for layer_id in source_ids: + direction = positive[layer_id] - negative[layer_id] + norm = direction.norm() + if not torch.isfinite(norm) or norm == 0: + raise ValueError(f"VJP-delta direction at source layer {layer_id} must have a finite, nonzero norm.") + directions[layer_id] = (direction / norm).detach().cpu().unsqueeze(0) + return SteeringVector( + model_type=text_config(model).model_type, + directions=directions, + meta={ + "method": "vjp_delta", + "target_layer": target_layer, + "source_layer_ids": list(source_ids), + "skip_first": self.skip_first, + "max_length": self.max_length, + }, + ) + + def resolve( + self, + model: PreTrainedModel, + tokenizer: PreTrainedTokenizerBase, + *, + session: "SteeringSession | None" = None, + ) -> SteeringVector: + """Fit once per model identity and return a defensive clone.""" + del session + if self._model_ref is not None and self._model_ref() is model and self._master is not None: + return self._master.clone() + master = self._fit(model, tokenizer) + self._model_ref = weakref.ref(model) + self._master = master + return master.clone() diff --git a/tests/controls/test_vjp_delta.py b/tests/controls/test_vjp_delta.py new file mode 100644 index 00000000..cb2004ae --- /dev/null +++ b/tests/controls/test_vjp_delta.py @@ -0,0 +1,352 @@ +"""Regression tests for VJP-delta extraction and its frozen additive form.""" +from __future__ import annotations + +import gc +import json +import weakref + +import pytest +import torch + +from steerability.algorithms.core.steering_pipeline import SteeringPipeline +from steerability.algorithms.core.utils.assembly import collect_state_entries +from steerability.algorithms.state_control.activation_adapter import ActivationAdapter +from steerability.algorithms.state_control.common.steering_vector import SteeringVector +from steerability.algorithms.state_control.vjp_delta import VJPDelta, VJPDeltaFit +from steerability.spipe import SPipe, SpipeStaleError +from tests.utils.tiny_models import tiny_gpt2, tiny_llama, wordlevel_tokenizer + +HIDDEN = 32 + + +def _fit_data(): + return { + "positives": ["the cat sat", "the dog ran"], + "negatives": ["dog ran fast"], + } + + +def _source(): + return VJPDeltaFit(_fit_data(), target_layer=2, source_layer_ids=[0, 1], skip_first=0, batch_size=2) + + +def _capture_layer(model, pipeline, layer_id, input_ids): + entries = collect_state_entries( + pipeline.state_controls, input_ids, {}, hooks_in_process=True, + lowered_state=pipeline._lowered_state, model=pipeline.model, + ) + backend = pipeline._backend_for(pipeline._resolve_backend_spec(None)) + captured = {} + with backend.open_session() as session, session.entries_applied(entries): + def capture(_module, _args, _kwargs, output): + captured["hidden"] = (output[0] if isinstance(output, tuple) else output).detach().clone() + + handle = model.model.layers[layer_id].register_forward_hook(capture, with_kwargs=True) + try: + with torch.no_grad(): + model(input_ids=input_ids) + finally: + handle.remove() + return captured["hidden"] + + +def _replace_hidden(output, hidden): + """Replace the residual tensor while preserving a decoder layer's output container.""" + return (hidden, *output[1:]) if isinstance(output, tuple) else hidden + + +def _explicit_jacobian_direction(model, tokenizer, texts, cotangent, *, source_layer, target_layer, skip_first): + """Compute the VJP contraction from an explicit Jacobian, without production extraction code.""" + source_module = model.model.layers[source_layer] + target_module = model.model.layers[target_layer] + total = None + for text in texts: + batch = tokenizer(text, return_tensors="pt") + source_states = [] + + def capture_source(_module, _args, output): + source_states.append(output[0] if isinstance(output, tuple) else output) + return None + + source_handle = source_module.register_forward_hook(capture_source) + try: + with torch.no_grad(): + model(**batch) + finally: + source_handle.remove() + source_value = source_states.pop().detach() + valid = torch.ones(source_value.shape[:2], dtype=torch.bool) + valid[:, :skip_first] = False + valid[:, -1] = False + + def target_from_source(replacement): + target_states = [] + + def replace_source(_module, _args, output): + return _replace_hidden(output, replacement) + + def capture_target(_module, _args, output): + target_states.append(output[0] if isinstance(output, tuple) else output) + return None + + source_hook = source_module.register_forward_hook(replace_source) + target_hook = target_module.register_forward_hook(capture_target) + try: + model(**batch) + finally: + source_hook.remove() + target_hook.remove() + return target_states.pop()[valid].reshape(-1) + + jacobian = torch.autograd.functional.jacobian(target_from_source, source_value) + repeated_cotangent = cotangent.repeat(int(valid.sum())).to(jacobian.dtype) + gradient = torch.tensordot(repeated_cotangent, jacobian, dims=([0], [0])) + mean = gradient[valid].reshape(1, -1, gradient.size(-1)).mean(dim=1).squeeze(0) + total = mean if total is None else total + mean + return total / len(texts) + + +def _manual_target_mean(model, tokenizer, texts, target_layer): + module = model.model.layers[target_layer] + rows = [] + for text in texts: + captured = [] + handle = module.register_forward_hook( + lambda _m, _a, output: captured.append(output[0] if isinstance(output, tuple) else output) + ) + try: + with torch.no_grad(): + model(**tokenizer(text, return_tensors="pt")) + finally: + handle.remove() + rows.append(captured.pop()[0, -1].float()) + return torch.stack(rows).mean(dim=0) + + +def test_tiny_jacobian_matches_production_for_unequal_classes_and_cross_token_dependence(): + torch.manual_seed(7) + model = tiny_llama() + tokenizer = wordlevel_tokenizer() + source = _source() + vector = source.resolve(model, tokenizer) + + positive_mean = _manual_target_mean(model, tokenizer, _fit_data()["positives"], target_layer=2) + negative_mean = _manual_target_mean(model, tokenizer, _fit_data()["negatives"], target_layer=2) + cotangent = positive_mean - negative_mean + positive = _explicit_jacobian_direction( + model, tokenizer, _fit_data()["positives"], cotangent, + source_layer=0, target_layer=2, skip_first=0, + ) + negative = _explicit_jacobian_direction( + model, tokenizer, _fit_data()["negatives"], cotangent, + source_layer=0, target_layer=2, skip_first=0, + ) + expected = (positive - negative) / (positive - negative).norm() + assert torch.allclose(vector.directions[0].squeeze(0), expected, atol=1e-5) + + batch = tokenizer("the cat sat", return_tensors="pt") + source_module = model.model.layers[0] + target_module = model.model.layers[2] + captured = [] + capture_handle = source_module.register_forward_hook( + lambda _m, _a, output: captured.append(output[0] if isinstance(output, tuple) else output) + ) + try: + with torch.no_grad(): + model(**batch) + finally: + capture_handle.remove() + source_value = captured.pop().detach() + + def target_position_from_source(replacement): + target_states = [] + source_handle = source_module.register_forward_hook( + lambda _m, _a, output: _replace_hidden(output, replacement) + ) + target_handle = target_module.register_forward_hook( + lambda _m, _a, output: target_states.append(output[0] if isinstance(output, tuple) else output) + ) + try: + model(**batch) + finally: + source_handle.remove() + target_handle.remove() + return target_states.pop()[0, 2] + + jacobian = torch.autograd.functional.jacobian(target_position_from_source, source_value) + assert jacobian[:, 0, 1].abs().sum() > 0 + + +def test_tuple_decoder_outputs_are_not_replaced_by_extraction_hooks(): + model = tiny_gpt2() + vector = VJPDeltaFit(_fit_data(), target_layer=2, source_layer_ids=[0], skip_first=0).resolve( + model, wordlevel_tokenizer(), + ) + assert set(vector.directions) == {0} + + +def test_fit_restores_mode_flags_and_existing_parameter_grads_after_error(): + model = tiny_llama().train() + tokenizer = wordlevel_tokenizer() + parameters = list(model.parameters()) + for index, parameter in enumerate(parameters): + parameter.requires_grad_(index % 2 == 0) + parameter.grad = torch.full_like(parameter, float(index + 1)) + flags = [parameter.requires_grad for parameter in parameters] + grads = [parameter.grad.clone() for parameter in parameters] + weights = {name: value.detach().clone() for name, value in model.state_dict().items()} + + with pytest.raises(ValueError, match="valid token span"): + VJPDeltaFit(_fit_data(), target_layer=2, source_layer_ids=[0], skip_first=20).resolve(model, tokenizer) + + assert model.training is True + for parameter, flag, grad in zip(parameters, flags, grads, strict=True): + assert parameter.requires_grad is flag + assert torch.equal(parameter.grad, grad) + for name, value in weights.items(): + assert torch.equal(model.state_dict()[name], value) + + +def test_fit_restores_mode_flags_and_existing_parameter_grads_after_success(): + model = tiny_llama().train() + tokenizer = wordlevel_tokenizer() + parameters = list(model.parameters()) + for index, parameter in enumerate(parameters): + parameter.requires_grad_(index % 2 == 0) + parameter.grad = torch.full_like(parameter, float(index + 1)) + flags = [parameter.requires_grad for parameter in parameters] + grads = [parameter.grad.clone() for parameter in parameters] + weights = {name: value.detach().clone() for name, value in model.state_dict().items()} + + vector = _source().resolve(model, tokenizer) + + assert set(vector.directions) == {0, 1} + assert model.training is True + for parameter, flag, grad in zip(parameters, flags, grads, strict=True): + assert parameter.requires_grad is flag + assert torch.equal(parameter.grad, grad) + for name, value in weights.items(): + assert torch.equal(model.state_dict()[name], value) + + +def test_invalid_layer_order_and_zero_direction_fail_clearly(): + model = tiny_llama() + tokenizer = wordlevel_tokenizer() + with pytest.raises(ValueError, match="must precede"): + VJPDeltaFit(_fit_data(), target_layer=1, source_layer_ids=[1], skip_first=0).resolve(model, tokenizer) + repeated = {"positives": ["the cat sat"], "negatives": ["the cat sat"]} + with pytest.raises(ValueError, match="nonzero norm"): + VJPDeltaFit(repeated, target_layer=2, source_layer_ids=[0], skip_first=0).resolve(model, tokenizer) + with torch.inference_mode(), pytest.raises(RuntimeError, match="inference_mode"): + _source().resolve(model, tokenizer) + + +def test_additive_zero_strength_preserves_hidden_and_nonzero_adds_vector(): + torch.manual_seed(11) + tokenizer = wordlevel_tokenizer() + model = tiny_llama() + vector = SteeringVector(model_type="llama", directions={0: torch.ones(1, HIDDEN)}) + input_ids = tokenizer("the cat sat", return_tensors="pt")["input_ids"] + + baseline = SteeringPipeline(model=model, tokenizer=tokenizer, controls=[]) + baseline.steer() + zero = SteeringPipeline( + model=model, tokenizer=tokenizer, + controls=[VJPDelta(steering_vector=vector, strength=0.0, token_scope="all")], + ) + zero.steer() + nonzero = SteeringPipeline( + model=model, tokenizer=tokenizer, + controls=[VJPDelta(steering_vector=vector, strength=2.0, token_scope="all")], + ) + nonzero.steer() + + baseline_hidden = _capture_layer(model, baseline, 0, input_ids) + zero_hidden = _capture_layer(model, zero, 0, input_ids) + nonzero_hidden = _capture_layer(model, nonzero, 0, input_ids) + assert torch.equal(zero_hidden, baseline_hidden) + assert torch.allclose(nonzero_hidden - baseline_hidden, torch.full_like(baseline_hidden, 2.0), atol=1e-6) + + +def test_pipeline_freeze_reload_skips_vjp_and_strength_does_not_stale(tmp_path, monkeypatch): + model = tiny_llama() + tokenizer = wordlevel_tokenizer() + control = VJPDelta( + data=_fit_data(), target_layer=2, source_layer_ids=[0, 1], skip_first=0, strength=0.5, + ) + pipeline = SteeringPipeline(model=model, tokenizer=tokenizer, controls=[control], model_name_or_path="tiny-llama") + pipeline.steer() + reference = pipeline.generate(text="the cat", max_new_tokens=3, do_sample=False) + batch = pipeline.generate(text=["the cat", "the dog"], max_new_tokens=3, do_sample=False) + assert isinstance(batch, list) and len(batch) == 2 + saved = pipeline.to_spipe().save(tmp_path / "vjp") + + rebuilt = SPipe.load(saved).pipeline() + assert isinstance(rebuilt.state_controls[0], ActivationAdapter) + assert rebuilt.state_controls[0].steer_fits() == () + monkeypatch.setattr(VJPDeltaFit, "resolve", lambda *_a, **_k: pytest.fail("frozen reload ran a VJP fit")) + rebuilt.model, rebuilt.tokenizer = model, tokenizer + rebuilt.steer() + assert rebuilt.generate(text="the cat", max_new_tokens=3, do_sample=False) == reference + + manifest = json.loads((saved / "spipe.json").read_text()) + manifest["controls"][0]["args"]["strength"] = 2.0 + (saved / "spipe.json").write_text(json.dumps(manifest)) + assert isinstance(SPipe.load(saved).pipeline().state_controls[0], ActivationAdapter) + + +def test_recipe_edit_is_stale_and_frozen_vector_uses_existing_mismatch_policy(tmp_path): + model = tiny_llama() + tokenizer = wordlevel_tokenizer() + pipeline = SteeringPipeline( + model=model, tokenizer=tokenizer, + controls=[VJPDelta(data=_fit_data(), target_layer=2, source_layer_ids=[0], skip_first=0)], + model_name_or_path="tiny-llama", + ) + pipeline.steer() + saved = pipeline.to_spipe().save(tmp_path / "vjp") + manifest_path = saved / "spipe.json" + manifest = json.loads(manifest_path.read_text()) + manifest["controls"][0]["args"]["data"]["fields"]["positives"] = ["the cat sat", "the cat sat"] + manifest_path.write_text(json.dumps(manifest)) + with pytest.raises(SpipeStaleError): + SPipe.load(saved) + + vector = SteeringVector(model_type="llama", directions={0: torch.ones(1, HIDDEN)}) + precomputed = SteeringPipeline( + model=model, tokenizer=tokenizer, controls=[VJPDelta(steering_vector=vector)], model_name_or_path="tiny", + ) + precomputed.steer() + assert precomputed.state_controls[0].steer_fits() == () + saved_precomputed = precomputed.to_spipe().save(tmp_path / "precomputed") + changed = tiny_llama() + changed.load_state_dict(model.state_dict()) + with torch.no_grad(): + next(changed.parameters()).add_(0.01) + same_architecture = SPipe.load(saved_precomputed).pipeline() + same_architecture.model, same_architecture.tokenizer = changed, tokenizer + with pytest.warns(UserWarning, match="direction artifact"): + same_architecture.steer() + + frozen = SPipe.load(saved_precomputed).pipeline() + frozen.model, frozen.tokenizer = tiny_gpt2(), tokenizer + with pytest.raises(ValueError, match="model_type"): + frozen.steer() + + +def test_fit_holds_only_a_weak_model_reference_and_control_cleanup_drops_bound_tensors(): + model = tiny_llama() + tokenizer = wordlevel_tokenizer() + source = _source() + source.resolve(model, tokenizer) + ref = weakref.ref(model) + assert source._model_ref is ref or source._model_ref() is model + control = VJPDelta(data=_fit_data(), target_layer=2, source_layer_ids=[0], skip_first=0) + control.steer(model, tokenizer) + assert control.steer_fits() == (("VJPDeltaFit", "direction"),) + assert control.interventions + control.cleanup() + assert control.interventions == () + del model + gc.collect() + assert ref() is None From 665192c734b415d9dc490611a4abdb92b2ad9ee0 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 18:34:28 +0800 Subject: [PATCH 02/10] Shorten VJP fit documentation Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- .../2026-09-17_vjp-delta/precommit_docstring.log | 10 ++++++++++ .../2026-09-17_vjp-delta/test_vjp_delta_docstring.log | 2 ++ steerability/algorithms/state_control/vjp_delta/fit.py | 5 ----- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_docstring.log create mode 100644 slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_docstring.log b/slop/verification/2026-09-17_vjp-delta/precommit_docstring.log new file mode 100644 index 00000000..44f38515 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/precommit_docstring.log @@ -0,0 +1,10 @@ +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...........................................(no files to check)Skipped +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts.................................................Passed +debug statements (python)................................................Passed +isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log new file mode 100644 index 00000000..2bc45a61 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log @@ -0,0 +1,2 @@ +......... [100%] +9 passed in 4.25s diff --git a/steerability/algorithms/state_control/vjp_delta/fit.py b/steerability/algorithms/state_control/vjp_delta/fit.py index 1cdb80a0..04efcddb 100644 --- a/steerability/algorithms/state_control/vjp_delta/fit.py +++ b/steerability/algorithms/state_control/vjp_delta/fit.py @@ -75,11 +75,6 @@ def _valid_token_mask(attention_mask: torch.Tensor, skip_first: int) -> torch.Bo class VJPDeltaFit: """Fit normalized VJP-delta directions from independent labeled prompt pools. - The fit reads the final unpadded state at `target_layer` to form the target contrast. It then - applies that contrast as a cotangent at every valid target position and averages each prompt's - valid source-position gradients before class averaging. The positive-minus-negative class mean - is L2-normalized independently for every source layer. - Args: data: Independent positive and negative raw prompts. Class sizes may differ. target_layer: Target residual layer. None selects `num_layers - 3`. From 085a6a9794e1f7088152712b5a3753361e32fa86 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 18:35:07 +0800 Subject: [PATCH 03/10] Clarify CUDA audit log label Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- slop/audits/job_1647.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slop/audits/job_1647.md b/slop/audits/job_1647.md index d8d45840..fb018911 100644 --- a/slop/audits/job_1647.md +++ b/slop/audits/job_1647.md @@ -2,7 +2,7 @@ - target: queued CUDA extraction and additive-generation smoke test. - provenance: job `1647`, default GPU queue, worktree `/home/code/dev/steerability-vjp`, command `env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py`, started `2026-09-17T18:23:42+08:00`, ended `2026-09-17T18:23:50+08:00`, exit `1`. The worktree was dirty during implementation, so this audit names the script and source lines rather than claiming a commit revision. -- complete evidence: [clean log](../verification/2026-09-17_vjp-delta/gpu_smoke_full.log), [raw log](../verification/2026-09-17_vjp-delta/gpu_smoke_raw.log), and [queue record](../verification/2026-09-17_vjp-delta/gpu_smoke_status.json). +- complete evidence: [ANSI-stripped log](../verification/2026-09-17_vjp-delta/gpu_smoke_full.log), [raw log](../verification/2026-09-17_vjp-delta/gpu_smoke_raw.log), and [queue record](../verification/2026-09-17_vjp-delta/gpu_smoke_status.json). | stage | expected | observed | expected? | clues | missing metric | consequence | | --- | --- | --- | --- | --- | --- | --- | From 9169d6362833be3f77372cae8cdf1569c7c10c29 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 19:00:00 +0800 Subject: [PATCH 04/10] Fix VJP fit cache and diagnostics Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- slop/pr_drafts/2026-09-17_vjp_delta.md | 4 +- .../2026-09-17_vjp_delta_cheap_review.md | 149 ++++++++++++++++++ .../2026-09-17_vjp_delta_quick_oracle.md | 27 ++++ .../review_copy_hashes.log | 4 + .../review_fix_full_pytest.log | 138 ++++++++++++++++ .../review_fix_lifecycle_tests.log | 3 + .../review_fix_precommit.log | 15 ++ .../review_fix_precommit_code.log | 10 ++ slop/verification/2026-09-17_vjp-delta/run.md | 8 + .../algorithms/state_control/vjp_delta/fit.py | 23 ++- tests/controls/test_vjp_delta.py | 11 ++ 11 files changed, 377 insertions(+), 15 deletions(-) create mode 100644 slop/reviews/2026-09-17_vjp_delta_cheap_review.md create mode 100644 slop/reviews/2026-09-17_vjp_delta_quick_oracle.md create mode 100644 slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log create mode 100644 slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log create mode 100644 slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log create mode 100644 slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log create mode 100644 slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log diff --git a/slop/pr_drafts/2026-09-17_vjp_delta.md b/slop/pr_drafts/2026-09-17_vjp_delta.md index da7f73bc..57b9b487 100644 --- a/slop/pr_drafts/2026-09-17_vjp_delta.md +++ b/slop/pr_drafts/2026-09-17_vjp_delta.md @@ -23,13 +23,13 @@ The method is motivated by Anthropic's J-lens work. VJP-delta implementation pro - focused controls: `91 passed` - VJP-delta regressions: `9 passed` -- full suite: final run recorded in `slop/verification/2026-09-17_vjp-delta/full_pytest_final.log` +- full suite: `3258 passed, 340 skipped, 166 warnings` in `slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log` - notebook: executed with stored outputs - docs: non-strict MkDocs build passes; strict mode remains blocked by 23 existing warnings outside this change - CUDA queue smoke `1649`: master vectors were CPU, bound vectors CUDA, and public generation returned `'the'` ### Editorial review requested -Please review the source-license wording before publication. The source repository did not provide relicensing permission. +Please review the source-license wording before publication. The source repository did not provide relicensing permission. The copied code reviews are in `slop/reviews/`. diff --git a/slop/reviews/2026-09-17_vjp_delta_cheap_review.md b/slop/reviews/2026-09-17_vjp_delta_cheap_review.md new file mode 100644 index 00000000..0baea29a --- /dev/null +++ b/slop/reviews/2026-09-17_vjp_delta_cheap_review.md @@ -0,0 +1,149 @@ +# VJP-delta PR review (read-only) + +Review scope: diff `f1d8b5fd6d9ed15d506f9445a93d55cb5c5b07df...HEAD@76a5ee2a710f3720b68793d5376c9ac9db1dae83` in +`/home/code/dev/steerability-vjp`. I read every changed production/test/docs/notebook file in full, the surrounding +framework contracts (sources.py, transforms/additive.py, common/specs.py, base.py, spipe freeze/codec, model_layout, +TokenScope/CollectStateEntries paths, tests/utils/tiny_models), AGENTS.md (Developer guide, Testing, DoD, Invariants), +CONTRIBUTING.md, the PR #12/#19/#32 metadata, and the slop/audits + verification logs. I re-ran the focused suites and +several bounded checks against the venv at `/home/code/dev/steerability/.venv`. + +Independent checks run (all read-only / no file edits): + +- `pytest tests/controls/test_vjp_delta.py -q` → `9 passed in 5.13s`. +- `pytest tests/controls/test_sources.py tests/controls/test_activation_adapter.py tests/controls/test_spipe_freeze_state.py -q` → `83 passed in 23.61s`. +- Full-suite final log tail: `3257 passed, 340 skipped, 166 warnings in 254.56s` (full_pytest_final.log) — consistent with the claimed evidence; I did not rerun the full suite. +- `pre-commit run --files ` → all hooks passed. +- Pipeline-level interactive check: `check()` plan reports `PlannedStep(control='VJPDelta', access=MODULE, venue='live')`, `steer_fits() == (('VJPDeltaFit', 'direction'),)`, `fit_identity` digests the `VJPDeltaFit` dataclass (encodable, init-fields only via codec's `$dc` path), double `steer()` memo-hits and rebinds, bound directions are `[1, H]` unit-norm on the model device. +- CUDA smoke claim: `gpu_smoke_final_status.json` + `run.md` record job 1649 result `{'module': ..., 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]}` — consistent with `fit.py` storing `.detach().cpu()` masters and `TransformContext.resolve` casting the clone (context.py `resolved.to(device, dtype)`). +- Notebook outputs match execution logs (`{'layers': [0, 1], 'reply': "'the'"}`; `{'bundle': ..., 'reply_matches': True}`); `execution_count` 1..3 across cells. + +## 1. Findings + +### P0 — none + +### P1 — none + +No functional blocker in the method math, hook lifetime, state restoration, or freeze path. The intended math is +reproduced exactly (traced line by line against the task spec, and the explicit-Jacobian parity test is a genuine +independent contraction of the same formula — including the unequal-class (2 pos / 1 neg) weighting, the cross-token +dependence assertion (`jacobian[:, 0, 1].abs().sum() > 0`), and the exclusion of `skip_first`/final-token positions — +and it passes at `atol=1e-5` on a batch of 2, so batch/padding separation is also validated). + +### P2-1 — `VJPDeltaFit.resolve` memo branch is missing the `model is not None` guard + +- Location: `steerability/algorithms/state_control/vjp_delta/fit.py`, `resolve` (the memo-hit line). +- Mechanism: the guard is `if self._model_ref is not None and self._model_ref() is model and self._master is not None:`. + After the memoized model is garbage-collected, `self._model_ref()` returns `None`, so a subsequent `resolve(None, tokenizer)` + satisfies the identity test (None is None) and silently returns the stale cached master instead of raising. + `ContrastiveFit.resolve` in `common/sources.py` guards the same branch with `model is not None and ...`, and + `SinglePairFit.resolve` raises up front for `model=None`; `_fit` itself documents "requires a live model at steer time". +- Repro (run during review): `del model; gc.collect(); source.resolve(None, tokenizer)` → returned a vector + (layers [0]) instead of raising. +- User impact: the pipeline always passes a live model for MODULE-access sources (the steer plan venues it `live`), + so this only bites direct API misuse (reusing one fit instance against `model=None` after its model died, or a + hand-driven `InterventionControl.steer(None, ...)`). Estimated severity: low, but it silently returns a vector + fitted for a different, dead model — the silent-staleness aspect is the concern. +- Minimal fix: `if model is not None and self._model_ref is not None and self._model_ref() is model and ...` — one + line, matching the established source pattern. + +### P2-2 — `_class_gradients` wraps every RuntimeError as "backward failed ... must support gradients", including real failures + +- Location: `fit.py`, `_class_gradients` `except RuntimeError` block. +- Mechanism: any RuntimeError not containing the literal "VJP-delta" (e.g., CUDA OOM, dtype mismatch, a broken + attention implementation) is replaced by `RuntimeError("VJP-delta backward failed. The configured model must + support gradients through its decoder layers.")` (`from error` preserves the chain, so the original traceback is + reachable). OOM is a RuntimeError, so an out-of-memory fit is reported as an unsupported-model failure. +- User impact: diagnostics only; the misleading headline message on large-model fits. +- Minimal fix: re-raise OOM/shape errors verbatim and wrap only autograd-specific failures; or fold the original + message text into the wrapper. + +### P2-3 — 35 workflow-artifact files under `slop/` are added to the branch (base had none) + +- Files: `slop/audits/job_1647.md`, `job_1648.md`, `slop/pr_drafts/2026-09-17_vjp_delta.md`, + `slop/verification/2026-09-17_vjp-delta/*` (pre-commit/docs/full-suite/notebook/CUDA logs, `gpu_smoke.py`, queue + status JSON). `git ls-files f1d8b5f | grep ^slop/` → 0; `git ls-files HEAD | grep ^slop/` → 35. +- Mechanism: the diff adds them; the draft file itself ends "draft for editorial review, not publication." Logs embed + local machine paths and queue metadata. +- User impact: repository hygiene / merge decision, not a code defect. If the maintainers do not want + agent-workflow artifacts in the tree, these should be excluded/ignored before merge. +- Minimal fix: add `slop/` (or the specific audit/draft/verification subtrees) to `.gitignore` and drop the files + from the branch, or explicitly confirm they are intended to ship. + +### P2-4 — editorial: provenance/license wording and agent-signature comments (flagged by the PR draft itself) + +- `control.py` docstring and notebook cell state: "This is a repo-native implementation from the documented + mathematics and Steerability contracts. It does not copy or assert a license for that source repository." This is + honest attribution with a pinned commit (`cb03382ebd0cc9cad615d169f42e68e8ae3e12a7`), makes no relicensing claim, + and matches the "unlicensed provenance repo" fact. The phrase "assert a license" is slightly awkward; the PR body + already carries the clearer disclaimer. Not a blocker; the draft requested editorial review, which I echo. +- `` HTML comments appear in `docs/reference/algorithms/state_control/vjp_delta.md` and + `examples/notebooks/algorithms/vjp_delta.ipynb` — grep across the other reference pages (`caa.md`, `iti.md`, ...) + and other algorithm notebooks shows no other file carries them, so they are not an established repo convention; + strip before merge if agent signatures are unwanted. +- Cosmetic, non-blocking. + +### P3 notes (not findings) + +- fp16/bf16 fit precision: `grad_outputs = torch.zeros_like(target)` and `cotangent.to(dtype=target.dtype)` compute + the VJP in the model's reduced precision, upcasting only after the per-prompt average. Functional on CUDA (job + 1649 passed), but large fp16 models will get reduced-precision extraction. Consider an fp32 fit pass if direction + quality matters; not a defect. +- `cleanup()` drops `interventions` but the template's `VJPDeltaFit` source keeps the CPU master vectors (and the + weakref to the model remains). GPU copies are freed; the docstring "Drop fitted intervention tensors" is slightly + stronger than the effect. The weakref test passes (`ref() is None` after `del model; gc.collect()`). +- Gradient-checkpointed models re-fire the fit's forward hooks during `autograd.grad` recomputation; captured lists + grow with unused entries and `source_states` entries are overwritten after autograd.grad already consumed the + originals — benign, but untested. +- No test covers the (unlikely) failure "decoder layer returned a non-tensor" branch or the `requires_grad`-guard + runtime error path (only `inference_mode` is tested); the maintained suite lacks a regression asserting the + CPU-master/CUDA-bound device split that the CUDA smoke script checks ad hoc. + +## 2. Claims checked and found sound + +- **Math** matches the documented spec exactly: per-prompt final-token class means → contrast, cotangent placed at + all valid target positions, per-prompt mean over valid source positions, independent class averaging (2-vs-1-size + classes), positive-minus-negative, per-layer unit-norm normalization, `source < target` enforced. Parity with an + explicit Jacobian contraction is a genuine, non-tautological cross-check and passes. +- **Batch/padding**: right-padded rows, `lengths = mask.sum(1) - 1` final-token indexing, causal-mask row + independence, per-batch width invariance enforced by per-prompt averaging before aggregation — all sound; the + short-row guard (`lengths <= skip_first + 1`) raises before any hook registration. +- **State restoration**: `_fit` snapshots `training`, per-parameter `requires_grad`, and `.grad` (detach-clone, None + preserved) before mutation and restores in `finally`; hooks are removed in `finally` in both `_target_mean` and + `_class_gradients`; weights are never written. Verified by tests (success and error paths) and by inspection. +- **Weakref/cache lifecycle**: memoization keyed on model identity with a defensive clone per resolve; test + confirms the model can be collected after steer. (Except the P2-1 None-model gap.) +- **Fit identity / staleness / freeze**: `fit_identity()` digests the `VJPDeltaFit` dataclass (init fields only — + `_model_ref`/`_master` are `init=False`, so codec excludes them); data edits flip the digest (SpipeStaleError) + while application-only `strength` edits do not; frozen reload lands on `ActivationAdapter` with `steer_fits() == ()` + and the monkeypatched-`resolve` test proves no VJP runs on reload. +- **Docs/notebook**: nav entry, controls.md catalog entry with honest Backends line (HF fit; HF + vLLM-Hook additive + wire form — the broadcast transform's `wire_kind="additive"` and `requirements()` conform to CAA's precedent), + reference page follows caa.md's mkdocstrings block, `examples/index.md` updated, notebook executed with stored + outputs. +- **Repo conventions**: three-file layout + `STEERING_METHOD` registry shape, `BaseArgs` promotion to control + attributes, no new dependency, docstrings end with the reference block, `text_config`/`resolve_model_layout` used + instead of raw `model.config`, pre-commit clean on changed files. + +## 3. Gaps I could not verify + +- No network access to `wassname/vjp-steering@cb03382`; the contract review is against the documented intended math + (which the implementation satisfies), not against the upstream implementation itself. +- No steering-efficacy metric: the only behavior evidence is public generation returning `'the'` on tiny models + (notebook, CUDA smoke, tests). +- I did not rerun the full 3257-test suite (relied on `full_pytest_final.log`); the pre-existing strict-docs-blocking + warnings and the `rad.ipynb`/`instruction_following.ipynb` high-entropy pre-commit failures are unrelated to this + PR (verified the failing files are not in the diff). +- The vLLM-Hook wire path was not executed (no engine in this worktree); only the declarative wire-form contract + was checked. +- Large-model CUDA memory behavior during the fit (full-graph retention from embedding to `num_layers-3` with + batch_size=8 / max_length=384 defaults) is untested outside tiny fixtures. +- `docs/human_journal.md` is an untracked supervisor session artifact in the worktree (contains session metadata); + it is not part of the diff but should likely be gitignored. + +## 4. Verdict + +**Ready after listed fixes** — all listed fixes are P2 (one-line guard in `resolve`, error-wrap selectivity, +`slop/` exclusion decision, optional comment/license wording cleanup); none block the method's function, and the +mathematics, lifecycle restoration, freeze/reload behavior, and framework integration are correct as implemented. + +PI[deepseek-v4-flash] diff --git a/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md b/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md new file mode 100644 index 00000000..faf5b55c --- /dev/null +++ b/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md @@ -0,0 +1,27 @@ +**Observations (evidence-based):** + +1. **Fit correctness is strongly pinned.** `tests/controls/test_vjp_delta.py::test_tiny_jacobian_matches_production_for_unequal_classes_and_cross_token_dependence` compares production extraction against a hand-written explicit Jacobian (via `torch.autograd.functional.jacobian`) for unequal class sizes, and separately asserts cross-token dependence exists in the Jacobian. This directly validates the two most subtle aspects of the method: per-prompt averaging of valid source-token gradients before independent per-class means, and the size-independent class pooling. + +2. **State restoration is explicit and tested.** `fit.py::VJPDeltaFit._fit` snapshots `model.training`, per-parameter `requires_grad`, and parameter `.grad` tensors under `_fit`, restores them in a `finally`, and both a success-path test (`test_fit_restores_mode_flags_and_existing_parameter_grads_after_success`) and an error-path test (`..._after_error`) assert exact equality of flags, grads, and weights. The weak model reference and `control.cleanup()` contract are also tested. + +3. **Architectural fidelity is high.** `VJPDelta` subclasses `InterventionControl`, declares a single `Intervention` with `CoveredLayers()`, `AdditiveTransform`, and `TokenScope`, and delegates generation to the shared additive machinery — no custom hook code, no per-generation state. Fit is a proper `ArtifactSource` (`resolve` returns a defensive clone, memoized per model via weakref), matching `ContrastiveFit`/`SinglePairFit` conventions. The frozen form is `ActivationAdapter`, consistent with the repo's architecture, and the precomputed-vector path is cleanly supported. Notably, `VJPDeltaFit` declares `access = ModelAccess.MODULE` and `artifact_class = "direction"`, consistent with the fit requiring a live model (the backward pass requires module-level execution). + +4. **Docstrings/docs/notebook/deps/registry surfaces are all present** (`.nav.yml` entry, `controls.md` mention, reference page, notebook, `STEERING_METHOD` export, `pyproject`/`optional.py` checks not flagged as missing). The full suite passed (`3257 passed, 340 skipped` per the verification log). The staged pre-commit failure is attributed to an unchanged old notebook's entropy, not this change. + +**Highest-value risks/omissions:** + +1. **`requires_grad(True)` on all parameters without an explicit no-grad guard on the model's non-participating forward path.** Under `torch.enable_grad()` with all parameters marked `requires_grad_(True)`, the forward computes a full autograd graph for the whole model (not just the target layer), which is memory/CPU expensive but logically necessary — the gradients flow back through earlier layers. This is behaviorally correct (the VJP indeed spans the target-to-source path through the full stack), but it is worth confirming that no silent device-mismatch or dtype asymmetry arises if `cotangent` is on a different device than `target` — the `to(dtype=..., device=...)` call inside `_class_gradients` handles this, so this is a low-severity risk. The bigger risk is **the hidden failure mode around position-dependent cotangent application**: `grad_outputs[valid] = cotangent` uses a broadcast assignment. If `valid` has fewer True positions than `cotangent`'s size (which cannot per-row since the same cotangent is used per-position, but `grad_outputs[valid] = cotangent` expects a matching-length tensor on the right) — actually `cotangent` is `[H]` and `valid` is `[B, T]`, so the assignment broadcasts correctly per-position across all valid tokens. The symmetry with `_target_mean` **final unpadded token vs the cotangent applied at *all* valid target positions** is a semantic discrepancy: the target mean is at the final unpadded token, but the cotangent is applied at *every* valid position. This is the paper's documented contraction (the VJP pulls source gradients from all valid target positions against the final-token contrast), but a reviewer should flag that the `_target_mean` capture uses `model(..., attention_mask=attention_mask)` with `torch.no_grad()` while `_class_gradients` uses the same shape forward under grad — this asymmetry is fine but is the subtle part worth one sentence of documentation. + +2. **Source-layer gradients at positions with padding tokens.** `per_prompt = (gradient.float() * valid.unsqueeze(-1))...` divides by `valid.sum(dim=1)` per row. If a row's valid count is zero, division by zero produces NaN — the `_valid_token_mask` guard ensures `lengths > skip_first + 1`, so every row has at least one valid position, so this is impossible in practice. But the guard lives inside `_valid_token_mask` and would only raise after the forward already ran, not before. + +3. **Device/dtype edge in `_target_mean` and `_class_gradients` cache/device copies.** Gradients captured are `.float()`ed and summed in Python accumulation dictionaries (`totals` keyed on layer id), which is fine, but the per-prompt averaging uses `gradient.float() * valid.unsqueeze(-1)` — if the model is running in `bfloat16` or `float16` on CPU, `.float()` upcasts, which is intentional but could be a silent perf concern at large scale. Not correctness. + +**Scientific correctness:** The method contract is faithfully implemented. The target contrast (positive-minus-negative mean at the final unpadded target-layer token), cotangent application at valid positions, source gradients averaged per-prompt over valid positions then per-class independently, subtraction, and per-layer L2 normalization all match the documented mathematics and destination contract. The explicit Jacobian cross-check is strong supporting evidence. + +**Merge readiness:** Small upstream PR, yes — recommend merge. The implementation is architecturally faithful (standard `InterventionControl`/`AdditiveTransform`/`ArtifactSource` composition), scientifically pinned by the explicit-Jacobian test, state-restoration tests pass, full suite is green, docs/notebook/nav/controls.md are all present, and staled-freeze behavior is covered. The unlicensed upstream provenance is honestly attributed with no relicensing claim, which is the correct posture. The highest-value actionable items are (in order): (a) document in `VJPDeltaFit.fit`'s docstring that the cotangent is applied at *all* valid target positions while the target mean is at the final unpadded token — this asymmetry is the one thing a human reviewer is most likely to misread; (b) consider a one-line note that `requires_grad_(True)` on all parameters is intentional (the VJP needs gradients through the full stack) but that the fit already restores flags; (c) confirm the `_Precomputed`/`SteeringVector` clone path means a caller-owned precomputed `steering_vector` is never mutated — the code path does clone, so this is verified, not a risk. + +**Hidden failure mode considered and evidence against it:** The most plausible hidden failure is a silent device mismatch between the cotangent and the target hidden states during the backward — but the `to(dtype=..., device=...)` inside `_class_gradients` explicitly moves the cotangent to the target's dtype/device, so this is safe. Another candidate is a model whose forward is wrapped in `torch.no_grad()` at the module level (e.g., a fused inference-only path) — the fit explicitly raises with a clear message ("VJP-delta backward failed... must support gradients"), so a gracefully-degrading, honest error instead of a silent wrong direction. This is the right behavior. + +**Recommendation: merge as a small upstream PR.** Fix the one docstring asymmetry (risk 3a) as a nice-to-have; everything else meets the Definition of Done and the invariants. + +PI[deepseek-v4-flash] \ No newline at end of file diff --git a/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log b/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log new file mode 100644 index 00000000..5c9e567d --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log @@ -0,0 +1,4 @@ +32e8e998dc0e7b1097697e8f2df72deba8f7b6402de8806295adfe6841162dcf slop/reviews/2026-09-17_vjp_delta_cheap_review.md +933acc03d2995b00dd246449c1ab6169237b5aba0ed00421d3fa687e7cb44faa slop/reviews/2026-09-17_vjp_delta_quick_oracle.md +32e8e998dc0e7b1097697e8f2df72deba8f7b6402de8806295adfe6841162dcf /home/code/.pi/agent/sessions/--home-code-dev--/subagent-artifacts/outputs/7b9dc807-bbc9-4b11-a522-adc348fd2404/slop/reviews/2026-09-17_vjp_delta_cheap_review.md +933acc03d2995b00dd246449c1ab6169237b5aba0ed00421d3fa687e7cb44faa /home/code/.pi/agent/sessions/--home-code-dev--/subagent-artifacts/outputs/7b9dc807-bbc9-4b11-a522-adc348fd2404/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md diff --git a/slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log b/slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log new file mode 100644 index 00000000..d2fb44bd --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log @@ -0,0 +1,138 @@ +.....................ssss..s....ss..s..s..s............................. [ 2%] +...ssssssssssssssss........ssss..s..s................................... [ 4%] +.............ssssssssssssssssssssssss........ssss..s..s..s..s..s..s..s.. [ 6%] +s..s..s..s..s................................................sssssssssss [ 8%] +sssssssssssss..s..s..s..s.............s..s...s...........s..s..s...s..s. [ 10%] +.......ssss..s....ss..s..s..s................................sssssssssss [ 12%] +sssss........ssss..s..s................................................s [ 14%] +sssssssssssssssssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s. [ 16%] +...............................................ssssssssssssssssssssssss. [ 18%] +.s..s..s..s...........ssssss...ss........ssssss..ss..s..s........ssss..s [ 20%] +....ss..s..s..s................................ssssssssssssssss........s [ 22%] +sss..s..s................................................sssssssssssssss [ 24%] +sssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s............... [ 26%] +.................................ssssssssssssssssssssssss..s..s..s..s... [ 28%] +..........s..s...s...........s..s..s...s..s............................. [ 30%] +........................................................................ [ 32%] +........................................................................ [ 34%] +........................................................................ [ 36%] +........................................................................ [ 38%] +........................................................................ [ 40%] +..............................................s......................... [ 42%] +........................................................................ [ 44%] +........................................................................ [ 46%] +........................................................................ [ 48%] +........................................................................ [ 50%] +........................................................................ [ 52%] +........................................................................ [ 54%] +........................................................................ [ 56%] +........................................................................ [ 58%] +........................................................................ [ 60%] +........................................................................ [ 62%] +........................................................................ [ 64%] +........................................................................ [ 66%] +........................................................................ [ 68%] +........................................................................ [ 70%] +........................................................................ [ 72%] +.................................................................s...... [ 74%] +........................................................................ [ 76%] +........................................................................ [ 78%] +........................................................................ [ 80%] +........................................................................ [ 82%] +...............................................s........................ [ 84%] +........................................................................ [ 86%] +........................................................................ [ 88%] +........................................................................ [ 90%] +........................................................................ [ 92%] +........................................................................ [ 94%] +........................................................................ [ 96%] +........................................................................ [ 98%] +................................................................... [100%] +=============================== warnings summary =============================== +tests/controls/test_few_shot.py: 144 warnings + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: FewShot override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cuda] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cuda] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cuda] + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/sklearn/decomposition/_pca.py:646: RuntimeWarning: invalid value encountered in divide + explained_variance_ratio_ = explained_variance_ / total_var + +tests/controls/test_lora_composition.py::test_lora_then_caa_steers_and_hooks_adapted_layer + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/utils/save_and_load.py:438: UserWarning: Could not find a config file in - will assume that the vocabulary was not modified. + warnings.warn( + +tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/mapping_func.py:72: UserWarning: You are trying to modify a model with PEFT for a second time. If you want to reload the model with a different config, make sure to call `.unload()` before. + warnings.warn( + +tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py:305: UserWarning: Already found a `peft_config` attribute in the model. This will lead to having multiple adapters in the model. Make sure to know what you are doing! + warnings.warn( + +tests/evaluation/test_inspect_integration.py::TestMessagesPathIntegration::test_batched_eval_fires_adapt_messages_once_per_sample + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:954: PydanticDeprecatedSince20: `__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ + warnings.warn( + +tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: + + Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ + warnings.warn( + ~~~~~~~~~~~~~^ + f"Unclosed <{self.__class__.__name__} at {id(self):x}>", + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<2 lines>... + source=self, + ^^^^^^^^^^^^ + ) + ^ + ResourceWarning: Unclosed + + Enable tracemalloc to get traceback where the object was allocated. + See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. + warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + +tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: + + Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ + warnings.warn( + ~~~~~~~~~~~~~^ + f"Unclosed <{self.__class__.__name__} at {id(self):x}>", + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<2 lines>... + source=self, + ^^^^^^^^^^^^ + ) + ^ + ResourceWarning: Unclosed + + Enable tracemalloc to get traceback where the object was allocated. + See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. + warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + +tests/evaluation/test_runner.py::TestRunShapeAndResults::test_run_shape_and_results_frame +tests/evaluation/test_runner.py::TestRunShapeAndResults::test_one_provider_name_per_config_and_trial_seeds + /home/code/dev/steerability-vjp/steerability/evaluation/runner.py:203: UserWarning: seed is set but no temperature is configured in generate_defaults or any suite's generate_overrides; trial seeds are attached to sampling dispatches only, so the derived seeds will not be attached. Pass generate_defaults={'temperature': 0} for greedy decoding or an explicit sampling temperature. + warnings.warn( + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +3258 passed, 340 skipped, 166 warnings in 283.24s (0:04:43) diff --git a/slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log b/slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log new file mode 100644 index 00000000..bdf2d777 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log @@ -0,0 +1,3 @@ +........................................................................ [ 77%] +..................... [100%] +93 passed in 24.97s diff --git a/slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log b/slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log new file mode 100644 index 00000000..b9b64843 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log @@ -0,0 +1,15 @@ +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Failed +- hook id: end-of-file-fixer +- exit code: 1 + +Fixing slop/reviews/2026-09-17_vjp_delta_quick_oracle.md + +check for added large files..............................................Passed +check yaml...........................................(no files to check)Skipped +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts.................................................Passed +debug statements (python)................................................Passed +isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log b/slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log new file mode 100644 index 00000000..44f38515 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log @@ -0,0 +1,10 @@ +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...........................................(no files to check)Skipped +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts.................................................Passed +debug statements (python)................................................Passed +isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/run.md b/slop/verification/2026-09-17_vjp-delta/run.md index 3851dbbc..4fed2798 100644 --- a/slop/verification/2026-09-17_vjp-delta/run.md +++ b/slop/verification/2026-09-17_vjp-delta/run.md @@ -33,6 +33,14 @@ The two failed harness attempts are audited in [job_1647.md](../../audits/job_16 The first full-suite run completed with `3256 passed, 340 skipped, 166 warnings in 262.72s`; see [full_pytest.log](full_pytest.log). A final full-suite run after the remaining regression updates is active at this log path: [full_pytest_final.log](full_pytest_final.log). +## Review fixes + +- `VJPDeltaFit.resolve(None, tokenizer)` can no longer match a dead weakref cache entry; it runs the live-model guard and raises. +- Model-forward failures now propagate unchanged. `torch.autograd.grad` failures retain their original message in the `VJP-delta autograd.grad failed: ...` headline. +- Both parent review outputs are copied byte-for-byte to `slop/reviews/`; [review_copy_hashes.log](review_copy_hashes.log) records matching SHA-256 values. +- Lifecycle-focused tests: `93 passed` in [review_fix_lifecycle_tests.log](review_fix_lifecycle_tests.log). The post-review full suite: `3258 passed, 340 skipped, 166 warnings in 283.24s` in [review_fix_full_pytest.log](review_fix_full_pytest.log). +- Changed production/test files passed pre-commit in [review_fix_precommit_code.log](review_fix_precommit_code.log). The exact copied oracle review has no terminal newline; the end-of-file hook would alter that source artifact, so it was excluded from formatter execution to preserve the required byte identity. + ## Residual risks - The VJP path supports standard differentiable torch decoder execution. Inference mode and unsupported backward paths raise rather than changing method behavior. diff --git a/steerability/algorithms/state_control/vjp_delta/fit.py b/steerability/algorithms/state_control/vjp_delta/fit.py index 04efcddb..9879f28c 100644 --- a/steerability/algorithms/state_control/vjp_delta/fit.py +++ b/steerability/algorithms/state_control/vjp_delta/fit.py @@ -220,18 +220,15 @@ def target_capture(_module, _args, output): ) grad_outputs = torch.zeros_like(target) grad_outputs[valid] = cotangent.to(dtype=target.dtype, device=target.device) - gradients = torch.autograd.grad( - outputs=target, - inputs=tuple(source_states[layer_id] for layer_id in source_modules), - grad_outputs=grad_outputs, - allow_unused=False, - ) - except RuntimeError as error: - if "VJP-delta" in str(error): - raise - raise RuntimeError( - "VJP-delta backward failed. The configured model must support gradients through its decoder layers." - ) from error + try: + gradients = torch.autograd.grad( + outputs=target, + inputs=tuple(source_states[layer_id] for layer_id in source_modules), + grad_outputs=grad_outputs, + allow_unused=False, + ) + except RuntimeError as error: + raise RuntimeError(f"VJP-delta autograd.grad failed: {error}") from error finally: for handle in handles: handle.remove() @@ -325,7 +322,7 @@ def resolve( ) -> SteeringVector: """Fit once per model identity and return a defensive clone.""" del session - if self._model_ref is not None and self._model_ref() is model and self._master is not None: + if model is not None and self._model_ref is not None and self._model_ref() is model and self._master is not None: return self._master.clone() master = self._fit(model, tokenizer) self._model_ref = weakref.ref(model) diff --git a/tests/controls/test_vjp_delta.py b/tests/controls/test_vjp_delta.py index cb2004ae..aad0c249 100644 --- a/tests/controls/test_vjp_delta.py +++ b/tests/controls/test_vjp_delta.py @@ -241,6 +241,15 @@ def test_invalid_layer_order_and_zero_direction_fail_clearly(): _source().resolve(model, tokenizer) +def test_autograd_error_keeps_the_original_diagnostic(monkeypatch): + def out_of_memory(*_args, **_kwargs): + raise RuntimeError("CUDA out of memory while allocating a gradient buffer") + + monkeypatch.setattr(torch.autograd, "grad", out_of_memory) + with pytest.raises(RuntimeError, match="VJP-delta autograd.grad failed: CUDA out of memory"): + _source().resolve(tiny_llama(), wordlevel_tokenizer()) + + def test_additive_zero_strength_preserves_hidden_and_nonzero_adds_vector(): torch.manual_seed(11) tokenizer = wordlevel_tokenizer() @@ -350,3 +359,5 @@ def test_fit_holds_only_a_weak_model_reference_and_control_cleanup_drops_bound_t del model gc.collect() assert ref() is None + with pytest.raises(ValueError, match="requires a live model"): + source.resolve(None, tokenizer) From 89eaaaf0dee7af37f146cd2718f31f28595d4ad4 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 19:05:49 +0800 Subject: [PATCH 05/10] Normalize VJP review artifacts Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- slop/pr_drafts/2026-09-17_vjp_delta.md | 5 ++-- .../2026-09-17_vjp_delta_quick_oracle.md | 2 +- .../release_artifact_precommit.log | 29 +++++++++++++++++++ .../release_artifact_vjp_tests.log | 2 ++ .../review_copy_hashes.log | 14 ++++++--- slop/verification/2026-09-17_vjp-delta/run.md | 10 +++---- 6 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log create mode 100644 slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log diff --git a/slop/pr_drafts/2026-09-17_vjp_delta.md b/slop/pr_drafts/2026-09-17_vjp_delta.md index 57b9b487..2cfeeb53 100644 --- a/slop/pr_drafts/2026-09-17_vjp_delta.md +++ b/slop/pr_drafts/2026-09-17_vjp_delta.md @@ -21,9 +21,10 @@ The method is motivated by Anthropic's J-lens work. VJP-delta implementation pro ### Verification -- focused controls: `91 passed` -- VJP-delta regressions: `9 passed` +- lifecycle-focused controls: `93 passed` +- VJP-delta regressions: `10 passed` - full suite: `3258 passed, 340 skipped, 166 warnings` in `slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log` +- changed release artifacts: pre-commit passes - notebook: executed with stored outputs - docs: non-strict MkDocs build passes; strict mode remains blocked by 23 existing warnings outside this change - CUDA queue smoke `1649`: master vectors were CPU, bound vectors CUDA, and public generation returned `'the'` diff --git a/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md b/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md index faf5b55c..8e9ff0c1 100644 --- a/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md +++ b/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md @@ -24,4 +24,4 @@ **Recommendation: merge as a small upstream PR.** Fix the one docstring asymmetry (risk 3a) as a nice-to-have; everything else meets the Definition of Done and the invariants. -PI[deepseek-v4-flash] \ No newline at end of file +PI[deepseek-v4-flash] diff --git a/slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log b/slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log new file mode 100644 index 00000000..8ac18b6f --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log @@ -0,0 +1,29 @@ +# Changed-artifact pre-commit + +Command: + +```sh +/home/code/dev/steerability/.venv/bin/pre-commit run --files \ + slop/pr_drafts/2026-09-17_vjp_delta.md \ + slop/reviews/2026-09-17_vjp_delta_quick_oracle.md \ + slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log \ + slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log \ + slop/verification/2026-09-17_vjp-delta/run.md +``` + +Result: + +```text +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...........................................(no files to check)Skipped +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts................................................Passed +debug statements (python)............................(no files to check)Skipped +isort (python).......................................(no files to check)Skipped +``` + + diff --git a/slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log b/slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log new file mode 100644 index 00000000..388e2a22 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log @@ -0,0 +1,2 @@ +.......... [100%] +10 passed in 4.89s diff --git a/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log b/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log index 5c9e567d..b78b8583 100644 --- a/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log +++ b/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log @@ -1,4 +1,10 @@ -32e8e998dc0e7b1097697e8f2df72deba8f7b6402de8806295adfe6841162dcf slop/reviews/2026-09-17_vjp_delta_cheap_review.md -933acc03d2995b00dd246449c1ab6169237b5aba0ed00421d3fa687e7cb44faa slop/reviews/2026-09-17_vjp_delta_quick_oracle.md -32e8e998dc0e7b1097697e8f2df72deba8f7b6402de8806295adfe6841162dcf /home/code/.pi/agent/sessions/--home-code-dev--/subagent-artifacts/outputs/7b9dc807-bbc9-4b11-a522-adc348fd2404/slop/reviews/2026-09-17_vjp_delta_cheap_review.md -933acc03d2995b00dd246449c1ab6169237b5aba0ed00421d3fa687e7cb44faa /home/code/.pi/agent/sessions/--home-code-dev--/subagent-artifacts/outputs/7b9dc807-bbc9-4b11-a522-adc348fd2404/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md +# Review copy hashes + +- cheap review source SHA-256: `32e8e998dc0e7b1097697e8f2df72deba8f7b6402de8806295adfe6841162dcf` +- cheap review committed-copy SHA-256: `32e8e998dc0e7b1097697e8f2df72deba8f7b6402de8806295adfe6841162dcf` +- quick oracle raw source SHA-256: `933acc03d2995b00dd246449c1ab6169237b5aba0ed00421d3fa687e7cb44faa` +- quick oracle normalized committed-copy SHA-256: `31dabfcbef027103290e0a8b6ff59a371d03425329f8efdad191efa452bed36c` + +The raw quick-oracle source lacks a terminal newline. Its committed copy differs only by one added terminal newline so the repository end-of-file check passes. Bytes before terminal newlines are identical. + + diff --git a/slop/verification/2026-09-17_vjp-delta/run.md b/slop/verification/2026-09-17_vjp-delta/run.md index 4fed2798..af2440bc 100644 --- a/slop/verification/2026-09-17_vjp-delta/run.md +++ b/slop/verification/2026-09-17_vjp-delta/run.md @@ -14,8 +14,8 @@ | command | result | evidence | | --- | --- | --- | -| `pytest tests/controls/test_vjp_delta.py -q` | 9 passed | [test_vjp_delta_final.log](test_vjp_delta_final.log) | -| `pytest tests/controls/test_vjp_delta.py tests/controls/test_sources.py tests/controls/test_activation_adapter.py tests/controls/test_spipe_freeze_state.py -q` | 91 passed | [focused_tests.log](focused_tests.log) | +| `pytest tests/controls/test_vjp_delta.py -q` | 10 passed | [release_artifact_vjp_tests.log](release_artifact_vjp_tests.log) | +| `pytest tests/controls/test_vjp_delta.py tests/controls/test_sources.py tests/controls/test_activation_adapter.py tests/controls/test_spipe_freeze_state.py -q` | 93 passed | [review_fix_lifecycle_tests.log](review_fix_lifecycle_tests.log) | | `pre-commit run --files ...` | passed | [precommit_final.log](precommit_final.log) | | `mkdocs build` | passed with existing warnings | [docs_build_nonstrict.log](docs_build_nonstrict.log) | | `mkdocs build --strict` | failed on 23 existing unrelated warnings | [docs_build.log](docs_build.log) | @@ -37,9 +37,9 @@ The first full-suite run completed with `3256 passed, 340 skipped, 166 warnings - `VJPDeltaFit.resolve(None, tokenizer)` can no longer match a dead weakref cache entry; it runs the live-model guard and raises. - Model-forward failures now propagate unchanged. `torch.autograd.grad` failures retain their original message in the `VJP-delta autograd.grad failed: ...` headline. -- Both parent review outputs are copied byte-for-byte to `slop/reviews/`; [review_copy_hashes.log](review_copy_hashes.log) records matching SHA-256 values. -- Lifecycle-focused tests: `93 passed` in [review_fix_lifecycle_tests.log](review_fix_lifecycle_tests.log). The post-review full suite: `3258 passed, 340 skipped, 166 warnings in 283.24s` in [review_fix_full_pytest.log](review_fix_full_pytest.log). -- Changed production/test files passed pre-commit in [review_fix_precommit_code.log](review_fix_precommit_code.log). The exact copied oracle review has no terminal newline; the end-of-file hook would alter that source artifact, so it was excluded from formatter execution to preserve the required byte identity. +- Both parent review outputs are copied to `slop/reviews/`. The raw quick-oracle source lacks a terminal newline; the committed copy adds only that newline. [review_copy_hashes.log](review_copy_hashes.log) records both raw and normalized-copy SHA-256 values. +- VJP-delta regressions: `10 passed` in [release_artifact_vjp_tests.log](release_artifact_vjp_tests.log). Lifecycle-focused tests: `93 passed` in [review_fix_lifecycle_tests.log](review_fix_lifecycle_tests.log). The post-review full suite: `3258 passed, 340 skipped, 166 warnings in 283.24s` in [review_fix_full_pytest.log](review_fix_full_pytest.log). +- Changed production/test files passed pre-commit in [review_fix_precommit_code.log](review_fix_precommit_code.log). The normalized review copy is included in the release-artifact pre-commit run. ## Residual risks From 87b725572bf7c827468816c21012c3a313bd4298 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 19:16:38 +0800 Subject: [PATCH 06/10] Verify VJP rebase on upstream main Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- slop/pr_drafts/2026-09-17_vjp_delta.md | 8 +- .../rebase_docs_build_nonstrict.log | 98 +++++++++++ .../rebase_full_pytest.log | 160 ++++++++++++++++++ .../rebase_lifecycle_tests.log | 3 + .../2026-09-17_vjp-delta/rebase_precommit.log | 30 ++++ .../2026-09-17_vjp-delta/rebase_vjp_tests.log | 2 + slop/verification/2026-09-17_vjp-delta/run.md | 15 +- 7 files changed, 312 insertions(+), 4 deletions(-) create mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log create mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log create mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log create mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_precommit.log create mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log diff --git a/slop/pr_drafts/2026-09-17_vjp_delta.md b/slop/pr_drafts/2026-09-17_vjp_delta.md index 2cfeeb53..0b899ec6 100644 --- a/slop/pr_drafts/2026-09-17_vjp_delta.md +++ b/slop/pr_drafts/2026-09-17_vjp_delta.md @@ -21,12 +21,14 @@ The method is motivated by Anthropic's J-lens work. VJP-delta implementation pro ### Verification +The branch was rebased onto `generative-computing/steerability` main `92e3098086a1bb70db078343b459831dd12040e5` (merged PR #31), not PR #32. + - lifecycle-focused controls: `93 passed` - VJP-delta regressions: `10 passed` -- full suite: `3258 passed, 340 skipped, 166 warnings` in `slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log` -- changed release artifacts: pre-commit passes +- full suite: `3418 passed, 397 skipped, 173 warnings` in `slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log` +- changed rebase diff: pre-commit passes (`slop/verification/2026-09-17_vjp-delta/rebase_precommit.log`) - notebook: executed with stored outputs -- docs: non-strict MkDocs build passes; strict mode remains blocked by 23 existing warnings outside this change +- docs: non-strict MkDocs build passes with existing warnings; strict mode remains blocked by warnings outside this change - CUDA queue smoke `1649`: master vectors were CPU, bound vectors CUDA, and public generation returned `'the'` ### Editorial review requested diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log b/slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log new file mode 100644 index 00000000..fd4b02c3 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log @@ -0,0 +1,98 @@ + + │ ⚠ Warning from the Material for MkDocs team + │ + │ MkDocs 2.0, the underlying framework of Material for MkDocs, + │ will introduce backward-incompatible changes, including: + │ + │ × All plugins will stop working – the plugin system has been removed + │ × All theme overrides will break – the theming system has been rewritten + │ × No migration path exists – existing projects cannot be upgraded + │ × Closed contribution model – community members can't report bugs + │ × Currently unlicensed – unsuitable for production use + │ + │ Our full analysis: + │ + │ https://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/ + +INFO - Loading data from bib files: ['/home/code/dev/steerability-vjp/docs/assets/references.bib'] +INFO - Cleaning site directory +INFO - Building documentation to directory: /home/code/dev/steerability-vjp/site +INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: + - human_journal.md + - _hooks/bibtex_warnings.py + - examples/notebooks/recipes/vllm_serve.ipynb + - examples/notebooks/recipes/routed_decoding/data.py + - examples/notebooks/studies/commonsense_mcqa/task.py + - examples/notebooks/studies/instruction_following/task.py +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/_hooks/bibtex_warnings.py +WARNING - Doc file 'concepts/controls.md' contains a link '../examples/notebooks/algorithms/user_prefix.ipynb', but the target 'examples/notebooks/algorithms/user_prefix.ipynb' is not found among documentation files. +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/act_add.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/angular_steering.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/best_of_n.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/budget_forcing.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/caa.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cast.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/contrastive_decoding.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cpo.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/deal.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/dexperts.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/directional_ablation.ipynb +INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb +INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/gepa.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/iti.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/pasta.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/prewrite.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/rad.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/sasa.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/system_prompt.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/vjp_delta.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/activation_adapter.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/contrastive_guidance.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/phased_decoding.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/search_decoding.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/stopping_rules.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/value_guidance.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/mergekit.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/trl.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/honest_persona_prompting.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/vllm_serve.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/working_with_spipes.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/data.py +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/routed_decoding.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/routing_vs_prompting.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/commonsense_mcqa.ipynb +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/task.py +WARNING - Inline reference to unknown key instruction_following +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/instruction_following.ipynb +WARNING - Inline reference to unknown key scorer +INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/task.py +INFO - mkdocstrings_handlers: Formatting signatures requires either Black or Ruff to be installed. +WARNING - griffe: steerability/algorithms/core/internals/probes/fitting.py:583: No type or annotation for parameter 'session' +WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:57: No type or annotation for parameter 'system_mode' +WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:57: Parameter 'system_mode' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:60: No type or annotation for parameter 'separator' +WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:60: Parameter 'separator' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:62: No type or annotation for parameter 'formatter' +WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:62: Parameter 'formatter' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: No type or annotation for parameter 'text' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: Parameter 'text' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: No type or annotation for parameter 'mode' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: Parameter 'mode' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: No type or annotation for parameter 'separator' +WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: Parameter 'separator' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: No type or annotation for parameter 'text' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: Parameter 'text' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: No type or annotation for parameter 'separator' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: Parameter 'separator' does not appear in the function signature +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: No type or annotation for parameter 'placement' +WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: Parameter 'placement' does not appear in the function signature +WARNING - griffe: steerability/algorithms/output_control/common/granite_heads.py:57: No type or annotation for parameter '**from_pretrained_kwargs' +WARNING - griffe: steerability/algorithms/output_control/rad/utils/reward_training.py:106: No type or annotation for parameter 'model' +WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:267: No type or annotation for parameter 'substrings' +WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:155: No type or annotation for parameter 'session' +WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:273: No type or annotation for parameter 'model' +WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:274: No type or annotation for parameter 'tokenizer' +WARNING - Inline reference to unknown key instruction_following +INFO - Evicted stale cache: .cache/mkdocs-jupyter/a986e0b321f4f67ae95b2fe3e0c06a4da49e4c7da61620d2e11e5013452b7da9.json +INFO - Documentation built in 30.85 seconds diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log b/slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log new file mode 100644 index 00000000..9e72325d --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log @@ -0,0 +1,160 @@ +.....................ssss..s....ss..s..s..s............................. [ 1%] +...ssssssssssssssss........ssss..s..s................................... [ 3%] +.............ssssssssssssssssssssssss........ssss..s..s..s..s..s..s..s.. [ 5%] +s..s..s..s..s......sss........ssss..................sssssssss....ss..s.. [ 7%] +..............................................ssssssssssssssssssssssss.. [ 9%] +s..s..s..s.............s..s...s...........s..s..s...s..s........ssss..s. [ 11%] +...ss..s..s..s................................ssssssssssssssss........ss [ 13%] +ss..s..s................................................ssssssssssssssss [ 15%] +ssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s......sss....... [ 16%] +.ssss..................sssssssss....ss..s............................... [ 18%] +.................ssssssssssssssssssssssss..s..s..s..s...........ssssss.. [ 20%] +.ss........ssssss..ss..s..s........ssss..s....ss..s..s..s............... [ 22%] +.................ssssssssssssssss........ssss..s..s..................... [ 24%] +...........................ssssssssssssssssssssssss........ssss..s..s..s [ 26%] +..s..s..s..s..s..s..s..s..s......sss........ssss..................ssssss [ 28%] +sss....ss..s................................................ssssssssssss [ 30%] +ssssssssssss..s..s..s..s.............s..s...s...........s..s..s...s..s.. [ 32%] +........................................................................ [ 33%] +........................................................................ [ 35%] +........................................................................ [ 37%] +........................................................................ [ 39%] +........................................................................ [ 41%] +........................................................................ [ 43%] +.....s.................................................................. [ 45%] +........................................................................ [ 47%] +........................................................................ [ 49%] +........................................................................ [ 50%] +........................................................................ [ 52%] +........................................................................ [ 54%] +........................................................................ [ 56%] +........................................................................ [ 58%] +........................................................................ [ 60%] +........................................................................ [ 62%] +........................................................................ [ 64%] +........................................................................ [ 66%] +........................................................................ [ 67%] +........................................................................ [ 69%] +........................................................................ [ 71%] +........................................................................ [ 73%] +..................................................s..................... [ 75%] +........................................................................ [ 77%] +........................................................................ [ 79%] +........................................................................ [ 81%] +........................................................................ [ 83%] +................................................s....................... [ 84%] +........................................................................ [ 86%] +........................................................................ [ 88%] +........................................................................ [ 90%] +........................................................................ [ 92%] +........................................................................ [ 94%] +........................................................................ [ 96%] +........................................................................ [ 98%] +.................................................................... [100%] +=============================== warnings summary =============================== +tests/controls/test_few_shot.py: 144 warnings + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: FewShot override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cuda] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cuda] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cpu] +tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cuda] + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin +tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/sklearn/decomposition/_pca.py:646: RuntimeWarning: invalid value encountered in divide + explained_variance_ratio_ = explained_variance_ / total_var + +tests/controls/test_lora_composition.py::test_lora_then_caa_steers_and_hooks_adapted_layer +tests/controls/test_lora_target_scoping.py::TestPeftInjection::test_saved_adapter_records_the_pattern_and_reloads_onto_the_decoder + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/utils/save_and_load.py:438: UserWarning: Could not find a config file in - will assume that the vocabulary was not modified. + warnings.warn( + +tests/controls/test_lora_target_scoping.py::TestMixinWiring::test_peft_config_targets_the_decoder_stack[ppo] +tests/controls/test_lora_target_scoping.py::TestMixinWiring::test_declared_target_modules_are_unchanged[ppo] + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/dill/_dill.py:423: PicklingWarning: Cannot locate reference to . + StockPickler.save(self, obj, save_persistent_id) + +tests/controls/test_lora_target_scoping.py::TestMixinWiring::test_peft_config_targets_the_decoder_stack[ppo] +tests/controls/test_lora_target_scoping.py::TestMixinWiring::test_declared_target_modules_are_unchanged[ppo] + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/dill/_dill.py:423: PicklingWarning: Cannot pickle : unittest.mock.MagicMock has recursive self-references that trigger a RecursionError. + StockPickler.save(self, obj, save_persistent_id) + +tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/mapping_func.py:72: UserWarning: You are trying to modify a model with PEFT for a second time. If you want to reload the model with a different config, make sure to call `.unload()` before. + warnings.warn( + +tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py:305: UserWarning: Already found a `peft_config` attribute in the model. This will lead to having multiple adapters in the model. Make sure to know what you are doing! + warnings.warn( + +tests/core/test_spipe_recipe_only.py::test_prompt_only_pipeline_freezes_without_a_model + /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: SystemPrompt, UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. + warnings.warn( + +tests/core/test_spipe_recipe_only.py::test_prompt_only_pipeline_freezes_without_a_model + /home/code/dev/steerability-vjp/steerability/algorithms/input_control/common/formatters/system_prompt.py:91: UserWarning: SystemPromptFormatter.apply_to_ids decodes → edits → re-tokenizes; prefer message-level entry (pass chat input to the pipeline so `apply_to_messages` runs). + warnings.warn( + +tests/evaluation/test_inspect_integration.py::TestMessagesPathIntegration::test_batched_eval_fires_adapt_messages_once_per_sample + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:954: PydanticDeprecatedSince20: `__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ + warnings.warn( + +tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: + + Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ + warnings.warn( + ~~~~~~~~~~~~~^ + f"Unclosed <{self.__class__.__name__} at {id(self):x}>", + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<2 lines>... + source=self, + ^^^^^^^^^^^^ + ) + ^ + ResourceWarning: Unclosed + + Enable tracemalloc to get traceback where the object was allocated. + See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. + warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + +tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings + /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: + + Traceback (most recent call last): + File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ + warnings.warn( + ~~~~~~~~~~~~~^ + f"Unclosed <{self.__class__.__name__} at {id(self):x}>", + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<2 lines>... + source=self, + ^^^^^^^^^^^^ + ) + ^ + ResourceWarning: Unclosed + + Enable tracemalloc to get traceback where the object was allocated. + See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. + warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + +tests/evaluation/test_runner.py::TestRunShapeAndResults::test_run_shape_and_results_frame +tests/evaluation/test_runner.py::TestRunShapeAndResults::test_one_provider_name_per_config_and_trial_seeds + /home/code/dev/steerability-vjp/steerability/evaluation/runner.py:203: UserWarning: seed is set but no temperature is configured in generate_defaults or any suite's generate_overrides; trial seeds are attached to sampling dispatches only, so the derived seeds will not be attached. Pass generate_defaults={'temperature': 0} for greedy decoding or an explicit sampling temperature. + warnings.warn( + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +3418 passed, 397 skipped, 173 warnings in 264.69s (0:04:24) diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log b/slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log new file mode 100644 index 00000000..8ef4bd10 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log @@ -0,0 +1,3 @@ +........................................................................ [ 77%] +..................... [100%] +93 passed in 25.22s diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_precommit.log b/slop/verification/2026-09-17_vjp-delta/rebase_precommit.log new file mode 100644 index 00000000..2d4ca0ae --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/rebase_precommit.log @@ -0,0 +1,30 @@ +# Rebased changed-diff pre-commit + +Command: + +```sh +/home/code/dev/steerability/.venv/bin/pre-commit run --files \ + slop/pr_drafts/2026-09-17_vjp_delta.md \ + slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log \ + slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log \ + slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log \ + slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log \ + slop/verification/2026-09-17_vjp-delta/run.md +``` + +The first run removed trailing whitespace from `rebase_full_pytest.log`; the second run produced: + +```text +Detect secrets...........................................................Passed +trim trailing whitespace.................................................Passed +fix end of files.........................................................Passed +check for added large files..............................................Passed +check yaml...........................................(no files to check)Skipped +check toml...........................................(no files to check)Skipped +check for merge conflicts................................................Passed +check for case conflicts................................................Passed +debug statements (python)............................(no files to check)Skipped +isort (python).......................................(no files to check)Skipped +``` + + diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log b/slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log new file mode 100644 index 00000000..6d95e5c4 --- /dev/null +++ b/slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log @@ -0,0 +1,2 @@ +.......... [100%] +10 passed in 4.39s diff --git a/slop/verification/2026-09-17_vjp-delta/run.md b/slop/verification/2026-09-17_vjp-delta/run.md index af2440bc..f37f0f27 100644 --- a/slop/verification/2026-09-17_vjp-delta/run.md +++ b/slop/verification/2026-09-17_vjp-delta/run.md @@ -1,6 +1,7 @@ # VJP-delta verification log -- base: f1d8b5fd6d9ed15d506f9445a93d55cb5c5b07df +- base: 92e3098086a1bb70db078343b459831dd12040e5 (`generative-computing/steerability` main; PR #31) +- original fork base: f1d8b5fd6d9ed15d506f9445a93d55cb5c5b07df - branch: feat/vjp-delta - assignment: exact parent `01a09cdb-9985-75d5-9f07-68b80024a10b` @@ -41,6 +42,18 @@ The first full-suite run completed with `3256 passed, 340 skipped, 166 warnings - VJP-delta regressions: `10 passed` in [release_artifact_vjp_tests.log](release_artifact_vjp_tests.log). Lifecycle-focused tests: `93 passed` in [review_fix_lifecycle_tests.log](review_fix_lifecycle_tests.log). The post-review full suite: `3258 passed, 340 skipped, 166 warnings in 283.24s` in [review_fix_full_pytest.log](review_fix_full_pytest.log). - Changed production/test files passed pre-commit in [review_fix_precommit_code.log](review_fix_precommit_code.log). The normalized review copy is included in the release-artifact pre-commit run. +## Rebase verification + +The five VJP commits were rebased from `f1d8b5f` onto `92e3098`; `git merge-base HEAD 92e3098` returned `92e3098`. The rebased implementation head before this evidence-only update was `89eaaaf`. + +| command | result | evidence | +| --- | --- | --- | +| `pytest tests/controls/test_vjp_delta.py -q` | 10 passed | [rebase_vjp_tests.log](rebase_vjp_tests.log) | +| `pytest tests/controls/test_vjp_delta.py tests/controls/test_sources.py tests/controls/test_activation_adapter.py tests/controls/test_spipe_freeze_state.py -q` | 93 passed | [rebase_lifecycle_tests.log](rebase_lifecycle_tests.log) | +| `pytest -q` | 3418 passed, 397 skipped, 173 warnings | [rebase_full_pytest.log](rebase_full_pytest.log) | +| `mkdocs build` | passed with existing warnings | [rebase_docs_build_nonstrict.log](rebase_docs_build_nonstrict.log) | +| `pre-commit run --files ` | passed | [rebase_precommit.log](rebase_precommit.log) | + ## Residual risks - The VJP path supports standard differentiable torch decoder execution. Inference mode and unsupported backward paths raise rather than changing method behavior. From 9ad0a465c656d94ed6bfd4e0b79498a97e665aee Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 19:57:42 +0800 Subject: [PATCH 07/10] Tighten VJP-delta fit and documentation Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- docs/concepts/controls.md | 2 +- .../algorithms/state_control/vjp_delta.md | 2 - examples/notebooks/algorithms/vjp_delta.ipynb | 68 ++-- slop/audits/job_1647.md | 69 ---- slop/audits/job_1648.md | 53 --- slop/pr_drafts/2026-09-17_vjp_delta.md | 38 -- .../2026-09-17_vjp_delta_cheap_review.md | 149 ------- .../2026-09-17_vjp_delta_quick_oracle.md | 27 -- .../2026-09-17_vjp-delta/docs_build.log | 129 ------ .../docs_build_nonstrict.log | 89 ----- .../2026-09-17_vjp-delta/focused_tests.log | 3 - .../2026-09-17_vjp-delta/full_pytest.log | 138 ------- .../full_pytest_final.log | 138 ------- .../2026-09-17_vjp-delta/gpu_check.log | 9 - .../2026-09-17_vjp-delta/gpu_smoke.py | 33 -- .../gpu_smoke_final_full.log | 4 - .../gpu_smoke_final_pqf.log | 6 - .../gpu_smoke_final_raw.log | 3 - .../gpu_smoke_final_status.json | 110 ----- .../2026-09-17_vjp-delta/gpu_smoke_full.log | 8 - .../2026-09-17_vjp-delta/gpu_smoke_pqf.log | 13 - .../2026-09-17_vjp-delta/gpu_smoke_raw.log | 7 - .../gpu_smoke_retry_full.log | 8 - .../gpu_smoke_retry_pqf.log | 13 - .../gpu_smoke_retry_raw.log | 7 - .../gpu_smoke_retry_status.json | 112 ------ .../gpu_smoke_status.json | 112 ------ .../notebook_execution.log | 114 ------ .../notebook_execution_retry.log | 3 - .../2026-09-17_vjp-delta/precommit_all.log | 378 ------------------ .../precommit_docstring.log | 10 - .../2026-09-17_vjp-delta/precommit_final.log | 10 - .../2026-09-17_vjp-delta/precommit_staged.log | 14 - .../precommit_staged_final.log | 10 - .../precommit_targeted.log | 10 - .../rebase_docs_build_nonstrict.log | 98 ----- .../rebase_full_pytest.log | 160 -------- .../rebase_lifecycle_tests.log | 3 - .../2026-09-17_vjp-delta/rebase_precommit.log | 30 -- .../2026-09-17_vjp-delta/rebase_vjp_tests.log | 2 - .../release_artifact_precommit.log | 29 -- .../release_artifact_vjp_tests.log | 2 - .../review_copy_hashes.log | 10 - .../review_fix_full_pytest.log | 138 ------- .../review_fix_lifecycle_tests.log | 3 - .../review_fix_precommit.log | 15 - .../review_fix_precommit_code.log | 10 - slop/verification/2026-09-17_vjp-delta/run.md | 63 --- .../2026-09-17_vjp-delta/test_vjp_delta.log | 2 - .../test_vjp_delta_docstring.log | 2 - .../test_vjp_delta_final.log | 2 - .../test_vjp_delta_initial.log | 58 --- .../state_control/vjp_delta/control.py | 5 +- .../algorithms/state_control/vjp_delta/fit.py | 17 +- 54 files changed, 45 insertions(+), 2503 deletions(-) delete mode 100644 slop/audits/job_1647.md delete mode 100644 slop/audits/job_1648.md delete mode 100644 slop/pr_drafts/2026-09-17_vjp_delta.md delete mode 100644 slop/reviews/2026-09-17_vjp_delta_cheap_review.md delete mode 100644 slop/reviews/2026-09-17_vjp_delta_quick_oracle.md delete mode 100644 slop/verification/2026-09-17_vjp-delta/docs_build.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/focused_tests.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/full_pytest.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/full_pytest_final.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_check.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke.py delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json delete mode 100644 slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json delete mode 100644 slop/verification/2026-09-17_vjp-delta/notebook_execution.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_all.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_docstring.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_final.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_staged.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/precommit_targeted.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_precommit.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/run.md delete mode 100644 slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log delete mode 100644 slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log diff --git a/docs/concepts/controls.md b/docs/concepts/controls.md index 17658615..d932c38d 100644 --- a/docs/concepts/controls.md +++ b/docs/concepts/controls.md @@ -154,7 +154,7 @@ patching. The toolkit implements: - *Backends*: HF with `attn_implementation` `"eager"` or `"sdpa"` (attention-map writes have no engine form). - `VJPDelta` ([API reference](../reference/algorithms/state_control/vjp_delta.md), [notebook](../examples/notebooks/algorithms/vjp_delta.ipynb)) - *Description*: fits a target-state contrast and uses vector-Jacobian products to derive one normalized additive direction per earlier residual layer. `VJPDeltaFit` uses raw prompts, excludes `skip_first` positions and each row's final real token from the VJP spans, and averages each class independently before subtraction. - - *Backends*: HF for fitting (a differentiable staged model is required); HF and vLLM-Hook for the resulting additive intervention. + - *Backends*: HF for fitting. The frozen form uses the existing `ActivationAdapter` additive intervention. Reusable building blocks shared across the residual-stream methods (estimators, gating, selectors, transforms, steering vectors, hook utilities) are located in diff --git a/docs/reference/algorithms/state_control/vjp_delta.md b/docs/reference/algorithms/state_control/vjp_delta.md index 7547077f..2e6554e7 100644 --- a/docs/reference/algorithms/state_control/vjp_delta.md +++ b/docs/reference/algorithms/state_control/vjp_delta.md @@ -18,5 +18,3 @@ - "!.*Args$" - "!^registry" - "!^STEERING_METHOD" - - diff --git a/examples/notebooks/algorithms/vjp_delta.ipynb b/examples/notebooks/algorithms/vjp_delta.ipynb index 4cf320d2..89409742 100644 --- a/examples/notebooks/algorithms/vjp_delta.ipynb +++ b/examples/notebooks/algorithms/vjp_delta.ipynb @@ -9,9 +9,7 @@ "\n", "`VJPDelta` fits an additive direction at each chosen source layer. It reads a contrast at a later target layer, then uses a vector-Jacobian product (VJP) to map that contrast back to each source layer. The fitted vectors use the usual state-control additive intervention during generation.\n", "\n", - "The method is motivated by [J-lens](https://github.com/anthropics/jacobian-lens). The VJP-delta method provenance is [wassname/vjp-steering at `cb03382`](https://github.com/wassname/vjp-steering/tree/cb03382ebd0cc9cad615d169f42e68e8ae3e12a7). This is a repo-native implementation from the documented mathematics and Steerability contracts. It does not copy or assert a license for that source repository.\n", - "\n", - "" + "VJP-delta follows [Clark, Michael J. (2026), _vjp-steering: contrastive steering vectors from vector-Jacobian products_](https://github.com/wassname/vjp-steering), adapting the [Jacobian lens](https://transformer-circuits.pub/2026/workspace/)." ] }, { @@ -21,22 +19,30 @@ "source": [ "## Setup\n", "\n", - "This CPU demonstration uses the repository's small random Llama fixture. The control is used through `SteeringPipeline`, the same public pipeline API used with a Hugging Face checkpoint." + "This CPU demonstration loads a small Hugging Face Llama checkpoint through the public pipeline API." ] }, { "cell_type": "code", "execution_count": 1, "id": "1c306fb6", - "metadata": { - "execution": { - "iopub.execute_input": "2026-09-17T10:19:34.756544Z", - "iopub.status.busy": "2026-09-17T10:19:34.756418Z", - "iopub.status.idle": "2026-09-17T10:19:41.986909Z", - "shell.execute_reply": "2026-09-17T10:19:41.986101Z" + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[transformers] Model config: pad_token_id must be `None` or an integer within the vocabulary (between 0 and 31999), got -1. This may result in unexpected behavior.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[transformers] The following generation flags are not valid and may be ignored: ['pad_token_id']. Set `TRANSFORMERS_VERBOSITY=info` for more details.\n" + ] } - }, - "outputs": [], + ], "source": [ "from pathlib import Path\n", "import tempfile\n", @@ -44,18 +50,20 @@ "from steerability.algorithms.core.steering_pipeline import SteeringPipeline\n", "from steerability.algorithms.state_control.vjp_delta import VJPDelta\n", "from steerability.spipe import SPipe\n", - "from tests.utils.tiny_models import tiny_llama, wordlevel_tokenizer\n", + "from transformers import AutoModelForCausalLM, AutoTokenizer\n", "\n", - "model = tiny_llama()\n", - "tokenizer = wordlevel_tokenizer()\n", + "model_name = \"hf-internal-testing/tiny-random-LlamaForCausalLM\"\n", + "tokenizer = AutoTokenizer.from_pretrained(model_name)\n", + "tokenizer.pad_token = tokenizer.eos_token\n", + "model = AutoModelForCausalLM.from_pretrained(model_name)\n", "fit_data = {\n", " \"positives\": [\"the cat sat\", \"the dog ran\"],\n", " \"negatives\": [\"dog ran fast\"],\n", "}\n", "control = VJPDelta(\n", " data=fit_data,\n", - " target_layer=2,\n", - " source_layer_ids=[0, 1],\n", + " target_layer=1,\n", + " source_layer_ids=[0],\n", " skip_first=0,\n", " strength=0.5,\n", ")\n", @@ -63,7 +71,7 @@ " model=model,\n", " tokenizer=tokenizer,\n", " controls=[control],\n", - " model_name_or_path=\"tiny-llama-demo\",\n", + " model_name_or_path=model_name,\n", ")" ] }, @@ -81,27 +89,20 @@ "cell_type": "code", "execution_count": 2, "id": "ca2ba708", - "metadata": { - "execution": { - "iopub.execute_input": "2026-09-17T10:19:41.988672Z", - "iopub.status.busy": "2026-09-17T10:19:41.988538Z", - "iopub.status.idle": "2026-09-17T10:19:42.085290Z", - "shell.execute_reply": "2026-09-17T10:19:42.084637Z" - } - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'layers': [0, 1], 'reply': \"'the'\"}\n" + "{'layers': [0], 'reply': \"'agreedָָ'\"}\n" ] } ], "source": [ "pipeline.steer()\n", "vector = control.export_state()[\"intervention_0/transform\"]\n", - "assert set(vector.directions) == {0, 1}\n", + "assert set(vector.directions) == {0}\n", "assert all(abs(direction.norm().item() - 1.0) < 1e-5 for direction in vector.directions.values())\n", "\n", "reply = pipeline.generate(text=\"the cat\", max_new_tokens=3, do_sample=False)\n", @@ -122,20 +123,13 @@ "cell_type": "code", "execution_count": 3, "id": "651ceb9c", - "metadata": { - "execution": { - "iopub.execute_input": "2026-09-17T10:19:42.086797Z", - "iopub.status.busy": "2026-09-17T10:19:42.086660Z", - "iopub.status.idle": "2026-09-17T10:19:43.355837Z", - "shell.execute_reply": "2026-09-17T10:19:43.355164Z" - } - }, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'bundle': '/tmp/tmp1jqfr_4f/vjp_delta_demo', 'reply_matches': True}\n" + "{'bundle': '/tmp/tmpx73lemsj/vjp_delta_demo', 'reply_matches': True}\n" ] } ], diff --git a/slop/audits/job_1647.md b/slop/audits/job_1647.md deleted file mode 100644 index fb018911..00000000 --- a/slop/audits/job_1647.md +++ /dev/null @@ -1,69 +0,0 @@ -# Audit: CUDA VJP-delta smoke job 1647 - -- target: queued CUDA extraction and additive-generation smoke test. -- provenance: job `1647`, default GPU queue, worktree `/home/code/dev/steerability-vjp`, command `env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py`, started `2026-09-17T18:23:42+08:00`, ended `2026-09-17T18:23:50+08:00`, exit `1`. The worktree was dirty during implementation, so this audit names the script and source lines rather than claiming a commit revision. -- complete evidence: [ANSI-stripped log](../verification/2026-09-17_vjp-delta/gpu_smoke_full.log), [raw log](../verification/2026-09-17_vjp-delta/gpu_smoke_raw.log), and [queue record](../verification/2026-09-17_vjp-delta/gpu_smoke_status.json). - -| stage | expected | observed | expected? | clues | missing metric | consequence | -| --- | --- | --- | --- | --- | --- | --- | -| CUDA backward | fit runs through CUDA | cuBLAS was initialized before the assertion | yes | `gpu_smoke_full.log:2-3` | fit completion marker | no evidence of backward failure | -| artifact persistence | source master saves detached CPU directions | test inspected bound transform directions instead | unclear | `fit.py:301-318`; `context.py:105-112` | direct source result device | assertion tests the wrong layer of the contract | -| additive generation | public `generate()` completes | not reached | no | `gpu_smoke_full.log:5-8` | reply | retry after correcting assertion | -| queue resolve condition | record CUDA result or diagnose failure | not met | no | job label in `gpu_smoke_status.json` | successful reply | rerun needed | - -## Evidence narrative - -The full seven-line cleaned log says: - -> `/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context...` -> `return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass` -> `Traceback (most recent call last):` -> `File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 19, in ` -> `assert all(vector.device.type == "cpu" for vector in control.export_state()["intervention_0/transform"].directions.values())` -> `AssertionError` - -The job's own test reached line 19 after `pipeline.steer()` (`gpu_smoke.py:17-19`). The source saves each fitted direction using `.detach().cpu()` (`fit.py:301-318`). The common transform context then resolves an artifact and calls `.to(device, dtype)` before binding it for generation (`context.py:105-112`). Thus the bound transform being on CUDA is expected. The log gives no evidence that fitting or CUDA backward failed, and it gives no generation output. - -## Hypotheses - -### H1 [bug | Highly Likely | 95%] - -- Mechanism: the smoke assertion confuses the CPU fit master with the model-device copy that `TransformContext` binds for inference. -- Evidence: `fit.py:307` contains `.detach().cpu()`, while `context.py:111` contains `return resolved.to(device, dtype)`; the failed assertion inspects `control.export_state()` after binding. -- Contrary evidence: no direct test yet inspects `VJPDeltaFit.resolve()` on CUDA. -- Discriminating test: resolve `VJPDeltaFit` directly and require CPU directions, then run `VJPDelta(...).steer()` and require its bound directions to match the CUDA model device. -- Fix/action: correct the smoke script and add that maintained regression. -- Interpretability: partial. The job establishes that CUDA backward was reached, but not the requested full pipeline smoke. - -### H2 [harness | Unlikely | 8%] - -- Mechanism: the queued environment used a different package than the worktree. -- Evidence: the queue command records `PYTHONPATH=/home/code/dev/steerability-vjp` in `gpu_smoke_status.json`, and the traceback points at the worktree smoke script. -- Contrary evidence: it does not print `steerability.__file__` or a source hash. -- Discriminating test: print `steerability.__file__` in the retry. -- Fix/action: add that provenance line to the smoke output. -- Interpretability: partial. The traceback makes this unlikely, but the exact imported module path was not logged. - -### H3 [bug | Remote | 3%] - -- Mechanism: CUDA backward succeeds but the subsequent additive generation fails. -- Evidence: generation was never run because the assertion exits first. -- Contrary evidence: the same tiny model completed CPU generation in the executed notebook and focused tests. -- Discriminating test: corrected queued smoke prints the reply after `pipeline.generate()`. -- Fix/action: rerun the queued smoke after H1's correction. -- Interpretability: no for CUDA generation until the retry. - -## Decision - -1. Resolve-condition verdict: **not met**. The label required a CUDA result or diagnosis; the job diagnosed an assertion error but did not complete generation. -2. Prediction check: the expected CPU master was supported by `fit.py:307`; the assertion's expectation for the bound inference artifact was contradicted by `context.py:111`. -3. Earliest unsupported link: post-bind CUDA generation. The retry needs a public-pipeline reply. -4. Validity: this is an **inconclusive harness failure**, not evidence against VJP-delta. `P(result is invalid as a CUDA method test) ≈ 0.95` because generation was not measured. -5. Highest-information clues: `gpu_smoke.py:19` names the failed assertion; `fit.py:307` names CPU master storage; `context.py:111` names the expected CUDA bind copy. -6. Missing evidence: successful CUDA reply, direct fit-master device, imported-module path. -7. Required change: correct the smoke assertion and add the maintained CPU-master/CUDA-bound regression. -8. No method conclusion changes: the job has no efficacy metric or completed generation. -9. What changes the verdict: a successful queued run that prints imported path, master device, bound device, and reply. -10. Sequence: update the assertion, run focused CPU regression, then queue one corrected CUDA smoke. Do not change extraction mathematics while this artifact-device distinction remains the leading explanation. - - diff --git a/slop/audits/job_1648.md b/slop/audits/job_1648.md deleted file mode 100644 index 4a0dd1be..00000000 --- a/slop/audits/job_1648.md +++ /dev/null @@ -1,53 +0,0 @@ -# Audit: CUDA VJP-delta retry job 1648 - -- target: distinguish a CPU fit master from a CUDA-bound artifact, then complete public generation. -- provenance: job `1648`, default GPU queue, worktree `/home/code/dev/steerability-vjp`, same logged command as [job 1647](job_1647.md), started `2026-09-17T18:26:00+08:00`, ended `2026-09-17T18:26:08+08:00`, exit `1`. -- complete evidence: [clean log](../verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log), [raw log](../verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log), and [queue record](../verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json). - -| stage | expected | observed | expected? | clues | missing metric | consequence | -| --- | --- | --- | --- | --- | --- | --- | -| CUDA extraction | CUDA VJP fit | cuBLAS backward warning then no extraction exception | unclear | `gpu_smoke_retry_full.log:2-3` | printed master device | later print error hides result | -| bind | model-device artifact | no assertion error before print | likely | script lines 22-25 ran | printed bound device | likely passed, not logged | -| generation | public reply | `reply = pipeline.generate(...)` ran before failing print | likely | `gpu_smoke.py:26-31` | reply text | no printed output | -| reporting | print result | missing private property | no | `AttributeError: 'VJPDelta' object has no attribute '_layer_ids'` | all requested fields | retry needed | - -The full log says: - -> `File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 31, in ` -> `"layers": control._layer_ids,` -> `AttributeError: 'VJPDelta' object has no attribute '_layer_ids'` - -`reply` is assigned immediately before this dictionary is built. This makes completed public generation likely, but the assertion is not directly observable in the job output. - -### H1 [harness | Almost Certain | 98%] - -- Mechanism: the smoke script used CAA's private `_layer_ids` property on `VJPDelta`, which has no such property. -- Evidence: the direct traceback above names the missing attribute. The script's source line is after both binding and `pipeline.generate()`. -- Contrary evidence: none in the complete seven-line log. -- Discriminating test: replace that field with `sorted(bound.directions)`; success prints master device, bound device, and reply. -- Fix/action: change only the smoke-report field and queue one final retry. -- Interpretability: partial. It gives no negative evidence about CUDA extraction or generation. - -### H2 [bug | Remote | 3%] - -- Mechanism: a CUDA method failure occurred before reporting but after reply assignment. -- Evidence: no method exception appears in the full log. -- Contrary evidence: execution reached the reporting dictionary after `pipeline.generate()`. -- Discriminating test: final retry prints an explicit reply. -- Fix/action: no production change before that retry. -- Interpretability: no for the final CUDA verdict. - -## Decision - -1. Resolve-condition verdict: **not met** because reporting failed. -2. Prediction check: the private-property hypothesis is supported by the exact `AttributeError`; no method prediction was tested. -3. Earliest unsupported link: printed confirmation of public CUDA generation. -4. Validity: **invalid as a smoke outcome**, `P ≈ 0.98`, because the harness failed after the generation call. -5. Highest-information clue: the traceback points at a reporting-only field, after the operation being checked. -6. Missing evidence: one complete result dictionary. -7. Required change: replace `_layer_ids` with keys of the bound artifact. -8. No method conclusion changes. -9. What changes the verdict: one successful queued log with the requested result dictionary. -10. Sequence: repair the report field, rerun one queued smoke, then stop GPU retries if it prints the expected fields. - - diff --git a/slop/pr_drafts/2026-09-17_vjp_delta.md b/slop/pr_drafts/2026-09-17_vjp_delta.md deleted file mode 100644 index 0b899ec6..00000000 --- a/slop/pr_drafts/2026-09-17_vjp_delta.md +++ /dev/null @@ -1,38 +0,0 @@ -# Draft PR: Add VJP-delta state control - -## Title - -Add VJP-delta activation steering - -## Body - -### Summary - -- add `VJPDeltaFit`, a MODULE-access fit source that derives normalized source-layer additive directions with vector-Jacobian products -- add the registered `VJPDelta` control and freeze it to the existing `ActivationAdapter` additive form -- add regression coverage for unequal classes, explicit tiny-Jacobian contraction with cross-token dependence, state restoration, serialization, batching, device binding, and source cleanup -- add reference, navigation, controls catalog, and an executed CPU notebook - -### Method and provenance - -The fit forms its target contrast from the final unpadded token, applies it at valid target positions, averages source-position gradients per prompt, averages classes independently, subtracts the class means, and normalizes each source layer. Valid positions exclude `skip_first` and the final real token. - -The method is motivated by Anthropic's J-lens work. VJP-delta implementation provenance is `wassname/vjp-steering@cb03382ebd0cc9cad615d169f42e68e8ae3e12a7`. This contribution is independently implemented from the documented mathematics and destination contracts. It does not copy or assert a license for the provenance repository. - -### Verification - -The branch was rebased onto `generative-computing/steerability` main `92e3098086a1bb70db078343b459831dd12040e5` (merged PR #31), not PR #32. - -- lifecycle-focused controls: `93 passed` -- VJP-delta regressions: `10 passed` -- full suite: `3418 passed, 397 skipped, 173 warnings` in `slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log` -- changed rebase diff: pre-commit passes (`slop/verification/2026-09-17_vjp-delta/rebase_precommit.log`) -- notebook: executed with stored outputs -- docs: non-strict MkDocs build passes with existing warnings; strict mode remains blocked by warnings outside this change -- CUDA queue smoke `1649`: master vectors were CPU, bound vectors CUDA, and public generation returned `'the'` - -### Editorial review requested - -Please review the source-license wording before publication. The source repository did not provide relicensing permission. The copied code reviews are in `slop/reviews/`. - - diff --git a/slop/reviews/2026-09-17_vjp_delta_cheap_review.md b/slop/reviews/2026-09-17_vjp_delta_cheap_review.md deleted file mode 100644 index 0baea29a..00000000 --- a/slop/reviews/2026-09-17_vjp_delta_cheap_review.md +++ /dev/null @@ -1,149 +0,0 @@ -# VJP-delta PR review (read-only) - -Review scope: diff `f1d8b5fd6d9ed15d506f9445a93d55cb5c5b07df...HEAD@76a5ee2a710f3720b68793d5376c9ac9db1dae83` in -`/home/code/dev/steerability-vjp`. I read every changed production/test/docs/notebook file in full, the surrounding -framework contracts (sources.py, transforms/additive.py, common/specs.py, base.py, spipe freeze/codec, model_layout, -TokenScope/CollectStateEntries paths, tests/utils/tiny_models), AGENTS.md (Developer guide, Testing, DoD, Invariants), -CONTRIBUTING.md, the PR #12/#19/#32 metadata, and the slop/audits + verification logs. I re-ran the focused suites and -several bounded checks against the venv at `/home/code/dev/steerability/.venv`. - -Independent checks run (all read-only / no file edits): - -- `pytest tests/controls/test_vjp_delta.py -q` → `9 passed in 5.13s`. -- `pytest tests/controls/test_sources.py tests/controls/test_activation_adapter.py tests/controls/test_spipe_freeze_state.py -q` → `83 passed in 23.61s`. -- Full-suite final log tail: `3257 passed, 340 skipped, 166 warnings in 254.56s` (full_pytest_final.log) — consistent with the claimed evidence; I did not rerun the full suite. -- `pre-commit run --files ` → all hooks passed. -- Pipeline-level interactive check: `check()` plan reports `PlannedStep(control='VJPDelta', access=MODULE, venue='live')`, `steer_fits() == (('VJPDeltaFit', 'direction'),)`, `fit_identity` digests the `VJPDeltaFit` dataclass (encodable, init-fields only via codec's `$dc` path), double `steer()` memo-hits and rebinds, bound directions are `[1, H]` unit-norm on the model device. -- CUDA smoke claim: `gpu_smoke_final_status.json` + `run.md` record job 1649 result `{'module': ..., 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]}` — consistent with `fit.py` storing `.detach().cpu()` masters and `TransformContext.resolve` casting the clone (context.py `resolved.to(device, dtype)`). -- Notebook outputs match execution logs (`{'layers': [0, 1], 'reply': "'the'"}`; `{'bundle': ..., 'reply_matches': True}`); `execution_count` 1..3 across cells. - -## 1. Findings - -### P0 — none - -### P1 — none - -No functional blocker in the method math, hook lifetime, state restoration, or freeze path. The intended math is -reproduced exactly (traced line by line against the task spec, and the explicit-Jacobian parity test is a genuine -independent contraction of the same formula — including the unequal-class (2 pos / 1 neg) weighting, the cross-token -dependence assertion (`jacobian[:, 0, 1].abs().sum() > 0`), and the exclusion of `skip_first`/final-token positions — -and it passes at `atol=1e-5` on a batch of 2, so batch/padding separation is also validated). - -### P2-1 — `VJPDeltaFit.resolve` memo branch is missing the `model is not None` guard - -- Location: `steerability/algorithms/state_control/vjp_delta/fit.py`, `resolve` (the memo-hit line). -- Mechanism: the guard is `if self._model_ref is not None and self._model_ref() is model and self._master is not None:`. - After the memoized model is garbage-collected, `self._model_ref()` returns `None`, so a subsequent `resolve(None, tokenizer)` - satisfies the identity test (None is None) and silently returns the stale cached master instead of raising. - `ContrastiveFit.resolve` in `common/sources.py` guards the same branch with `model is not None and ...`, and - `SinglePairFit.resolve` raises up front for `model=None`; `_fit` itself documents "requires a live model at steer time". -- Repro (run during review): `del model; gc.collect(); source.resolve(None, tokenizer)` → returned a vector - (layers [0]) instead of raising. -- User impact: the pipeline always passes a live model for MODULE-access sources (the steer plan venues it `live`), - so this only bites direct API misuse (reusing one fit instance against `model=None` after its model died, or a - hand-driven `InterventionControl.steer(None, ...)`). Estimated severity: low, but it silently returns a vector - fitted for a different, dead model — the silent-staleness aspect is the concern. -- Minimal fix: `if model is not None and self._model_ref is not None and self._model_ref() is model and ...` — one - line, matching the established source pattern. - -### P2-2 — `_class_gradients` wraps every RuntimeError as "backward failed ... must support gradients", including real failures - -- Location: `fit.py`, `_class_gradients` `except RuntimeError` block. -- Mechanism: any RuntimeError not containing the literal "VJP-delta" (e.g., CUDA OOM, dtype mismatch, a broken - attention implementation) is replaced by `RuntimeError("VJP-delta backward failed. The configured model must - support gradients through its decoder layers.")` (`from error` preserves the chain, so the original traceback is - reachable). OOM is a RuntimeError, so an out-of-memory fit is reported as an unsupported-model failure. -- User impact: diagnostics only; the misleading headline message on large-model fits. -- Minimal fix: re-raise OOM/shape errors verbatim and wrap only autograd-specific failures; or fold the original - message text into the wrapper. - -### P2-3 — 35 workflow-artifact files under `slop/` are added to the branch (base had none) - -- Files: `slop/audits/job_1647.md`, `job_1648.md`, `slop/pr_drafts/2026-09-17_vjp_delta.md`, - `slop/verification/2026-09-17_vjp-delta/*` (pre-commit/docs/full-suite/notebook/CUDA logs, `gpu_smoke.py`, queue - status JSON). `git ls-files f1d8b5f | grep ^slop/` → 0; `git ls-files HEAD | grep ^slop/` → 35. -- Mechanism: the diff adds them; the draft file itself ends "draft for editorial review, not publication." Logs embed - local machine paths and queue metadata. -- User impact: repository hygiene / merge decision, not a code defect. If the maintainers do not want - agent-workflow artifacts in the tree, these should be excluded/ignored before merge. -- Minimal fix: add `slop/` (or the specific audit/draft/verification subtrees) to `.gitignore` and drop the files - from the branch, or explicitly confirm they are intended to ship. - -### P2-4 — editorial: provenance/license wording and agent-signature comments (flagged by the PR draft itself) - -- `control.py` docstring and notebook cell state: "This is a repo-native implementation from the documented - mathematics and Steerability contracts. It does not copy or assert a license for that source repository." This is - honest attribution with a pinned commit (`cb03382ebd0cc9cad615d169f42e68e8ae3e12a7`), makes no relicensing claim, - and matches the "unlicensed provenance repo" fact. The phrase "assert a license" is slightly awkward; the PR body - already carries the clearer disclaimer. Not a blocker; the draft requested editorial review, which I echo. -- `` HTML comments appear in `docs/reference/algorithms/state_control/vjp_delta.md` and - `examples/notebooks/algorithms/vjp_delta.ipynb` — grep across the other reference pages (`caa.md`, `iti.md`, ...) - and other algorithm notebooks shows no other file carries them, so they are not an established repo convention; - strip before merge if agent signatures are unwanted. -- Cosmetic, non-blocking. - -### P3 notes (not findings) - -- fp16/bf16 fit precision: `grad_outputs = torch.zeros_like(target)` and `cotangent.to(dtype=target.dtype)` compute - the VJP in the model's reduced precision, upcasting only after the per-prompt average. Functional on CUDA (job - 1649 passed), but large fp16 models will get reduced-precision extraction. Consider an fp32 fit pass if direction - quality matters; not a defect. -- `cleanup()` drops `interventions` but the template's `VJPDeltaFit` source keeps the CPU master vectors (and the - weakref to the model remains). GPU copies are freed; the docstring "Drop fitted intervention tensors" is slightly - stronger than the effect. The weakref test passes (`ref() is None` after `del model; gc.collect()`). -- Gradient-checkpointed models re-fire the fit's forward hooks during `autograd.grad` recomputation; captured lists - grow with unused entries and `source_states` entries are overwritten after autograd.grad already consumed the - originals — benign, but untested. -- No test covers the (unlikely) failure "decoder layer returned a non-tensor" branch or the `requires_grad`-guard - runtime error path (only `inference_mode` is tested); the maintained suite lacks a regression asserting the - CPU-master/CUDA-bound device split that the CUDA smoke script checks ad hoc. - -## 2. Claims checked and found sound - -- **Math** matches the documented spec exactly: per-prompt final-token class means → contrast, cotangent placed at - all valid target positions, per-prompt mean over valid source positions, independent class averaging (2-vs-1-size - classes), positive-minus-negative, per-layer unit-norm normalization, `source < target` enforced. Parity with an - explicit Jacobian contraction is a genuine, non-tautological cross-check and passes. -- **Batch/padding**: right-padded rows, `lengths = mask.sum(1) - 1` final-token indexing, causal-mask row - independence, per-batch width invariance enforced by per-prompt averaging before aggregation — all sound; the - short-row guard (`lengths <= skip_first + 1`) raises before any hook registration. -- **State restoration**: `_fit` snapshots `training`, per-parameter `requires_grad`, and `.grad` (detach-clone, None - preserved) before mutation and restores in `finally`; hooks are removed in `finally` in both `_target_mean` and - `_class_gradients`; weights are never written. Verified by tests (success and error paths) and by inspection. -- **Weakref/cache lifecycle**: memoization keyed on model identity with a defensive clone per resolve; test - confirms the model can be collected after steer. (Except the P2-1 None-model gap.) -- **Fit identity / staleness / freeze**: `fit_identity()` digests the `VJPDeltaFit` dataclass (init fields only — - `_model_ref`/`_master` are `init=False`, so codec excludes them); data edits flip the digest (SpipeStaleError) - while application-only `strength` edits do not; frozen reload lands on `ActivationAdapter` with `steer_fits() == ()` - and the monkeypatched-`resolve` test proves no VJP runs on reload. -- **Docs/notebook**: nav entry, controls.md catalog entry with honest Backends line (HF fit; HF + vLLM-Hook additive - wire form — the broadcast transform's `wire_kind="additive"` and `requirements()` conform to CAA's precedent), - reference page follows caa.md's mkdocstrings block, `examples/index.md` updated, notebook executed with stored - outputs. -- **Repo conventions**: three-file layout + `STEERING_METHOD` registry shape, `BaseArgs` promotion to control - attributes, no new dependency, docstrings end with the reference block, `text_config`/`resolve_model_layout` used - instead of raw `model.config`, pre-commit clean on changed files. - -## 3. Gaps I could not verify - -- No network access to `wassname/vjp-steering@cb03382`; the contract review is against the documented intended math - (which the implementation satisfies), not against the upstream implementation itself. -- No steering-efficacy metric: the only behavior evidence is public generation returning `'the'` on tiny models - (notebook, CUDA smoke, tests). -- I did not rerun the full 3257-test suite (relied on `full_pytest_final.log`); the pre-existing strict-docs-blocking - warnings and the `rad.ipynb`/`instruction_following.ipynb` high-entropy pre-commit failures are unrelated to this - PR (verified the failing files are not in the diff). -- The vLLM-Hook wire path was not executed (no engine in this worktree); only the declarative wire-form contract - was checked. -- Large-model CUDA memory behavior during the fit (full-graph retention from embedding to `num_layers-3` with - batch_size=8 / max_length=384 defaults) is untested outside tiny fixtures. -- `docs/human_journal.md` is an untracked supervisor session artifact in the worktree (contains session metadata); - it is not part of the diff but should likely be gitignored. - -## 4. Verdict - -**Ready after listed fixes** — all listed fixes are P2 (one-line guard in `resolve`, error-wrap selectivity, -`slop/` exclusion decision, optional comment/license wording cleanup); none block the method's function, and the -mathematics, lifecycle restoration, freeze/reload behavior, and framework integration are correct as implemented. - -PI[deepseek-v4-flash] diff --git a/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md b/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md deleted file mode 100644 index 8e9ff0c1..00000000 --- a/slop/reviews/2026-09-17_vjp_delta_quick_oracle.md +++ /dev/null @@ -1,27 +0,0 @@ -**Observations (evidence-based):** - -1. **Fit correctness is strongly pinned.** `tests/controls/test_vjp_delta.py::test_tiny_jacobian_matches_production_for_unequal_classes_and_cross_token_dependence` compares production extraction against a hand-written explicit Jacobian (via `torch.autograd.functional.jacobian`) for unequal class sizes, and separately asserts cross-token dependence exists in the Jacobian. This directly validates the two most subtle aspects of the method: per-prompt averaging of valid source-token gradients before independent per-class means, and the size-independent class pooling. - -2. **State restoration is explicit and tested.** `fit.py::VJPDeltaFit._fit` snapshots `model.training`, per-parameter `requires_grad`, and parameter `.grad` tensors under `_fit`, restores them in a `finally`, and both a success-path test (`test_fit_restores_mode_flags_and_existing_parameter_grads_after_success`) and an error-path test (`..._after_error`) assert exact equality of flags, grads, and weights. The weak model reference and `control.cleanup()` contract are also tested. - -3. **Architectural fidelity is high.** `VJPDelta` subclasses `InterventionControl`, declares a single `Intervention` with `CoveredLayers()`, `AdditiveTransform`, and `TokenScope`, and delegates generation to the shared additive machinery — no custom hook code, no per-generation state. Fit is a proper `ArtifactSource` (`resolve` returns a defensive clone, memoized per model via weakref), matching `ContrastiveFit`/`SinglePairFit` conventions. The frozen form is `ActivationAdapter`, consistent with the repo's architecture, and the precomputed-vector path is cleanly supported. Notably, `VJPDeltaFit` declares `access = ModelAccess.MODULE` and `artifact_class = "direction"`, consistent with the fit requiring a live model (the backward pass requires module-level execution). - -4. **Docstrings/docs/notebook/deps/registry surfaces are all present** (`.nav.yml` entry, `controls.md` mention, reference page, notebook, `STEERING_METHOD` export, `pyproject`/`optional.py` checks not flagged as missing). The full suite passed (`3257 passed, 340 skipped` per the verification log). The staged pre-commit failure is attributed to an unchanged old notebook's entropy, not this change. - -**Highest-value risks/omissions:** - -1. **`requires_grad(True)` on all parameters without an explicit no-grad guard on the model's non-participating forward path.** Under `torch.enable_grad()` with all parameters marked `requires_grad_(True)`, the forward computes a full autograd graph for the whole model (not just the target layer), which is memory/CPU expensive but logically necessary — the gradients flow back through earlier layers. This is behaviorally correct (the VJP indeed spans the target-to-source path through the full stack), but it is worth confirming that no silent device-mismatch or dtype asymmetry arises if `cotangent` is on a different device than `target` — the `to(dtype=..., device=...)` call inside `_class_gradients` handles this, so this is a low-severity risk. The bigger risk is **the hidden failure mode around position-dependent cotangent application**: `grad_outputs[valid] = cotangent` uses a broadcast assignment. If `valid` has fewer True positions than `cotangent`'s size (which cannot per-row since the same cotangent is used per-position, but `grad_outputs[valid] = cotangent` expects a matching-length tensor on the right) — actually `cotangent` is `[H]` and `valid` is `[B, T]`, so the assignment broadcasts correctly per-position across all valid tokens. The symmetry with `_target_mean` **final unpadded token vs the cotangent applied at *all* valid target positions** is a semantic discrepancy: the target mean is at the final unpadded token, but the cotangent is applied at *every* valid position. This is the paper's documented contraction (the VJP pulls source gradients from all valid target positions against the final-token contrast), but a reviewer should flag that the `_target_mean` capture uses `model(..., attention_mask=attention_mask)` with `torch.no_grad()` while `_class_gradients` uses the same shape forward under grad — this asymmetry is fine but is the subtle part worth one sentence of documentation. - -2. **Source-layer gradients at positions with padding tokens.** `per_prompt = (gradient.float() * valid.unsqueeze(-1))...` divides by `valid.sum(dim=1)` per row. If a row's valid count is zero, division by zero produces NaN — the `_valid_token_mask` guard ensures `lengths > skip_first + 1`, so every row has at least one valid position, so this is impossible in practice. But the guard lives inside `_valid_token_mask` and would only raise after the forward already ran, not before. - -3. **Device/dtype edge in `_target_mean` and `_class_gradients` cache/device copies.** Gradients captured are `.float()`ed and summed in Python accumulation dictionaries (`totals` keyed on layer id), which is fine, but the per-prompt averaging uses `gradient.float() * valid.unsqueeze(-1)` — if the model is running in `bfloat16` or `float16` on CPU, `.float()` upcasts, which is intentional but could be a silent perf concern at large scale. Not correctness. - -**Scientific correctness:** The method contract is faithfully implemented. The target contrast (positive-minus-negative mean at the final unpadded target-layer token), cotangent application at valid positions, source gradients averaged per-prompt over valid positions then per-class independently, subtraction, and per-layer L2 normalization all match the documented mathematics and destination contract. The explicit Jacobian cross-check is strong supporting evidence. - -**Merge readiness:** Small upstream PR, yes — recommend merge. The implementation is architecturally faithful (standard `InterventionControl`/`AdditiveTransform`/`ArtifactSource` composition), scientifically pinned by the explicit-Jacobian test, state-restoration tests pass, full suite is green, docs/notebook/nav/controls.md are all present, and staled-freeze behavior is covered. The unlicensed upstream provenance is honestly attributed with no relicensing claim, which is the correct posture. The highest-value actionable items are (in order): (a) document in `VJPDeltaFit.fit`'s docstring that the cotangent is applied at *all* valid target positions while the target mean is at the final unpadded token — this asymmetry is the one thing a human reviewer is most likely to misread; (b) consider a one-line note that `requires_grad_(True)` on all parameters is intentional (the VJP needs gradients through the full stack) but that the fit already restores flags; (c) confirm the `_Precomputed`/`SteeringVector` clone path means a caller-owned precomputed `steering_vector` is never mutated — the code path does clone, so this is verified, not a risk. - -**Hidden failure mode considered and evidence against it:** The most plausible hidden failure is a silent device mismatch between the cotangent and the target hidden states during the backward — but the `to(dtype=..., device=...)` inside `_class_gradients` explicitly moves the cotangent to the target's dtype/device, so this is safe. Another candidate is a model whose forward is wrapped in `torch.no_grad()` at the module level (e.g., a fused inference-only path) — the fit explicitly raises with a clear message ("VJP-delta backward failed... must support gradients"), so a gracefully-degrading, honest error instead of a silent wrong direction. This is the right behavior. - -**Recommendation: merge as a small upstream PR.** Fix the one docstring asymmetry (risk 3a) as a nice-to-have; everything else meets the Definition of Done and the invariants. - -PI[deepseek-v4-flash] diff --git a/slop/verification/2026-09-17_vjp-delta/docs_build.log b/slop/verification/2026-09-17_vjp-delta/docs_build.log deleted file mode 100644 index e4489fed..00000000 --- a/slop/verification/2026-09-17_vjp-delta/docs_build.log +++ /dev/null @@ -1,129 +0,0 @@ - - │ ⚠ Warning from the Material for MkDocs team - │ - │ MkDocs 2.0, the underlying framework of Material for MkDocs, - │ will introduce backward-incompatible changes, including: - │ - │ × All plugins will stop working – the plugin system has been removed - │ × All theme overrides will break – the theming system has been rewritten - │ × No migration path exists – existing projects cannot be upgraded - │ × Closed contribution model – community members can't report bugs - │ × Currently unlicensed – unsuitable for production use - │ - │ Our full analysis: - │ - │ https://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/ - -INFO - Loading data from bib files: ['/home/code/dev/steerability-vjp/docs/assets/references.bib'] -INFO - Cleaning site directory -INFO - Building documentation to directory: /home/code/dev/steerability-vjp/site -INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: - - _hooks/bibtex_warnings.py - - examples/notebooks/recipes/vllm_serve.ipynb - - examples/notebooks/recipes/routed_decoding/data.py - - examples/notebooks/studies/commonsense_mcqa/task.py - - examples/notebooks/studies/instruction_following/task.py -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/_hooks/bibtex_warnings.py -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/_hooks/bibtex_warnings.py -WARNING - Doc file 'concepts/controls.md' contains a link '../examples/notebooks/algorithms/user_prefix.ipynb', but the target 'examples/notebooks/algorithms/user_prefix.ipynb' is not found among documentation files. -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/act_add.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/act_add.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/angular_steering.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/angular_steering.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/best_of_n.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/best_of_n.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/budget_forcing.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/budget_forcing.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/caa.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/caa.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cast.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cast.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/contrastive_decoding.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/contrastive_decoding.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cpo.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cpo.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/deal.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/deal.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/dexperts.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/dexperts.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/directional_ablation.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/directional_ablation.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/gepa.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/gepa.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/iti.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/iti.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/pasta.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/pasta.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/prewrite.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/prewrite.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/rad.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/rad.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/sasa.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/sasa.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/system_prompt.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/system_prompt.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/vjp_delta.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/vjp_delta.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/activation_adapter.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/activation_adapter.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/contrastive_guidance.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/contrastive_guidance.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/phased_decoding.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/phased_decoding.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/search_decoding.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/search_decoding.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/stopping_rules.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/stopping_rules.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/value_guidance.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/value_guidance.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/mergekit.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/mergekit.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/trl.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/trl.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/honest_persona_prompting.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/honest_persona_prompting.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/vllm_serve.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/vllm_serve.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/working_with_spipes.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/working_with_spipes.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/data.py -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/data.py -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/routed_decoding.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/routed_decoding.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/routing_vs_prompting.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/routing_vs_prompting.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/commonsense_mcqa.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/commonsense_mcqa.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/task.py -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/task.py -WARNING - Inline reference to unknown key instruction_following -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/instruction_following.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/instruction_following.ipynb -WARNING - Inline reference to unknown key scorer -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/task.py -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/task.py -INFO - mkdocstrings_handlers: Formatting signatures requires either Black or Ruff to be installed. -WARNING - griffe: steerability/algorithms/core/internals/probes/fitting.py:583: No type or annotation for parameter 'session' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: No type or annotation for parameter 'text' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: Parameter 'text' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: No type or annotation for parameter 'mode' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: Parameter 'mode' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: No type or annotation for parameter 'separator' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: Parameter 'separator' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: No type or annotation for parameter 'text' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: Parameter 'text' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: No type or annotation for parameter 'separator' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: Parameter 'separator' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: No type or annotation for parameter 'placement' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: Parameter 'placement' does not appear in the function signature -WARNING - griffe: steerability/algorithms/output_control/common/granite_heads.py:57: No type or annotation for parameter '**from_pretrained_kwargs' -WARNING - griffe: steerability/algorithms/output_control/rad/utils/reward_training.py:106: No type or annotation for parameter 'model' -WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:267: No type or annotation for parameter 'substrings' -WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:155: No type or annotation for parameter 'session' -WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:273: No type or annotation for parameter 'model' -WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:274: No type or annotation for parameter 'tokenizer' -WARNING - Inline reference to unknown key instruction_following - -Aborted with 23 warnings in strict mode! diff --git a/slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log b/slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log deleted file mode 100644 index 4abfed48..00000000 --- a/slop/verification/2026-09-17_vjp-delta/docs_build_nonstrict.log +++ /dev/null @@ -1,89 +0,0 @@ - - │ ⚠ Warning from the Material for MkDocs team - │ - │ MkDocs 2.0, the underlying framework of Material for MkDocs, - │ will introduce backward-incompatible changes, including: - │ - │ × All plugins will stop working – the plugin system has been removed - │ × All theme overrides will break – the theming system has been rewritten - │ × No migration path exists – existing projects cannot be upgraded - │ × Closed contribution model – community members can't report bugs - │ × Currently unlicensed – unsuitable for production use - │ - │ Our full analysis: - │ - │ https://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/ - -INFO - Loading data from bib files: ['/home/code/dev/steerability-vjp/docs/assets/references.bib'] -INFO - Cleaning site directory -INFO - Building documentation to directory: /home/code/dev/steerability-vjp/site -INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: - - _hooks/bibtex_warnings.py - - examples/notebooks/recipes/vllm_serve.ipynb - - examples/notebooks/recipes/routed_decoding/data.py - - examples/notebooks/studies/commonsense_mcqa/task.py - - examples/notebooks/studies/instruction_following/task.py -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/_hooks/bibtex_warnings.py -WARNING - Doc file 'concepts/controls.md' contains a link '../examples/notebooks/algorithms/user_prefix.ipynb', but the target 'examples/notebooks/algorithms/user_prefix.ipynb' is not found among documentation files. -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/act_add.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/angular_steering.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/best_of_n.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/budget_forcing.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/caa.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cast.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/contrastive_decoding.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cpo.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/deal.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/dexperts.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/directional_ablation.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/gepa.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/iti.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/pasta.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/prewrite.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/rad.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/sasa.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/system_prompt.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/vjp_delta.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/activation_adapter.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/contrastive_guidance.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/phased_decoding.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/search_decoding.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/stopping_rules.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/value_guidance.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/mergekit.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/trl.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/honest_persona_prompting.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/vllm_serve.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/working_with_spipes.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/data.py -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/routed_decoding.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/routing_vs_prompting.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/commonsense_mcqa.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/task.py -WARNING - Inline reference to unknown key instruction_following -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/instruction_following.ipynb -WARNING - Inline reference to unknown key scorer -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/task.py -INFO - mkdocstrings_handlers: Formatting signatures requires either Black or Ruff to be installed. -WARNING - griffe: steerability/algorithms/core/internals/probes/fitting.py:583: No type or annotation for parameter 'session' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: No type or annotation for parameter 'text' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: Parameter 'text' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: No type or annotation for parameter 'mode' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: Parameter 'mode' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: No type or annotation for parameter 'separator' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: Parameter 'separator' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: No type or annotation for parameter 'text' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: Parameter 'text' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: No type or annotation for parameter 'separator' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: Parameter 'separator' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: No type or annotation for parameter 'placement' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: Parameter 'placement' does not appear in the function signature -WARNING - griffe: steerability/algorithms/output_control/common/granite_heads.py:57: No type or annotation for parameter '**from_pretrained_kwargs' -WARNING - griffe: steerability/algorithms/output_control/rad/utils/reward_training.py:106: No type or annotation for parameter 'model' -WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:267: No type or annotation for parameter 'substrings' -WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:155: No type or annotation for parameter 'session' -WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:273: No type or annotation for parameter 'model' -WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:274: No type or annotation for parameter 'tokenizer' -WARNING - Inline reference to unknown key instruction_following -INFO - Documentation built in 30.46 seconds diff --git a/slop/verification/2026-09-17_vjp-delta/focused_tests.log b/slop/verification/2026-09-17_vjp-delta/focused_tests.log deleted file mode 100644 index df6eba8d..00000000 --- a/slop/verification/2026-09-17_vjp-delta/focused_tests.log +++ /dev/null @@ -1,3 +0,0 @@ -........................................................................ [ 79%] -................... [100%] -91 passed in 25.28s diff --git a/slop/verification/2026-09-17_vjp-delta/full_pytest.log b/slop/verification/2026-09-17_vjp-delta/full_pytest.log deleted file mode 100644 index 7e980041..00000000 --- a/slop/verification/2026-09-17_vjp-delta/full_pytest.log +++ /dev/null @@ -1,138 +0,0 @@ -.....................ssss..s....ss..s..s..s............................. [ 2%] -...ssssssssssssssss........ssss..s..s................................... [ 4%] -.............ssssssssssssssssssssssss........ssss..s..s..s..s..s..s..s.. [ 6%] -s..s..s..s..s................................................sssssssssss [ 8%] -sssssssssssss..s..s..s..s.............s..s...s...........s..s..s...s..s. [ 10%] -.......ssss..s....ss..s..s..s................................sssssssssss [ 12%] -sssss........ssss..s..s................................................s [ 14%] -sssssssssssssssssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s. [ 16%] -...............................................ssssssssssssssssssssssss. [ 18%] -.s..s..s..s...........ssssss...ss........ssssss..ss..s..s........ssss..s [ 20%] -....ss..s..s..s................................ssssssssssssssss........s [ 22%] -sss..s..s................................................sssssssssssssss [ 24%] -sssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s............... [ 26%] -.................................ssssssssssssssssssssssss..s..s..s..s... [ 28%] -..........s..s...s...........s..s..s...s..s............................. [ 30%] -........................................................................ [ 32%] -........................................................................ [ 34%] -........................................................................ [ 36%] -........................................................................ [ 38%] -........................................................................ [ 40%] -..............................................s......................... [ 42%] -........................................................................ [ 44%] -........................................................................ [ 46%] -........................................................................ [ 48%] -........................................................................ [ 50%] -........................................................................ [ 52%] -........................................................................ [ 54%] -........................................................................ [ 56%] -........................................................................ [ 58%] -........................................................................ [ 60%] -........................................................................ [ 62%] -........................................................................ [ 64%] -........................................................................ [ 66%] -........................................................................ [ 68%] -........................................................................ [ 70%] -........................................................................ [ 72%] -...............................................................s........ [ 74%] -........................................................................ [ 76%] -........................................................................ [ 78%] -........................................................................ [ 80%] -........................................................................ [ 82%] -.............................................s.......................... [ 84%] -........................................................................ [ 86%] -........................................................................ [ 88%] -........................................................................ [ 90%] -........................................................................ [ 92%] -........................................................................ [ 94%] -........................................................................ [ 96%] -........................................................................ [ 98%] -................................................................. [100%] -=============================== warnings summary =============================== -tests/controls/test_few_shot.py: 144 warnings - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: FewShot override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cuda] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cuda] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cuda] - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/sklearn/decomposition/_pca.py:646: RuntimeWarning: invalid value encountered in divide - explained_variance_ratio_ = explained_variance_ / total_var - -tests/controls/test_lora_composition.py::test_lora_then_caa_steers_and_hooks_adapted_layer - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/utils/save_and_load.py:438: UserWarning: Could not find a config file in - will assume that the vocabulary was not modified. - warnings.warn( - -tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/mapping_func.py:72: UserWarning: You are trying to modify a model with PEFT for a second time. If you want to reload the model with a different config, make sure to call `.unload()` before. - warnings.warn( - -tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py:305: UserWarning: Already found a `peft_config` attribute in the model. This will lead to having multiple adapters in the model. Make sure to know what you are doing! - warnings.warn( - -tests/evaluation/test_inspect_integration.py::TestMessagesPathIntegration::test_batched_eval_fires_adapt_messages_once_per_sample - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:954: PydanticDeprecatedSince20: `__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ - warnings.warn( - -tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: - - Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ - warnings.warn( - ~~~~~~~~~~~~~^ - f"Unclosed <{self.__class__.__name__} at {id(self):x}>", - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ...<2 lines>... - source=self, - ^^^^^^^^^^^^ - ) - ^ - ResourceWarning: Unclosed - - Enable tracemalloc to get traceback where the object was allocated. - See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. - warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) - -tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: - - Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ - warnings.warn( - ~~~~~~~~~~~~~^ - f"Unclosed <{self.__class__.__name__} at {id(self):x}>", - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ...<2 lines>... - source=self, - ^^^^^^^^^^^^ - ) - ^ - ResourceWarning: Unclosed - - Enable tracemalloc to get traceback where the object was allocated. - See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. - warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) - -tests/evaluation/test_runner.py::TestRunShapeAndResults::test_run_shape_and_results_frame -tests/evaluation/test_runner.py::TestRunShapeAndResults::test_one_provider_name_per_config_and_trial_seeds - /home/code/dev/steerability-vjp/steerability/evaluation/runner.py:203: UserWarning: seed is set but no temperature is configured in generate_defaults or any suite's generate_overrides; trial seeds are attached to sampling dispatches only, so the derived seeds will not be attached. Pass generate_defaults={'temperature': 0} for greedy decoding or an explicit sampling temperature. - warnings.warn( - --- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -3256 passed, 340 skipped, 166 warnings in 262.72s (0:04:22) diff --git a/slop/verification/2026-09-17_vjp-delta/full_pytest_final.log b/slop/verification/2026-09-17_vjp-delta/full_pytest_final.log deleted file mode 100644 index c54714f8..00000000 --- a/slop/verification/2026-09-17_vjp-delta/full_pytest_final.log +++ /dev/null @@ -1,138 +0,0 @@ -.....................ssss..s....ss..s..s..s............................. [ 2%] -...ssssssssssssssss........ssss..s..s................................... [ 4%] -.............ssssssssssssssssssssssss........ssss..s..s..s..s..s..s..s.. [ 6%] -s..s..s..s..s................................................sssssssssss [ 8%] -sssssssssssss..s..s..s..s.............s..s...s...........s..s..s...s..s. [ 10%] -.......ssss..s....ss..s..s..s................................sssssssssss [ 12%] -sssss........ssss..s..s................................................s [ 14%] -sssssssssssssssssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s. [ 16%] -...............................................ssssssssssssssssssssssss. [ 18%] -.s..s..s..s...........ssssss...ss........ssssss..ss..s..s........ssss..s [ 20%] -....ss..s..s..s................................ssssssssssssssss........s [ 22%] -sss..s..s................................................sssssssssssssss [ 24%] -sssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s............... [ 26%] -.................................ssssssssssssssssssssssss..s..s..s..s... [ 28%] -..........s..s...s...........s..s..s...s..s............................. [ 30%] -........................................................................ [ 32%] -........................................................................ [ 34%] -........................................................................ [ 36%] -........................................................................ [ 38%] -........................................................................ [ 40%] -..............................................s......................... [ 42%] -........................................................................ [ 44%] -........................................................................ [ 46%] -........................................................................ [ 48%] -........................................................................ [ 50%] -........................................................................ [ 52%] -........................................................................ [ 54%] -........................................................................ [ 56%] -........................................................................ [ 58%] -........................................................................ [ 60%] -........................................................................ [ 62%] -........................................................................ [ 64%] -........................................................................ [ 66%] -........................................................................ [ 68%] -........................................................................ [ 70%] -........................................................................ [ 72%] -................................................................s....... [ 74%] -........................................................................ [ 76%] -........................................................................ [ 78%] -........................................................................ [ 80%] -........................................................................ [ 82%] -..............................................s......................... [ 84%] -........................................................................ [ 86%] -........................................................................ [ 88%] -........................................................................ [ 90%] -........................................................................ [ 92%] -........................................................................ [ 94%] -........................................................................ [ 96%] -........................................................................ [ 98%] -.................................................................. [100%] -=============================== warnings summary =============================== -tests/controls/test_few_shot.py: 144 warnings - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: FewShot override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cuda] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cuda] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cuda] - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/sklearn/decomposition/_pca.py:646: RuntimeWarning: invalid value encountered in divide - explained_variance_ratio_ = explained_variance_ / total_var - -tests/controls/test_lora_composition.py::test_lora_then_caa_steers_and_hooks_adapted_layer - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/utils/save_and_load.py:438: UserWarning: Could not find a config file in - will assume that the vocabulary was not modified. - warnings.warn( - -tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/mapping_func.py:72: UserWarning: You are trying to modify a model with PEFT for a second time. If you want to reload the model with a different config, make sure to call `.unload()` before. - warnings.warn( - -tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py:305: UserWarning: Already found a `peft_config` attribute in the model. This will lead to having multiple adapters in the model. Make sure to know what you are doing! - warnings.warn( - -tests/evaluation/test_inspect_integration.py::TestMessagesPathIntegration::test_batched_eval_fires_adapt_messages_once_per_sample - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:954: PydanticDeprecatedSince20: `__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ - warnings.warn( - -tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: - - Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ - warnings.warn( - ~~~~~~~~~~~~~^ - f"Unclosed <{self.__class__.__name__} at {id(self):x}>", - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ...<2 lines>... - source=self, - ^^^^^^^^^^^^ - ) - ^ - ResourceWarning: Unclosed - - Enable tracemalloc to get traceback where the object was allocated. - See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. - warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) - -tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: - - Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ - warnings.warn( - ~~~~~~~~~~~~~^ - f"Unclosed <{self.__class__.__name__} at {id(self):x}>", - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ...<2 lines>... - source=self, - ^^^^^^^^^^^^ - ) - ^ - ResourceWarning: Unclosed - - Enable tracemalloc to get traceback where the object was allocated. - See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. - warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) - -tests/evaluation/test_runner.py::TestRunShapeAndResults::test_run_shape_and_results_frame -tests/evaluation/test_runner.py::TestRunShapeAndResults::test_one_provider_name_per_config_and_trial_seeds - /home/code/dev/steerability-vjp/steerability/evaluation/runner.py:203: UserWarning: seed is set but no temperature is configured in generate_defaults or any suite's generate_overrides; trial seeds are attached to sampling dispatches only, so the derived seeds will not be attached. Pass generate_defaults={'temperature': 0} for greedy decoding or an explicit sampling temperature. - warnings.warn( - --- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -3257 passed, 340 skipped, 166 warnings in 254.56s (0:04:14) diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_check.log b/slop/verification/2026-09-17_vjp-delta/gpu_check.log deleted file mode 100644 index b1a379e9..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_check.log +++ /dev/null @@ -1,9 +0,0 @@ -## Available-device check -2026-09-17T18:23:18+08:00 -NVIDIA GeForce RTX 3090, 580.173.02, 24576 MiB - -Pueue groups: -Group "api" (4 parallel): running -Group "default" (1 parallel): running -Group "local_gpu" (1 parallel): running -Group "modal" (1 parallel): running diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py b/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py deleted file mode 100644 index 636201f9..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Queued CUDA smoke test for VJP-delta extraction and generation.""" -import torch - -from steerability.algorithms.core.steering_pipeline import SteeringPipeline -from steerability.algorithms.state_control.vjp_delta import VJPDelta, VJPDeltaFit -from tests.utils.tiny_models import tiny_llama, wordlevel_tokenizer - -assert torch.cuda.is_available(), "CUDA was unavailable when this queued VJP-delta check ran." -model = tiny_llama().to("cuda") -tokenizer = wordlevel_tokenizer() -source = VJPDeltaFit( - data={"positives": ["the cat sat", "the dog ran"], "negatives": ["dog ran fast"]}, - target_layer=2, - source_layer_ids=[0, 1], - skip_first=0, -) -master = source.resolve(model, tokenizer) -assert all(vector.device.type == "cpu" for vector in master.directions.values()) -control = VJPDelta(steering_vector=source) -pipeline = SteeringPipeline(model=model, tokenizer=tokenizer, controls=[control], model_name_or_path="tiny-cuda") -pipeline.steer() -bound = control.export_state()["intervention_0/transform"] -assert all(vector.device.type == "cuda" for vector in bound.directions.values()) -reply = pipeline.generate(text="the cat", max_new_tokens=2, do_sample=False) -import steerability - -print({ - "module": steerability.__file__, - "master_device": master.directions[0].device.type, - "bound_device": bound.directions[0].device.type, - "reply": reply, - "layers": sorted(bound.directions), -}) diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log deleted file mode 100644 index 6f081fac..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_full.log +++ /dev/null @@ -1,4 +0,0 @@ -[pq] task 1649: last 3 of 3 clean lines -- /home/code/.local/share/pueue/task_logs/1649.log -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -{'module': '/home/code/dev/steerability-vjp/steerability/__init__.py', 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]} diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log deleted file mode 100644 index 459c10cb..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_pqf.log +++ /dev/null @@ -1,6 +0,0 @@ -[pq] task 1649: last 3 of 3 clean lines -- /home/code/.local/share/pueue/task_logs/1649.log -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -{'module': '/home/code/dev/steerability-vjp/steerability/__init__.py', 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]} - -[pq] task 1649 SUCCESS in 9s -- why: confirm corrected CUDA VJP smoke through report; resolve: CPU master, CUDA bound vector, public reply all print diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log deleted file mode 100644 index 74fb263e..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_raw.log +++ /dev/null @@ -1,3 +0,0 @@ -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -{'module': '/home/code/dev/steerability-vjp/steerability/__init__.py', 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]} diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json deleted file mode 100644 index 6df14795..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_final_status.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "id": 1649, - "created_at": "2026-09-17T18:27:10.473524776+08:00", - "original_command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", - "command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", - "path": "/home/code/dev/steerability-vjp", - "envs": { - "PATH": "/home/code/.pi/agent/bin:/home/wassname/.local/bin:/home/code/.cargo/bin/:/home/code/.bun/bin:/home/code/.opencode/bin:/home/code/Opt:/home/code/.local/bin:/home/code/.fzf/bin/:/home/code/.local/bin:/home/code/.local/share/mise/shims:/home/code/.local/bin:/home/code/.local/share/mise/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", - "forgit_stash_push": "gsp", - "EDITOR": "nvim", - "forgit_checkout_branch": "gcb", - "FZF_DEFAULT_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", - "forgit_attributes": "gat", - "LESS": "--ignore-case --jump-target=4 --LONG-PROMPT --no-init --quit-if-one-screen --RAW-CONTROL-CHARS", - "forgit_worktree_delete": "gwd", - "forgit_rebase": "grb", - "forgit_restore": "grs", - "EZA_COLORS": "da=1;34:gm=1;34:Su=1;34", - " ": "/home/code/.local/bin/pueue", - "VISUAL": "zed --wait", - "NVM_DIR": "/home/code/.nvm", - "LS_COLORS": "di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43", - "PWD": "/home/code/dev/steerability-vjp", - "forgit_ignore": "gi", - "forgit_reflog": "grl", - "GREP_COLORS": "mt=37;45", - "forgit_show": "gso", - "FZF_CTRL_T_OPTS": "--bind ctrl-/:toggle-preview --preview 'if [[ -d {} ]]; then eza --group-directories-first --color=always -1F {}; else bat --color=always --line-range :500 {}; fi' ", - "TERM": "xterm-256color", - "VIRTUAL_ENV_DISABLE_PROMPT": "20", - "forgit_add": "ga", - "LESS_TERMCAP_md": "\u001b[1;31m", - "PI_SUBAGENT_PARENT_SESSION": "01a0aed1-454e-7520-83dd-c77c2c059168", - "PUEUE_GROUP": "default", - "LESS_TERMCAP_mb": "\u001b[1;31m", - "forgit_log": "glo", - "LESS_TERMCAP_ue": "\u001b[0m", - "forgit_fixup": "gfu", - "PROMPT_EOL_MARK": "", - "forgit_diff": "gd", - "LESS_TERMCAP_us": "\u001b[1;32m", - "XDG_SESSION_CLASS": "user", - "HERDR_TAB_ID": "wE:t2", - "COLORTERM": "truecolor", - "PI_INTERCOM_SESSION_ID": "01a0aed1-454e-7520-83dd-c77c2c059168", - "forgit_checkout_file_from_commit": "gcff", - "forgit_worktree": "gwt", - "USER": "code", - "FZF_ALT_C_COMMAND": "command fd -H --no-ignore-vcs -E .git -td", - "FZF_CTRL_T_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", - "XDG_SESSION_TYPE": "tty", - "LESS_TERMCAP_me": "\u001b[0m", - "FZF_ALT_C_OPTS": "--bind ctrl-/:toggle-preview --preview 'eza --group-directories-first --color=always -1F {}' ", - "LC_ALL": "en_US.UTF-8", - "GREP_COLOR": "37;45", - "forgit_checkout_file": "gcf", - "forgit_squash": "gsq", - "HERDR_WORKSPACE_ID": "wE", - "forgit_worktree_add": "gwa", - "forgit_revert_commit": "grc", - "SSH_CLIENT": "UNKNOWN 65535 65535", - "_": "/home/code/.local/bin/pueue", - "XDG_RUNTIME_DIR": "/run/user/1000", - "AI_AGENT": "pi", - "PAGER": "less", - "HERDR_BIN_PATH": "/home/code/.local/bin/herdr", - "SSH_CONNECTION": "UNKNOWN 65535 UNKNOWN 65535", - "forgit_branch_delete": "gbd", - "forgit_checkout_tag": "gct", - "forgit_stash_show": "gss", - "PYENV_VIRTUALENV_DISABLE_PROMPT": "1", - "XDG_SESSION_ID": "153", - "forgit_clean": "gclean", - "PI_CODING_AGENT": "true", - "SHLVL": "1", - "HOME": "/home/code", - "BUN_INSTALL": "/home/code/.bun", - "HERDR_PANE_ID": "wE:p15", - "PUEUE_WORKER_ID": "0", - "OLDPWD": "/home/code/dev", - "HERDR_ENV": "1", - "HERDR_SOCKET_PATH": "/home/code/.config/herdr/herdr.sock", - "LANG": "en_US.UTF-8", - "CONDA_CHANGEPS1": "no", - "forgit_checkout_commit": "gco", - "forgit_reword": "grw", - "forgit_blame": "gbl", - "FORGIT_INSTALL_DIR": "/home/code/.zim/modules/forgit", - "SHELL": "/usr/bin/zsh", - "GPG_TTY": "/dev/pts/25", - "LOGNAME": "code", - "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus", - "YSU_VERSION": "1.11.1", - "forgit_cherry_pick": "gcp", - "forgit_reset_head": "grh", - "forgit_switch_branch": "gsw" - }, - "group": "default", - "dependencies": [], - "priority": 0, - "label": "why: confirm corrected CUDA VJP smoke through report; resolve: CPU master, CUDA bound vector, public reply all print", - "status": { - "Done": { - "enqueued_at": "2026-09-17T18:27:10.473515438+08:00", - "start": "2026-09-17T18:27:10.742287459+08:00", - "end": "2026-09-17T18:27:19.177044434+08:00", - "result": "Success" - } - } -} diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log deleted file mode 100644 index 0f68df67..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_full.log +++ /dev/null @@ -1,8 +0,0 @@ -[pq] task 1647: last 7 of 7 clean lines -- /home/code/.local/share/pueue/task_logs/1647.log -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -Traceback (most recent call last): - File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 19, in - assert all(vector.device.type == "cpu" for vector in control.export_state()["intervention_0/transform"].directions.values()) - ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -AssertionError diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log deleted file mode 100644 index 0b7269ce..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_pqf.log +++ /dev/null @@ -1,13 +0,0 @@ -[pq] task 1647: last 7 of 7 clean lines -- /home/code/.local/share/pueue/task_logs/1647.log -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -Traceback (most recent call last): - File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 19, in - assert all(vector.device.type == "cpu" for vector in control.export_state()["intervention_0/transform"].directions.values()) - ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -AssertionError - -[pq] task 1647 FAILED (1) after 8s -- why: verify VJPDelta performs CUDA extraction and additive generation; resolve: record CUDA result or diagnose backend failure -[pq] USER (standing instruction, from CLAUDE.md): this was a long or failed job. -[pq] Run the auditlog skill on it, and read ml-debug. Prefer a project-local skill of -[pq] that name over the global one. Do not report a result from the tail alone. diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log deleted file mode 100644 index cb76b0bf..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_raw.log +++ /dev/null @@ -1,7 +0,0 @@ -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -Traceback (most recent call last): - File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 19, in - assert all(vector.device.type == "cpu" for vector in control.export_state()["intervention_0/transform"].directions.values()) - ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -AssertionError diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log deleted file mode 100644 index 4e8e4961..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_full.log +++ /dev/null @@ -1,8 +0,0 @@ -[pq] task 1648: last 7 of 7 clean lines -- /home/code/.local/share/pueue/task_logs/1648.log -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -Traceback (most recent call last): - File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 31, in - "layers": control._layer_ids, - ^^^^^^^^^^^^^^^^^^ -AttributeError: 'VJPDelta' object has no attribute '_layer_ids' diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log deleted file mode 100644 index 56078f18..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_pqf.log +++ /dev/null @@ -1,13 +0,0 @@ -[pq] task 1648: last 7 of 7 clean lines -- /home/code/.local/share/pueue/task_logs/1648.log -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -Traceback (most recent call last): - File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 31, in - "layers": control._layer_ids, - ^^^^^^^^^^^^^^^^^^ -AttributeError: 'VJPDelta' object has no attribute '_layer_ids' - -[pq] task 1648 FAILED (1) after 8s -- why: distinguish CPU VJP master from CUDA bound artifact and verify public generation; resolve: print both devices and reply -[pq] USER (standing instruction, from CLAUDE.md): this was a long or failed job. -[pq] Run the auditlog skill on it, and read ml-debug. Prefer a project-local skill of -[pq] that name over the global one. Do not report a result from the tail alone. diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log deleted file mode 100644 index 23df5341..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_raw.log +++ /dev/null @@ -1,7 +0,0 @@ -/home/code/dev/steerability/.venv/lib/python3.13/site-packages/torch/autograd/graph.py:1072: UserWarning: Attempting to run cuBLAS, but there was no current CUDA context! Attempting to set the primary context... (Triggered internally at /__w/pytorch/pytorch/aten/src/ATen/cuda/CublasHandlePool.cpp:410.) - return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass -Traceback (most recent call last): - File "/home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", line 31, in - "layers": control._layer_ids, - ^^^^^^^^^^^^^^^^^^ -AttributeError: 'VJPDelta' object has no attribute '_layer_ids' diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json deleted file mode 100644 index 82b35004..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_retry_status.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "id": 1648, - "created_at": "2026-09-17T18:26:00.835455558+08:00", - "original_command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", - "command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", - "path": "/home/code/dev/steerability-vjp", - "envs": { - "GREP_COLOR": "37;45", - "forgit_branch_delete": "gbd", - "NVM_DIR": "/home/code/.nvm", - "forgit_add": "ga", - "XDG_SESSION_CLASS": "user", - "PUEUE_GROUP": "default", - "LESS": "--ignore-case --jump-target=4 --LONG-PROMPT --no-init --quit-if-one-screen --RAW-CONTROL-CHARS", - "TERM": "xterm-256color", - "forgit_stash_push": "gsp", - "LC_ALL": "en_US.UTF-8", - "SHLVL": "1", - "HERDR_SOCKET_PATH": "/home/code/.config/herdr/herdr.sock", - "PWD": "/home/code/dev/steerability-vjp", - "FZF_CTRL_T_OPTS": "--bind ctrl-/:toggle-preview --preview 'if [[ -d {} ]]; then eza --group-directories-first --color=always -1F {}; else bat --color=always --line-range :500 {}; fi' ", - "HERDR_WORKSPACE_ID": "wE", - "LESS_TERMCAP_me": "\u001b[0m", - "COLORTERM": "truecolor", - "FZF_DEFAULT_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", - "FZF_CTRL_T_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", - "forgit_stash_show": "gss", - "AI_AGENT": "pi", - "forgit_checkout_file_from_commit": "gcff", - "forgit_blame": "gbl", - "forgit_checkout_branch": "gcb", - "GPG_TTY": "/dev/pts/25", - "SSH_CLIENT": "UNKNOWN 65535 65535", - "LESS_TERMCAP_us": "\u001b[1;32m", - "LESS_TERMCAP_ue": "\u001b[0m", - "FZF_ALT_C_COMMAND": "command fd -H --no-ignore-vcs -E .git -td", - "YSU_VERSION": "1.11.1", - "forgit_squash": "gsq", - "forgit_reword": "grw", - " ": "/home/code/.local/bin/pueue", - "PAGER": "less", - "FZF_ALT_C_OPTS": "--bind ctrl-/:toggle-preview --preview 'eza --group-directories-first --color=always -1F {}' ", - "forgit_clean": "gclean", - "forgit_fixup": "gfu", - "_": "/home/code/.local/bin/pueue", - "HOME": "/home/code", - "forgit_ignore": "gi", - "EZA_COLORS": "da=1;34:gm=1;34:Su=1;34", - "HERDR_BIN_PATH": "/home/code/.local/bin/herdr", - "forgit_worktree_delete": "gwd", - "SSH_CONNECTION": "UNKNOWN 65535 UNKNOWN 65535", - "forgit_rebase": "grb", - "PI_INTERCOM_SESSION_ID": "01a0aed1-454e-7520-83dd-c77c2c059168", - "forgit_switch_branch": "gsw", - "forgit_show": "gso", - "VISUAL": "zed --wait", - "forgit_worktree_add": "gwa", - "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus", - "LOGNAME": "code", - "PROMPT_EOL_MARK": "", - "GREP_COLORS": "mt=37;45", - "PATH": "/home/code/.pi/agent/bin:/home/wassname/.local/bin:/home/code/.cargo/bin/:/home/code/.bun/bin:/home/code/.opencode/bin:/home/code/Opt:/home/code/.local/bin:/home/code/.fzf/bin/:/home/code/.local/bin:/home/code/.local/share/mise/shims:/home/code/.local/bin:/home/code/.local/share/mise/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", - "LESS_TERMCAP_md": "\u001b[1;31m", - "HERDR_TAB_ID": "wE:t2", - "LANG": "en_US.UTF-8", - "forgit_checkout_commit": "gco", - "EDITOR": "nvim", - "OLDPWD": "/home/code/dev", - "forgit_worktree": "gwt", - "XDG_RUNTIME_DIR": "/run/user/1000", - "CONDA_CHANGEPS1": "no", - "PI_CODING_AGENT": "true", - "PYENV_VIRTUALENV_DISABLE_PROMPT": "1", - "forgit_reset_head": "grh", - "forgit_attributes": "gat", - "forgit_checkout_tag": "gct", - "LESS_TERMCAP_mb": "\u001b[1;31m", - "BUN_INSTALL": "/home/code/.bun", - "PI_SUBAGENT_PARENT_SESSION": "01a0aed1-454e-7520-83dd-c77c2c059168", - "forgit_diff": "gd", - "LS_COLORS": "di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43", - "XDG_SESSION_TYPE": "tty", - "forgit_log": "glo", - "HERDR_ENV": "1", - "USER": "code", - "PUEUE_WORKER_ID": "0", - "forgit_restore": "grs", - "forgit_cherry_pick": "gcp", - "forgit_checkout_file": "gcf", - "SHELL": "/usr/bin/zsh", - "FORGIT_INSTALL_DIR": "/home/code/.zim/modules/forgit", - "VIRTUAL_ENV_DISABLE_PROMPT": "20", - "forgit_reflog": "grl", - "forgit_revert_commit": "grc", - "HERDR_PANE_ID": "wE:p15", - "XDG_SESSION_ID": "153" - }, - "group": "default", - "dependencies": [], - "priority": 0, - "label": "why: distinguish CPU VJP master from CUDA bound artifact and verify public generation; resolve: print both devices and reply", - "status": { - "Done": { - "enqueued_at": "2026-09-17T18:26:00.835445178+08:00", - "start": "2026-09-17T18:26:00.897954105+08:00", - "end": "2026-09-17T18:26:08.427166252+08:00", - "result": { - "Failed": 1 - } - } - } -} diff --git a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json b/slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json deleted file mode 100644 index 52f1781e..00000000 --- a/slop/verification/2026-09-17_vjp-delta/gpu_smoke_status.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "id": 1647, - "created_at": "2026-09-17T18:23:42.566443786+08:00", - "original_command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", - "command": "env PYTHONPATH=/home/code/dev/steerability-vjp /home/code/dev/steerability/.venv/bin/python slop/verification/2026-09-17_vjp-delta/gpu_smoke.py", - "path": "/home/code/dev/steerability-vjp", - "envs": { - "BUN_INSTALL": "/home/code/.bun", - "FZF_ALT_C_COMMAND": "command fd -H --no-ignore-vcs -E .git -td", - "forgit_clean": "gclean", - "forgit_switch_branch": "gsw", - "forgit_restore": "grs", - "VISUAL": "zed --wait", - "forgit_checkout_commit": "gco", - "FORGIT_INSTALL_DIR": "/home/code/.zim/modules/forgit", - "LESS_TERMCAP_ue": "\u001b[0m", - "forgit_reflog": "grl", - "forgit_rebase": "grb", - "GPG_TTY": "/dev/pts/25", - "PYENV_VIRTUALENV_DISABLE_PROMPT": "1", - "forgit_stash_show": "gss", - "XDG_SESSION_ID": "153", - "LESS_TERMCAP_md": "\u001b[1;31m", - "HERDR_TAB_ID": "wE:t2", - "GREP_COLOR": "37;45", - "forgit_checkout_file_from_commit": "gcff", - "PI_SUBAGENT_PARENT_SESSION": "01a0aed1-454e-7520-83dd-c77c2c059168", - "forgit_worktree": "gwt", - "SHLVL": "1", - "HERDR_ENV": "1", - "XDG_RUNTIME_DIR": "/run/user/1000", - "CONDA_CHANGEPS1": "no", - "SSH_CLIENT": "UNKNOWN 65535 65535", - "PWD": "/home/code/dev/steerability-vjp", - "COLORTERM": "truecolor", - "LESS_TERMCAP_us": "\u001b[1;32m", - "forgit_squash": "gsq", - "forgit_fixup": "gfu", - "forgit_diff": "gd", - "EZA_COLORS": "da=1;34:gm=1;34:Su=1;34", - "YSU_VERSION": "1.11.1", - "forgit_cherry_pick": "gcp", - "forgit_blame": "gbl", - "HERDR_BIN_PATH": "/home/code/.local/bin/herdr", - "LESS_TERMCAP_me": "\u001b[0m", - "forgit_add": "ga", - "LS_COLORS": "di=1;34:ln=35:so=32:pi=33:ex=31:bd=1;36:cd=1;33:su=30;41:sg=30;46:tw=30;42:ow=30;43", - "PI_CODING_AGENT": "true", - "forgit_checkout_branch": "gcb", - "_": "/home/code/.local/bin/pueue", - "LESS_TERMCAP_mb": "\u001b[1;31m", - "TERM": "xterm-256color", - "forgit_worktree_delete": "gwd", - "forgit_log": "glo", - "PUEUE_GROUP": "default", - "forgit_branch_delete": "gbd", - "USER": "code", - "OLDPWD": "/home/code/dev", - " ": "/home/code/.local/bin/pueue", - "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus", - "LC_ALL": "en_US.UTF-8", - "FZF_DEFAULT_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", - "EDITOR": "nvim", - "HERDR_PANE_ID": "wE:p15", - "FZF_ALT_C_OPTS": "--bind ctrl-/:toggle-preview --preview 'eza --group-directories-first --color=always -1F {}' ", - "GREP_COLORS": "mt=37;45", - "forgit_reword": "grw", - "forgit_revert_commit": "grc", - "forgit_worktree_add": "gwa", - "NVM_DIR": "/home/code/.nvm", - "SSH_CONNECTION": "UNKNOWN 65535 UNKNOWN 65535", - "PAGER": "less", - "LOGNAME": "code", - "VIRTUAL_ENV_DISABLE_PROMPT": "20", - "PATH": "/home/code/.pi/agent/bin:/home/wassname/.local/bin:/home/code/.cargo/bin/:/home/code/.bun/bin:/home/code/.opencode/bin:/home/code/Opt:/home/code/.local/bin:/home/code/.fzf/bin/:/home/code/.local/bin:/home/code/.local/share/mise/shims:/home/code/.local/bin:/home/code/.local/share/mise/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", - "forgit_checkout_tag": "gct", - "PROMPT_EOL_MARK": "", - "PUEUE_WORKER_ID": "0", - "AI_AGENT": "pi", - "forgit_reset_head": "grh", - "forgit_checkout_file": "gcf", - "SHELL": "/usr/bin/zsh", - "FZF_CTRL_T_OPTS": "--bind ctrl-/:toggle-preview --preview 'if [[ -d {} ]]; then eza --group-directories-first --color=always -1F {}; else bat --color=always --line-range :500 {}; fi' ", - "XDG_SESSION_TYPE": "tty", - "forgit_attributes": "gat", - "LESS": "--ignore-case --jump-target=4 --LONG-PROMPT --no-init --quit-if-one-screen --RAW-CONTROL-CHARS", - "HERDR_WORKSPACE_ID": "wE", - "forgit_show": "gso", - "PI_INTERCOM_SESSION_ID": "01a0aed1-454e-7520-83dd-c77c2c059168", - "FZF_CTRL_T_COMMAND": "command fd -H --no-ignore-vcs -E .git -td -tf", - "LANG": "en_US.UTF-8", - "HOME": "/home/code", - "forgit_ignore": "gi", - "XDG_SESSION_CLASS": "user", - "HERDR_SOCKET_PATH": "/home/code/.config/herdr/herdr.sock", - "forgit_stash_push": "gsp" - }, - "group": "default", - "dependencies": [], - "priority": 0, - "label": "why: verify VJPDelta performs CUDA extraction and additive generation; resolve: record CUDA result or diagnose backend failure", - "status": { - "Done": { - "enqueued_at": "2026-09-17T18:23:42.566429820+08:00", - "start": "2026-09-17T18:23:42.695255734+08:00", - "end": "2026-09-17T18:23:50.834943225+08:00", - "result": { - "Failed": 1 - } - } - } -} diff --git a/slop/verification/2026-09-17_vjp-delta/notebook_execution.log b/slop/verification/2026-09-17_vjp-delta/notebook_execution.log deleted file mode 100644 index d37c21bb..00000000 --- a/slop/verification/2026-09-17_vjp-delta/notebook_execution.log +++ /dev/null @@ -1,114 +0,0 @@ -[NbConvertApp] Converting notebook examples/notebooks/algorithms/vjp_delta.ipynb to notebook -[IPKernelApp] WARNING | Kernel is running over TCP without encryption. All communication (including code and outputs) is sent in plain text and is susceptible to eavesdropping. Use IPC transport or launch with kernel manager-provisioned CurveZMQ keys to enable transport encryption. -Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/bin/jupyter-nbconvert", line 10, in - sys.exit(main()) - ~~~~^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/jupyter_core/application.py", line 284, in launch_instance - super().launch_instance(argv=argv, **kwargs) - ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/traitlets/config/application.py", line 1080, in launch_instance - app.start() - ~~~~~~~~~^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/nbconvertapp.py", line 420, in start - self.convert_notebooks() - ~~~~~~~~~~~~~~~~~~~~~~^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/nbconvertapp.py", line 597, in convert_notebooks - self.convert_single_notebook(notebook_filename) - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/nbconvertapp.py", line 563, in convert_single_notebook - output, resources = self.export_single_notebook( - ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ - notebook_filename, resources, input_buffer=input_buffer - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ) - ^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/nbconvertapp.py", line 487, in export_single_notebook - output, resources = self.exporter.from_filename( - ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ - notebook_filename, resources=resources - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ) - ^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/exporter.py", line 201, in from_filename - return self.from_file(f, resources=resources, **kw) - ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/exporter.py", line 220, in from_file - return self.from_notebook_node( - ~~~~~~~~~~~~~~~~~~~~~~~^ - nbformat.read(file_stream, as_version=4), resources=resources, **kw - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ) - ^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/notebook.py", line 36, in from_notebook_node - nb_copy, resources = super().from_notebook_node(nb, resources, **kw) - ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/exporter.py", line 154, in from_notebook_node - nb_copy, resources = self._preprocess(nb_copy, resources) - ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/exporters/exporter.py", line 353, in _preprocess - nbc, resc = preprocessor(nbc, resc) - ~~~~~~~~~~~~^^^^^^^^^^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/preprocessors/base.py", line 48, in __call__ - return self.preprocess(nb, resources) - ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/preprocessors/execute.py", line 103, in preprocess - self.preprocess_cell(cell, resources, index) - ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbconvert/preprocessors/execute.py", line 124, in preprocess_cell - cell = self.execute_cell(cell, index, store_history=True) - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/jupyter_core/utils/__init__.py", line 165, in wrapped - return loop.run_until_complete(inner) - ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^ - File "/home/code/.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete - return future.result() - ~~~~~~~~~~~~~^^ - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbclient/client.py", line 1062, in async_execute_cell - await self._check_raise_for_error(cell, cell_index, exec_reply) - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/nbclient/client.py", line 918, in _check_raise_for_error - raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content) -nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell: ------------------- -from pathlib import Path -import tempfile - -from steerability.algorithms.core.steering_pipeline import SteeringPipeline -from steerability.algorithms.state_control.vjp_delta import VJPDelta -from steerability.spipe import SPipe -from tests.utils.tiny_models import tiny_llama, wordlevel_tokenizer - -model = tiny_llama() -tokenizer = wordlevel_tokenizer() -fit_data = { - "positives": ["the cat sat", "the dog ran"], - "negatives": ["dog ran fast"], -} -control = VJPDelta( - data=fit_data, - target_layer=2, - source_layer_ids=[0, 1], - skip_first=0, - strength=0.5, -) -pipeline = SteeringPipeline( - model=model, - tokenizer=tokenizer, - controls=[control], - model_name_or_path="tiny-llama-demo", -) ------------------- - - ---------------------------------------------------------------------------- -ModuleNotFoundError Traceback (most recent call last) -Cell In[1], line 5 - 1 from pathlib import Path - 2 import tempfile - 3 - 4 from steerability.algorithms.core.steering_pipeline import SteeringPipeline -----> 5 from steerability.algorithms.state_control.vjp_delta import VJPDelta - 6 from steerability.spipe import SPipe - 7 from tests.utils.tiny_models import tiny_llama, wordlevel_tokenizer - 8 - -ModuleNotFoundError: No module named 'steerability.algorithms.state_control.vjp_delta' diff --git a/slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log b/slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log deleted file mode 100644 index 5878cedd..00000000 --- a/slop/verification/2026-09-17_vjp-delta/notebook_execution_retry.log +++ /dev/null @@ -1,3 +0,0 @@ -[NbConvertApp] Converting notebook examples/notebooks/algorithms/vjp_delta.ipynb to notebook -[IPKernelApp] WARNING | Kernel is running over TCP without encryption. All communication (including code and outputs) is sent in plain text and is susceptible to eavesdropping. Use IPC transport or launch with kernel manager-provisioned CurveZMQ keys to enable transport encryption. -[NbConvertApp] Writing 5746 bytes to examples/notebooks/algorithms/vjp_delta.ipynb diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_all.log b/slop/verification/2026-09-17_vjp-delta/precommit_all.log deleted file mode 100644 index f03deabd..00000000 --- a/slop/verification/2026-09-17_vjp-delta/precommit_all.log +++ /dev/null @@ -1,378 +0,0 @@ -Detect secrets...........................................................Failed -- hook id: detect-secrets -- exit code: 1 - -Potential secrets about to be committed to git repo! Please rectify. - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:471 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:485 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:575 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:786 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:800 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:877 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:1572 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:1586 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:1600 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:1614 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:1775 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2303 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2317 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2331 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2394 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2408 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2658 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2720 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2734 - -Secret Type: Base64 High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:700 - -Secret Type: Base64 High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:1486 - -Secret Type: Base64 High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2041 - -Secret Type: Base64 High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2107 - -Secret Type: Base64 High Entropy String -Location: examples/notebooks/algorithms/rad.ipynb:2187 - -Possible mitigations: - - - Mark false positives with an inline `pragma: allowlist secret` - comment - - Commit with `--no-verify` if this is a one-time false positive - -If a secret has already been committed, visit -https://help.github.com/articles/removing-sensitive-data-from-a- -repository -Potential secrets about to be committed to git repo! Please rectify. - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:1321 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:1335 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2114 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2128 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2142 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2156 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2170 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2184 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2198 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2212 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2226 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:2240 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3840 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3893 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3946 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3972 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3998 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4016 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4069 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4087 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4140 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4156 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4222 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4240 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4266 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4313 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4366 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4419 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4442 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4495 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4518 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4561 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4604 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4681 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4734 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4787 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4840 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4893 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4946 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:4999 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5025 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5051 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5069 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5122 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5138 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5191 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5207 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5230 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5248 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5274 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5327 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5350 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5403 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5456 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5474 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5492 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5545 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5598 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5616 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5639 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5712 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5730 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5753 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5771 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5789 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5842 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5895 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5959 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:5985 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6021 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6074 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6092 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6169 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6222 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6275 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6328 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6381 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6399 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6452 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6525 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6548 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6564 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6617 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6640 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6656 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6679 - -Secret Type: Hex High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:6702 - -Secret Type: Base64 High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3020 - -Secret Type: Base64 High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3106 - -Secret Type: Base64 High Entropy String -Location: examples/notebooks/studies/instruction_following/instruction_following.ipynb:3322 - -Possible mitigations: - - - Mark false positives with an inline `pragma: allowlist secret` - comment - - Commit with `--no-verify` if this is a one-time false positive - -If a secret has already been committed, visit -https://help.github.com/articles/removing-sensitive-data-from-a- -repository - -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...............................................................Passed -check toml...............................................................Passed -check for merge conflicts................................................Passed -check for case conflicts.................................................Passed -debug statements (python)................................................Passed -isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_docstring.log b/slop/verification/2026-09-17_vjp-delta/precommit_docstring.log deleted file mode 100644 index 44f38515..00000000 --- a/slop/verification/2026-09-17_vjp-delta/precommit_docstring.log +++ /dev/null @@ -1,10 +0,0 @@ -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...........................................(no files to check)Skipped -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts.................................................Passed -debug statements (python)................................................Passed -isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_final.log b/slop/verification/2026-09-17_vjp-delta/precommit_final.log deleted file mode 100644 index c3db90d4..00000000 --- a/slop/verification/2026-09-17_vjp-delta/precommit_final.log +++ /dev/null @@ -1,10 +0,0 @@ -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...............................................................Passed -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts.................................................Passed -debug statements (python)................................................Passed -isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_staged.log b/slop/verification/2026-09-17_vjp-delta/precommit_staged.log deleted file mode 100644 index 573b713a..00000000 --- a/slop/verification/2026-09-17_vjp-delta/precommit_staged.log +++ /dev/null @@ -1,14 +0,0 @@ -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...............................................................Passed -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts.................................................Passed -debug statements (python)................................................Passed -isort (python)...........................................................Failed -- hook id: isort -- files were modified by this hook - -Fixing /home/code/dev/steerability-vjp/slop/verification/2026-09-17_vjp-delta/gpu_smoke.py diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log b/slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log deleted file mode 100644 index c3db90d4..00000000 --- a/slop/verification/2026-09-17_vjp-delta/precommit_staged_final.log +++ /dev/null @@ -1,10 +0,0 @@ -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...............................................................Passed -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts.................................................Passed -debug statements (python)................................................Passed -isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/precommit_targeted.log b/slop/verification/2026-09-17_vjp-delta/precommit_targeted.log deleted file mode 100644 index c3db90d4..00000000 --- a/slop/verification/2026-09-17_vjp-delta/precommit_targeted.log +++ /dev/null @@ -1,10 +0,0 @@ -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...............................................................Passed -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts.................................................Passed -debug statements (python)................................................Passed -isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log b/slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log deleted file mode 100644 index fd4b02c3..00000000 --- a/slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log +++ /dev/null @@ -1,98 +0,0 @@ - - │ ⚠ Warning from the Material for MkDocs team - │ - │ MkDocs 2.0, the underlying framework of Material for MkDocs, - │ will introduce backward-incompatible changes, including: - │ - │ × All plugins will stop working – the plugin system has been removed - │ × All theme overrides will break – the theming system has been rewritten - │ × No migration path exists – existing projects cannot be upgraded - │ × Closed contribution model – community members can't report bugs - │ × Currently unlicensed – unsuitable for production use - │ - │ Our full analysis: - │ - │ https://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/ - -INFO - Loading data from bib files: ['/home/code/dev/steerability-vjp/docs/assets/references.bib'] -INFO - Cleaning site directory -INFO - Building documentation to directory: /home/code/dev/steerability-vjp/site -INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: - - human_journal.md - - _hooks/bibtex_warnings.py - - examples/notebooks/recipes/vllm_serve.ipynb - - examples/notebooks/recipes/routed_decoding/data.py - - examples/notebooks/studies/commonsense_mcqa/task.py - - examples/notebooks/studies/instruction_following/task.py -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/_hooks/bibtex_warnings.py -WARNING - Doc file 'concepts/controls.md' contains a link '../examples/notebooks/algorithms/user_prefix.ipynb', but the target 'examples/notebooks/algorithms/user_prefix.ipynb' is not found among documentation files. -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/act_add.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/angular_steering.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/best_of_n.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/budget_forcing.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/caa.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cast.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/contrastive_decoding.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/cpo.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/deal.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/dexperts.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/directional_ablation.ipynb -INFO - Converting notebook (execute=False): /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb -INFO - Cache miss, writing: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/few_shot.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/gepa.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/iti.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/pasta.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/prewrite.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/rad.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/sasa.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/system_prompt.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/vjp_delta.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/activation_adapter.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/contrastive_guidance.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/phased_decoding.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/search_decoding.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/stopping_rules.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/generics/value_guidance.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/mergekit.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/algorithms/wrappers/trl.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/honest_persona_prompting.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/vllm_serve.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/working_with_spipes.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/data.py -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/recipes/routed_decoding/routed_decoding.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/routing_vs_prompting.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/commonsense_mcqa.ipynb -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/commonsense_mcqa/task.py -WARNING - Inline reference to unknown key instruction_following -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/instruction_following.ipynb -WARNING - Inline reference to unknown key scorer -INFO - Cache hit: /home/code/dev/steerability-vjp/docs/examples/notebooks/studies/instruction_following/task.py -INFO - mkdocstrings_handlers: Formatting signatures requires either Black or Ruff to be installed. -WARNING - griffe: steerability/algorithms/core/internals/probes/fitting.py:583: No type or annotation for parameter 'session' -WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:57: No type or annotation for parameter 'system_mode' -WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:57: Parameter 'system_mode' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:60: No type or annotation for parameter 'separator' -WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:60: Parameter 'separator' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:62: No type or annotation for parameter 'formatter' -WARNING - griffe: steerability/algorithms/input_control/few_shot/control.py:62: Parameter 'formatter' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: No type or annotation for parameter 'text' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:31: Parameter 'text' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: No type or annotation for parameter 'mode' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:32: Parameter 'mode' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: No type or annotation for parameter 'separator' -WARNING - griffe: steerability/algorithms/input_control/system_prompt/control.py:34: Parameter 'separator' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: No type or annotation for parameter 'text' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:27: Parameter 'text' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: No type or annotation for parameter 'separator' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:28: Parameter 'separator' does not appear in the function signature -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: No type or annotation for parameter 'placement' -WARNING - griffe: steerability/algorithms/input_control/user_prefix/control.py:29: Parameter 'placement' does not appear in the function signature -WARNING - griffe: steerability/algorithms/output_control/common/granite_heads.py:57: No type or annotation for parameter '**from_pretrained_kwargs' -WARNING - griffe: steerability/algorithms/output_control/rad/utils/reward_training.py:106: No type or annotation for parameter 'model' -WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:267: No type or annotation for parameter 'substrings' -WARNING - griffe: steerability/algorithms/state_control/pasta/control.py:155: No type or annotation for parameter 'session' -WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:273: No type or annotation for parameter 'model' -WARNING - griffe: steerability/algorithms/state_control/pasta/profiling.py:274: No type or annotation for parameter 'tokenizer' -WARNING - Inline reference to unknown key instruction_following -INFO - Evicted stale cache: .cache/mkdocs-jupyter/a986e0b321f4f67ae95b2fe3e0c06a4da49e4c7da61620d2e11e5013452b7da9.json -INFO - Documentation built in 30.85 seconds diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log b/slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log deleted file mode 100644 index 9e72325d..00000000 --- a/slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log +++ /dev/null @@ -1,160 +0,0 @@ -.....................ssss..s....ss..s..s..s............................. [ 1%] -...ssssssssssssssss........ssss..s..s................................... [ 3%] -.............ssssssssssssssssssssssss........ssss..s..s..s..s..s..s..s.. [ 5%] -s..s..s..s..s......sss........ssss..................sssssssss....ss..s.. [ 7%] -..............................................ssssssssssssssssssssssss.. [ 9%] -s..s..s..s.............s..s...s...........s..s..s...s..s........ssss..s. [ 11%] -...ss..s..s..s................................ssssssssssssssss........ss [ 13%] -ss..s..s................................................ssssssssssssssss [ 15%] -ssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s......sss....... [ 16%] -.ssss..................sssssssss....ss..s............................... [ 18%] -.................ssssssssssssssssssssssss..s..s..s..s...........ssssss.. [ 20%] -.ss........ssssss..ss..s..s........ssss..s....ss..s..s..s............... [ 22%] -.................ssssssssssssssss........ssss..s..s..................... [ 24%] -...........................ssssssssssssssssssssssss........ssss..s..s..s [ 26%] -..s..s..s..s..s..s..s..s..s......sss........ssss..................ssssss [ 28%] -sss....ss..s................................................ssssssssssss [ 30%] -ssssssssssss..s..s..s..s.............s..s...s...........s..s..s...s..s.. [ 32%] -........................................................................ [ 33%] -........................................................................ [ 35%] -........................................................................ [ 37%] -........................................................................ [ 39%] -........................................................................ [ 41%] -........................................................................ [ 43%] -.....s.................................................................. [ 45%] -........................................................................ [ 47%] -........................................................................ [ 49%] -........................................................................ [ 50%] -........................................................................ [ 52%] -........................................................................ [ 54%] -........................................................................ [ 56%] -........................................................................ [ 58%] -........................................................................ [ 60%] -........................................................................ [ 62%] -........................................................................ [ 64%] -........................................................................ [ 66%] -........................................................................ [ 67%] -........................................................................ [ 69%] -........................................................................ [ 71%] -........................................................................ [ 73%] -..................................................s..................... [ 75%] -........................................................................ [ 77%] -........................................................................ [ 79%] -........................................................................ [ 81%] -........................................................................ [ 83%] -................................................s....................... [ 84%] -........................................................................ [ 86%] -........................................................................ [ 88%] -........................................................................ [ 90%] -........................................................................ [ 92%] -........................................................................ [ 94%] -........................................................................ [ 96%] -........................................................................ [ 98%] -.................................................................... [100%] -=============================== warnings summary =============================== -tests/controls/test_few_shot.py: 144 warnings - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: FewShot override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cuda] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cuda] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cuda] - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/sklearn/decomposition/_pca.py:646: RuntimeWarning: invalid value encountered in divide - explained_variance_ratio_ = explained_variance_ / total_var - -tests/controls/test_lora_composition.py::test_lora_then_caa_steers_and_hooks_adapted_layer -tests/controls/test_lora_target_scoping.py::TestPeftInjection::test_saved_adapter_records_the_pattern_and_reloads_onto_the_decoder - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/utils/save_and_load.py:438: UserWarning: Could not find a config file in - will assume that the vocabulary was not modified. - warnings.warn( - -tests/controls/test_lora_target_scoping.py::TestMixinWiring::test_peft_config_targets_the_decoder_stack[ppo] -tests/controls/test_lora_target_scoping.py::TestMixinWiring::test_declared_target_modules_are_unchanged[ppo] - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/dill/_dill.py:423: PicklingWarning: Cannot locate reference to . - StockPickler.save(self, obj, save_persistent_id) - -tests/controls/test_lora_target_scoping.py::TestMixinWiring::test_peft_config_targets_the_decoder_stack[ppo] -tests/controls/test_lora_target_scoping.py::TestMixinWiring::test_declared_target_modules_are_unchanged[ppo] - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/dill/_dill.py:423: PicklingWarning: Cannot pickle : unittest.mock.MagicMock has recursive self-references that trigger a RecursionError. - StockPickler.save(self, obj, save_persistent_id) - -tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/mapping_func.py:72: UserWarning: You are trying to modify a model with PEFT for a second time. If you want to reload the model with a different config, make sure to call `.unload()` before. - warnings.warn( - -tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py:305: UserWarning: Already found a `peft_config` attribute in the model. This will lead to having multiple adapters in the model. Make sure to know what you are doing! - warnings.warn( - -tests/core/test_spipe_recipe_only.py::test_prompt_only_pipeline_freezes_without_a_model - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: SystemPrompt, UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/core/test_spipe_recipe_only.py::test_prompt_only_pipeline_freezes_without_a_model - /home/code/dev/steerability-vjp/steerability/algorithms/input_control/common/formatters/system_prompt.py:91: UserWarning: SystemPromptFormatter.apply_to_ids decodes → edits → re-tokenizes; prefer message-level entry (pass chat input to the pipeline so `apply_to_messages` runs). - warnings.warn( - -tests/evaluation/test_inspect_integration.py::TestMessagesPathIntegration::test_batched_eval_fires_adapt_messages_once_per_sample - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:954: PydanticDeprecatedSince20: `__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ - warnings.warn( - -tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: - - Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ - warnings.warn( - ~~~~~~~~~~~~~^ - f"Unclosed <{self.__class__.__name__} at {id(self):x}>", - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ...<2 lines>... - source=self, - ^^^^^^^^^^^^ - ) - ^ - ResourceWarning: Unclosed - - Enable tracemalloc to get traceback where the object was allocated. - See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. - warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) - -tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: - - Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ - warnings.warn( - ~~~~~~~~~~~~~^ - f"Unclosed <{self.__class__.__name__} at {id(self):x}>", - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ...<2 lines>... - source=self, - ^^^^^^^^^^^^ - ) - ^ - ResourceWarning: Unclosed - - Enable tracemalloc to get traceback where the object was allocated. - See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. - warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) - -tests/evaluation/test_runner.py::TestRunShapeAndResults::test_run_shape_and_results_frame -tests/evaluation/test_runner.py::TestRunShapeAndResults::test_one_provider_name_per_config_and_trial_seeds - /home/code/dev/steerability-vjp/steerability/evaluation/runner.py:203: UserWarning: seed is set but no temperature is configured in generate_defaults or any suite's generate_overrides; trial seeds are attached to sampling dispatches only, so the derived seeds will not be attached. Pass generate_defaults={'temperature': 0} for greedy decoding or an explicit sampling temperature. - warnings.warn( - --- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -3418 passed, 397 skipped, 173 warnings in 264.69s (0:04:24) diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log b/slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log deleted file mode 100644 index 8ef4bd10..00000000 --- a/slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log +++ /dev/null @@ -1,3 +0,0 @@ -........................................................................ [ 77%] -..................... [100%] -93 passed in 25.22s diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_precommit.log b/slop/verification/2026-09-17_vjp-delta/rebase_precommit.log deleted file mode 100644 index 2d4ca0ae..00000000 --- a/slop/verification/2026-09-17_vjp-delta/rebase_precommit.log +++ /dev/null @@ -1,30 +0,0 @@ -# Rebased changed-diff pre-commit - -Command: - -```sh -/home/code/dev/steerability/.venv/bin/pre-commit run --files \ - slop/pr_drafts/2026-09-17_vjp_delta.md \ - slop/verification/2026-09-17_vjp-delta/rebase_docs_build_nonstrict.log \ - slop/verification/2026-09-17_vjp-delta/rebase_full_pytest.log \ - slop/verification/2026-09-17_vjp-delta/rebase_lifecycle_tests.log \ - slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log \ - slop/verification/2026-09-17_vjp-delta/run.md -``` - -The first run removed trailing whitespace from `rebase_full_pytest.log`; the second run produced: - -```text -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...........................................(no files to check)Skipped -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts................................................Passed -debug statements (python)............................(no files to check)Skipped -isort (python).......................................(no files to check)Skipped -``` - - diff --git a/slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log b/slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log deleted file mode 100644 index 6d95e5c4..00000000 --- a/slop/verification/2026-09-17_vjp-delta/rebase_vjp_tests.log +++ /dev/null @@ -1,2 +0,0 @@ -.......... [100%] -10 passed in 4.39s diff --git a/slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log b/slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log deleted file mode 100644 index 8ac18b6f..00000000 --- a/slop/verification/2026-09-17_vjp-delta/release_artifact_precommit.log +++ /dev/null @@ -1,29 +0,0 @@ -# Changed-artifact pre-commit - -Command: - -```sh -/home/code/dev/steerability/.venv/bin/pre-commit run --files \ - slop/pr_drafts/2026-09-17_vjp_delta.md \ - slop/reviews/2026-09-17_vjp_delta_quick_oracle.md \ - slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log \ - slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log \ - slop/verification/2026-09-17_vjp-delta/run.md -``` - -Result: - -```text -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...........................................(no files to check)Skipped -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts................................................Passed -debug statements (python)............................(no files to check)Skipped -isort (python).......................................(no files to check)Skipped -``` - - diff --git a/slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log b/slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log deleted file mode 100644 index 388e2a22..00000000 --- a/slop/verification/2026-09-17_vjp-delta/release_artifact_vjp_tests.log +++ /dev/null @@ -1,2 +0,0 @@ -.......... [100%] -10 passed in 4.89s diff --git a/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log b/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log deleted file mode 100644 index b78b8583..00000000 --- a/slop/verification/2026-09-17_vjp-delta/review_copy_hashes.log +++ /dev/null @@ -1,10 +0,0 @@ -# Review copy hashes - -- cheap review source SHA-256: `32e8e998dc0e7b1097697e8f2df72deba8f7b6402de8806295adfe6841162dcf` -- cheap review committed-copy SHA-256: `32e8e998dc0e7b1097697e8f2df72deba8f7b6402de8806295adfe6841162dcf` -- quick oracle raw source SHA-256: `933acc03d2995b00dd246449c1ab6169237b5aba0ed00421d3fa687e7cb44faa` -- quick oracle normalized committed-copy SHA-256: `31dabfcbef027103290e0a8b6ff59a371d03425329f8efdad191efa452bed36c` - -The raw quick-oracle source lacks a terminal newline. Its committed copy differs only by one added terminal newline so the repository end-of-file check passes. Bytes before terminal newlines are identical. - - diff --git a/slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log b/slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log deleted file mode 100644 index d2fb44bd..00000000 --- a/slop/verification/2026-09-17_vjp-delta/review_fix_full_pytest.log +++ /dev/null @@ -1,138 +0,0 @@ -.....................ssss..s....ss..s..s..s............................. [ 2%] -...ssssssssssssssss........ssss..s..s................................... [ 4%] -.............ssssssssssssssssssssssss........ssss..s..s..s..s..s..s..s.. [ 6%] -s..s..s..s..s................................................sssssssssss [ 8%] -sssssssssssss..s..s..s..s.............s..s...s...........s..s..s...s..s. [ 10%] -.......ssss..s....ss..s..s..s................................sssssssssss [ 12%] -sssss........ssss..s..s................................................s [ 14%] -sssssssssssssssssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s. [ 16%] -...............................................ssssssssssssssssssssssss. [ 18%] -.s..s..s..s...........ssssss...ss........ssssss..ss..s..s........ssss..s [ 20%] -....ss..s..s..s................................ssssssssssssssss........s [ 22%] -sss..s..s................................................sssssssssssssss [ 24%] -sssssssss........ssss..s..s..s..s..s..s..s..s..s..s..s..s............... [ 26%] -.................................ssssssssssssssssssssssss..s..s..s..s... [ 28%] -..........s..s...s...........s..s..s...s..s............................. [ 30%] -........................................................................ [ 32%] -........................................................................ [ 34%] -........................................................................ [ 36%] -........................................................................ [ 38%] -........................................................................ [ 40%] -..............................................s......................... [ 42%] -........................................................................ [ 44%] -........................................................................ [ 46%] -........................................................................ [ 48%] -........................................................................ [ 50%] -........................................................................ [ 52%] -........................................................................ [ 54%] -........................................................................ [ 56%] -........................................................................ [ 58%] -........................................................................ [ 60%] -........................................................................ [ 62%] -........................................................................ [ 64%] -........................................................................ [ 66%] -........................................................................ [ 68%] -........................................................................ [ 70%] -........................................................................ [ 72%] -.................................................................s...... [ 74%] -........................................................................ [ 76%] -........................................................................ [ 78%] -........................................................................ [ 80%] -........................................................................ [ 82%] -...............................................s........................ [ 84%] -........................................................................ [ 86%] -........................................................................ [ 88%] -........................................................................ [ 90%] -........................................................................ [ 92%] -........................................................................ [ 94%] -........................................................................ [ 96%] -........................................................................ [ 98%] -................................................................... [100%] -=============================== warnings summary =============================== -tests/controls/test_few_shot.py: 144 warnings - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: FewShot override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[llama-cuda] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[mistral-cuda] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cpu] -tests/controls/test_user_prefix.py::test_token_path_prefixes_marker[gemma-cuda] - /home/code/dev/steerability-vjp/steerability/algorithms/core/utils/controls.py:163: UserWarning: UserPrefix override(s) `adapt_messages` but received tensor/text input; the message-level adaptation will not run. Pass `list[dict]` or `list[list[dict]]` to engage `adapt_messages`. - warnings.warn( - -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestSelectEndToEnd::test_returns_zero_based_layer -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin -tests/controls/test_condition_selector.py::TestMarginAwareSelection::test_select_reports_margin - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/sklearn/decomposition/_pca.py:646: RuntimeWarning: invalid value encountered in divide - explained_variance_ratio_ = explained_variance_ / total_var - -tests/controls/test_lora_composition.py::test_lora_then_caa_steers_and_hooks_adapted_layer - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/utils/save_and_load.py:438: UserWarning: Could not find a config file in - will assume that the vocabulary was not modified. - warnings.warn( - -tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/mapping_func.py:72: UserWarning: You are trying to modify a model with PEFT for a second time. If you want to reload the model with a different config, make sure to call `.unload()` before. - warnings.warn( - -tests/controls/test_model_layout.py::test_double_wrapped_peft_accumulates_prefix - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/peft/tuners/tuners_utils.py:305: UserWarning: Already found a `peft_config` attribute in the model. This will lead to having multiple adapters in the model. Make sure to know what you are doing! - warnings.warn( - -tests/evaluation/test_inspect_integration.py::TestMessagesPathIntegration::test_batched_eval_fires_adapt_messages_once_per_sample - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:954: PydanticDeprecatedSince20: `__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.13/migration/ - warnings.warn( - -tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: - - Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ - warnings.warn( - ~~~~~~~~~~~~~^ - f"Unclosed <{self.__class__.__name__} at {id(self):x}>", - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ...<2 lines>... - source=self, - ^^^^^^^^^^^^ - ) - ^ - ResourceWarning: Unclosed - - Enable tracemalloc to get traceback where the object was allocated. - See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. - warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) - -tests/evaluation/test_plotting.py::TestSmokeAllPublicFunctions::test_all_nine_render_without_warnings - /home/code/dev/steerability/.venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: - - Traceback (most recent call last): - File "/home/code/dev/steerability/.venv/lib/python3.13/site-packages/anyio/streams/memory.py", line 190, in __del__ - warnings.warn( - ~~~~~~~~~~~~~^ - f"Unclosed <{self.__class__.__name__} at {id(self):x}>", - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ...<2 lines>... - source=self, - ^^^^^^^^^^^^ - ) - ^ - ResourceWarning: Unclosed - - Enable tracemalloc to get traceback where the object was allocated. - See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. - warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) - -tests/evaluation/test_runner.py::TestRunShapeAndResults::test_run_shape_and_results_frame -tests/evaluation/test_runner.py::TestRunShapeAndResults::test_one_provider_name_per_config_and_trial_seeds - /home/code/dev/steerability-vjp/steerability/evaluation/runner.py:203: UserWarning: seed is set but no temperature is configured in generate_defaults or any suite's generate_overrides; trial seeds are attached to sampling dispatches only, so the derived seeds will not be attached. Pass generate_defaults={'temperature': 0} for greedy decoding or an explicit sampling temperature. - warnings.warn( - --- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -3258 passed, 340 skipped, 166 warnings in 283.24s (0:04:43) diff --git a/slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log b/slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log deleted file mode 100644 index bdf2d777..00000000 --- a/slop/verification/2026-09-17_vjp-delta/review_fix_lifecycle_tests.log +++ /dev/null @@ -1,3 +0,0 @@ -........................................................................ [ 77%] -..................... [100%] -93 passed in 24.97s diff --git a/slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log b/slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log deleted file mode 100644 index b9b64843..00000000 --- a/slop/verification/2026-09-17_vjp-delta/review_fix_precommit.log +++ /dev/null @@ -1,15 +0,0 @@ -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Failed -- hook id: end-of-file-fixer -- exit code: 1 - -Fixing slop/reviews/2026-09-17_vjp_delta_quick_oracle.md - -check for added large files..............................................Passed -check yaml...........................................(no files to check)Skipped -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts.................................................Passed -debug statements (python)................................................Passed -isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log b/slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log deleted file mode 100644 index 44f38515..00000000 --- a/slop/verification/2026-09-17_vjp-delta/review_fix_precommit_code.log +++ /dev/null @@ -1,10 +0,0 @@ -Detect secrets...........................................................Passed -trim trailing whitespace.................................................Passed -fix end of files.........................................................Passed -check for added large files..............................................Passed -check yaml...........................................(no files to check)Skipped -check toml...........................................(no files to check)Skipped -check for merge conflicts................................................Passed -check for case conflicts.................................................Passed -debug statements (python)................................................Passed -isort (python)...........................................................Passed diff --git a/slop/verification/2026-09-17_vjp-delta/run.md b/slop/verification/2026-09-17_vjp-delta/run.md deleted file mode 100644 index f37f0f27..00000000 --- a/slop/verification/2026-09-17_vjp-delta/run.md +++ /dev/null @@ -1,63 +0,0 @@ -# VJP-delta verification log - -- base: 92e3098086a1bb70db078343b459831dd12040e5 (`generative-computing/steerability` main; PR #31) -- original fork base: f1d8b5fd6d9ed15d506f9445a93d55cb5c5b07df -- branch: feat/vjp-delta -- assignment: exact parent `01a09cdb-9985-75d5-9f07-68b80024a10b` - -## Initial import - -- `/home/code/dev/steerability/.venv/bin/python -m compileall -q steerability/algorithms/state_control/vjp_delta`: passed. -- Registry import reported `VJPDelta` with `ModelAccess.MODULE`. -- `uv run --no-sync` in the new worktree did not have dependencies and was not used for tests. The existing repository environment is used read-only for local verification. - -## Focused verification - -| command | result | evidence | -| --- | --- | --- | -| `pytest tests/controls/test_vjp_delta.py -q` | 10 passed | [release_artifact_vjp_tests.log](release_artifact_vjp_tests.log) | -| `pytest tests/controls/test_vjp_delta.py tests/controls/test_sources.py tests/controls/test_activation_adapter.py tests/controls/test_spipe_freeze_state.py -q` | 93 passed | [review_fix_lifecycle_tests.log](review_fix_lifecycle_tests.log) | -| `pre-commit run --files ...` | passed | [precommit_final.log](precommit_final.log) | -| `mkdocs build` | passed with existing warnings | [docs_build_nonstrict.log](docs_build_nonstrict.log) | -| `mkdocs build --strict` | failed on 23 existing unrelated warnings | [docs_build.log](docs_build.log) | -| executed `vjp_delta.ipynb` | all three code cells completed | [notebook_execution_retry.log](notebook_execution_retry.log) | - -## CUDA smoke - -GPU queue job `1649` used the default one-worker group and completed in 9 seconds. Its complete result was: - -> `{'module': '/home/code/dev/steerability-vjp/steerability/__init__.py', 'master_device': 'cpu', 'bound_device': 'cuda', 'reply': 'the', 'layers': [0, 1]}` - -The two failed harness attempts are audited in [job_1647.md](../../audits/job_1647.md) and [job_1648.md](../../audits/job_1648.md). They failed a post-bind device assertion and an output-only private-property lookup, respectively; neither was interpreted as a method failure. - -## Full suite - -The first full-suite run completed with `3256 passed, 340 skipped, 166 warnings in 262.72s`; see [full_pytest.log](full_pytest.log). A final full-suite run after the remaining regression updates is active at this log path: [full_pytest_final.log](full_pytest_final.log). - -## Review fixes - -- `VJPDeltaFit.resolve(None, tokenizer)` can no longer match a dead weakref cache entry; it runs the live-model guard and raises. -- Model-forward failures now propagate unchanged. `torch.autograd.grad` failures retain their original message in the `VJP-delta autograd.grad failed: ...` headline. -- Both parent review outputs are copied to `slop/reviews/`. The raw quick-oracle source lacks a terminal newline; the committed copy adds only that newline. [review_copy_hashes.log](review_copy_hashes.log) records both raw and normalized-copy SHA-256 values. -- VJP-delta regressions: `10 passed` in [release_artifact_vjp_tests.log](release_artifact_vjp_tests.log). Lifecycle-focused tests: `93 passed` in [review_fix_lifecycle_tests.log](review_fix_lifecycle_tests.log). The post-review full suite: `3258 passed, 340 skipped, 166 warnings in 283.24s` in [review_fix_full_pytest.log](review_fix_full_pytest.log). -- Changed production/test files passed pre-commit in [review_fix_precommit_code.log](review_fix_precommit_code.log). The normalized review copy is included in the release-artifact pre-commit run. - -## Rebase verification - -The five VJP commits were rebased from `f1d8b5f` onto `92e3098`; `git merge-base HEAD 92e3098` returned `92e3098`. The rebased implementation head before this evidence-only update was `89eaaaf`. - -| command | result | evidence | -| --- | --- | --- | -| `pytest tests/controls/test_vjp_delta.py -q` | 10 passed | [rebase_vjp_tests.log](rebase_vjp_tests.log) | -| `pytest tests/controls/test_vjp_delta.py tests/controls/test_sources.py tests/controls/test_activation_adapter.py tests/controls/test_spipe_freeze_state.py -q` | 93 passed | [rebase_lifecycle_tests.log](rebase_lifecycle_tests.log) | -| `pytest -q` | 3418 passed, 397 skipped, 173 warnings | [rebase_full_pytest.log](rebase_full_pytest.log) | -| `mkdocs build` | passed with existing warnings | [rebase_docs_build_nonstrict.log](rebase_docs_build_nonstrict.log) | -| `pre-commit run --files ` | passed | [rebase_precommit.log](rebase_precommit.log) | - -## Residual risks - -- The VJP path supports standard differentiable torch decoder execution. Inference mode and unsupported backward paths raise rather than changing method behavior. -- Frozen `.spipe` resolution stores its historical additive transform. Editing application strength in a historical recipe does not alter that already-resolved transform, matching the existing `ActivationAdapter` freeze form. -- The external provenance repository is unlicensed. This branch records attribution and makes no relicensing claim. - - diff --git a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log deleted file mode 100644 index e9db6f5e..00000000 --- a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta.log +++ /dev/null @@ -1,2 +0,0 @@ -........ [100%] -8 passed in 4.11s diff --git a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log deleted file mode 100644 index 2bc45a61..00000000 --- a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_docstring.log +++ /dev/null @@ -1,2 +0,0 @@ -......... [100%] -9 passed in 4.25s diff --git a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log deleted file mode 100644 index 38bc842c..00000000 --- a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_final.log +++ /dev/null @@ -1,2 +0,0 @@ -......... [100%] -9 passed in 5.06s diff --git a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log b/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log deleted file mode 100644 index 5a532019..00000000 --- a/slop/verification/2026-09-17_vjp-delta/test_vjp_delta_initial.log +++ /dev/null @@ -1,58 +0,0 @@ -....F.. [100%] -=================================== FAILURES =================================== -______ test_pipeline_freeze_reload_skips_vjp_and_strength_does_not_stale _______ - -tmp_path = PosixPath('/tmp/pytest-of-code/pytest-22/test_pipeline_freeze_reload_sk0') -monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7a89b9a52060> - - def test_pipeline_freeze_reload_skips_vjp_and_strength_does_not_stale(tmp_path, monkeypatch): - model = tiny_llama() - tokenizer = wordlevel_tokenizer() - control = VJPDelta( - data=_fit_data(), target_layer=2, source_layer_ids=[0, 1], skip_first=0, strength=0.5, - ) - pipeline = SteeringPipeline(model=model, tokenizer=tokenizer, controls=[control], model_name_or_path="tiny-llama") - pipeline.steer() - reference = pipeline.generate(text="the cat", max_new_tokens=3, do_sample=False) - saved = pipeline.to_spipe().save(tmp_path / "vjp.spipe") - - rebuilt = SPipe.load(saved).pipeline() - assert isinstance(rebuilt.state_controls[0], ActivationAdapter) - assert rebuilt.state_controls[0].steer_fits() == () - monkeypatch.setattr(VJPDeltaFit, "resolve", lambda *_a, **_k: pytest.fail("frozen reload ran a VJP fit")) - rebuilt.model, rebuilt.tokenizer = model, tokenizer - rebuilt.steer() - assert rebuilt.generate(text="the cat", max_new_tokens=3, do_sample=False) == reference - -> manifest = json.loads((saved / "spipe.json").read_text()) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -tests/controls/test_vjp_delta.py:220: -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ -../../.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/pathlib/_local.py:546: in read_text - return PathBase.read_text(self, encoding, errors, newline) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -../../.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/pathlib/_abc.py:632: in read_text - with self.open(mode='r', encoding=encoding, errors=errors, newline=newline) as f: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - -self = PosixPath('/tmp/pytest-of-code/pytest-22/test_pipeline_freeze_reload_sk0/vjp.spipe/spipe.json') -mode = 'r', buffering = -1, encoding = 'locale', errors = None, newline = None - - def open(self, mode='r', buffering=-1, encoding=None, - errors=None, newline=None): - """ - Open the file pointed to by this path and return a file object, as - the built-in open() function does. - """ - if "b" not in mode: - encoding = io.text_encoding(encoding) -> return io.open(self, mode, buffering, encoding, errors, newline) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -E NotADirectoryError: [Errno 20] Not a directory: '/tmp/pytest-of-code/pytest-22/test_pipeline_freeze_reload_sk0/vjp.spipe/spipe.json' - -../../.local/share/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/pathlib/_local.py:537: NotADirectoryError -=========================== short test summary info ============================ -FAILED tests/controls/test_vjp_delta.py::test_pipeline_freeze_reload_skips_vjp_and_strength_does_not_stale -1 failed, 6 passed in 4.32s diff --git a/steerability/algorithms/state_control/vjp_delta/control.py b/steerability/algorithms/state_control/vjp_delta/control.py index 60c99dd3..31c5b13b 100644 --- a/steerability/algorithms/state_control/vjp_delta/control.py +++ b/steerability/algorithms/state_control/vjp_delta/control.py @@ -25,9 +25,10 @@ class VJPDelta(InterventionControl): Reference: - - VJP-delta method implementation provenance: `wassname/vjp-steering` at - `cb03382ebd0cc9cad615d169f42e68e8ae3e12a7` + - Clark, Michael J. (2026). "vjp-steering: contrastive steering vectors from + vector-Jacobian products." [https://github.com/wassname/vjp-steering](https://github.com/wassname/vjp-steering) + Adapts the [Jacobian lens](https://transformer-circuits.pub/2026/workspace/). """ Args = VJPDeltaArgs diff --git a/steerability/algorithms/state_control/vjp_delta/fit.py b/steerability/algorithms/state_control/vjp_delta/fit.py index 9879f28c..990841fa 100644 --- a/steerability/algorithms/state_control/vjp_delta/fit.py +++ b/steerability/algorithms/state_control/vjp_delta/fit.py @@ -250,20 +250,22 @@ def _fit(self, model: PreTrainedModel, tokenizer: PreTrainedTokenizerBase) -> St layout = resolve_model_layout(model) target_module = model.get_submodule(layout.layer_names[target_layer]) source_modules = {layer_id: model.get_submodule(layout.layer_names[layer_id]) for layer_id in source_ids} - try: - device = next(model.parameters()).device - except StopIteration as error: - raise ValueError("VJP-delta fitting requires a model with parameters.") from error + parameters = tuple(model.parameters()) + if not parameters: + raise ValueError("VJP-delta fitting requires a model with parameters.") + devices = {tensor.device for tensor in (*parameters, *model.buffers())} + if len(devices) != 1: + raise ValueError("VJP-delta fitting requires a single-device model; sharded or offloaded models are unsupported.") + device = devices.pop() if device.type == "meta": raise ValueError("VJP-delta fitting requires materialized model parameters, not meta tensors.") - parameters = tuple(model.parameters()) requires_grad = [parameter.requires_grad for parameter in parameters] parameter_grads = [ None if parameter.grad is None else parameter.grad.detach().clone() for parameter in parameters ] - was_training = model.training + training_flags = {module: module.training for module in model.modules()} try: model.eval() for parameter in parameters: @@ -289,7 +291,8 @@ def _fit(self, model: PreTrainedModel, tokenizer: PreTrainedTokenizerBase) -> St source_modules=source_modules, cotangent=cotangent, device=device, ) finally: - model.train(was_training) + for module, training in training_flags.items(): + module.training = training for parameter, flag, grad in zip(parameters, requires_grad, parameter_grads, strict=True): parameter.requires_grad_(flag) parameter.grad = grad From f288b06c2c57547fc324953d6e6cdb13c336342c Mon Sep 17 00:00:00 2001 From: "wassname (Michael J Clark)" <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 21:17:17 +0800 Subject: [PATCH 08/10] Implement fit_ingredients method Add fit_ingredients method to return fit inputs. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: wassname (Michael J Clark) <1103714+wassname@users.noreply.github.com> --- .../algorithms/state_control/vjp_delta/fit.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/steerability/algorithms/state_control/vjp_delta/fit.py b/steerability/algorithms/state_control/vjp_delta/fit.py index 990841fa..46985874 100644 --- a/steerability/algorithms/state_control/vjp_delta/fit.py +++ b/steerability/algorithms/state_control/vjp_delta/fit.py @@ -98,6 +98,17 @@ class VJPDeltaFit: _model_ref: weakref.ref | None = field(default=None, init=False, repr=False, compare=False) _master: SteeringVector | None = field(default=None, init=False, repr=False, compare=False) + def fit_ingredients(self) -> dict: + """Return fit inputs without memoized runtime state.""" + return { + "data": self.data, + "target_layer": self.target_layer, + "source_layer_ids": self.source_layer_ids, + "skip_first": self.skip_first, + "max_length": self.max_length, + "batch_size": self.batch_size, + } + def __post_init__(self) -> None: if not isinstance(self.data, LabeledExamples): self.data = as_labeled_examples(self.data) From 18ad0bafc5e0c28104036e7b77c42f3949324b2c Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 21:20:15 +0800 Subject: [PATCH 09/10] Clarify VJP artifact source fitting Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- steerability/algorithms/state_control/vjp_delta/args.py | 2 +- steerability/algorithms/state_control/vjp_delta/control.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/steerability/algorithms/state_control/vjp_delta/args.py b/steerability/algorithms/state_control/vjp_delta/args.py index 193afd3b..47bc4672 100644 --- a/steerability/algorithms/state_control/vjp_delta/args.py +++ b/steerability/algorithms/state_control/vjp_delta/args.py @@ -16,7 +16,7 @@ class VJPDeltaArgs(BaseArgs): """Arguments for `VJPDelta`. Args: - steering_vector: A precomputed vector or artifact source. It skips gradient extraction. + steering_vector: A precomputed `SteeringVector` skips VJP fitting. An `ArtifactSource` resolves its own artifact. data: Independent positive and negative raw prompt pools for `VJPDeltaFit`. target_layer: Target layer for the contrast. None selects `num_layers - 3`. source_layer_ids: Source layers for VJPs. None selects every layer before the target. diff --git a/steerability/algorithms/state_control/vjp_delta/control.py b/steerability/algorithms/state_control/vjp_delta/control.py index 31c5b13b..ddafc094 100644 --- a/steerability/algorithms/state_control/vjp_delta/control.py +++ b/steerability/algorithms/state_control/vjp_delta/control.py @@ -20,8 +20,9 @@ class VJPDelta(InterventionControl): per prompt before separately averaging the positive and negative classes. At generation it uses the standard additive intervention and token scopes. - A precomputed `SteeringVector` or `ArtifactSource` avoids gradient extraction. The frozen form - is `ActivationAdapter`, so a reloaded `.spipe` resolves the stored vectors without a VJP fit. + A precomputed `SteeringVector` skips VJP fitting. A supplied `ArtifactSource` resolves its own + artifact. The frozen form is `ActivationAdapter`, so a reloaded `.spipe` resolves the stored + vectors without a VJP fit. Reference: From 369b9473aaa018dbf605cb6cdd90a75659793964 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 17 Sep 2026 21:28:08 +0800 Subject: [PATCH 10/10] Remove redundant VJP fit identity override Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com> Signed-off-by: wassname <1103714+wassname@users.noreply.github.com> --- .../algorithms/state_control/vjp_delta/fit.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/steerability/algorithms/state_control/vjp_delta/fit.py b/steerability/algorithms/state_control/vjp_delta/fit.py index 46985874..990841fa 100644 --- a/steerability/algorithms/state_control/vjp_delta/fit.py +++ b/steerability/algorithms/state_control/vjp_delta/fit.py @@ -98,17 +98,6 @@ class VJPDeltaFit: _model_ref: weakref.ref | None = field(default=None, init=False, repr=False, compare=False) _master: SteeringVector | None = field(default=None, init=False, repr=False, compare=False) - def fit_ingredients(self) -> dict: - """Return fit inputs without memoized runtime state.""" - return { - "data": self.data, - "target_layer": self.target_layer, - "source_layer_ids": self.source_layer_ids, - "skip_first": self.skip_first, - "max_length": self.max_length, - "batch_size": self.batch_size, - } - def __post_init__(self) -> None: if not isinstance(self.data, LabeledExamples): self.data = as_labeled_examples(self.data)