Files
jsteer/pyproject.toml
wassnameandClaudypoo ed7fa92996 nbs: steering_demo.py -- shared marimo notebook, all 7 methods + comparison table
One generically-named notebook (replaces persona-named ones): loads model+lens once,
builds all 7 steering vectors (word/persona_vector/topk/soft/pinv/meandiff/random-null)
with the j-thoughts lens readout, then loads precomputed results and shows a per-method
generation dropdown + comparison table.

Heavy 7-method sweep (~18 min) runs headless via scripts/scratch/run_steering_demo.py ->
artifacts/steering_demo_results.json, because marimos single-threaded kernel makes a long
in-cell compute un-monitorable (any status poll interrupts it). Notebook loads the JSON so
it renders instantly. Result (dilemma, P(YES=lie)): flat ~0.03-0.14 at every methods
coherent edge vs 0.107 baseline; persona_pinv widest window (C*+ = +1.19). Includes the
GPT-5.6-terra comment review (docs/reviews/).

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-07-12 11:39:08 +08:00

45 lines
1.6 KiB
TOML

[project]
name = "jsteer"
version = "0.1.0"
description = "Fit a model's full Jacobian once (jlens), then steer any word or persona (steering-lite runtime). repeng-style UX for Jacobian pullback steering."
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
dependencies = [
"torch>=2.1",
"transformers>=4.51",
"accelerate>=1.6",
"jlens", # the researchers' verified Jacobian estimator + cache format
"steering-lite", # hook runtime: Vector, attach, `with v(model, C=...)`, calibrate
"loguru>=0.7",
"tqdm>=4.66",
"tabulate>=0.9", # Claude: steering_lite.calibrate imports it at module load (undeclared in its core deps)
]
[project.optional-dependencies]
notebooks = ["matplotlib>=3.8", "ipykernel", "tabulate", "nbformat", "nbconvert"]
test = ["pytest"]
[tool.uv.sources]
# Claude: switched from git to local editable path deps. The jlens git source
# (github.com/anthropics/jacobian-lens) is not a fetchable public repo, and both
# deps live locally under active co-development, so editable paths are correct
# for this dev machine. Revert to git sources when publishing.
jlens = { path = "../j-steer-dev/docs/vendor/jacobian-lens", editable = true }
steering-lite = { path = "../../lite/steering-lite", editable = true }
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[dependency-groups]
dev = [
"ipykernel>=7.3.0",
"ipywidgets>=8.1.8",
"datasets>=2.0", # jlens.examples.load_wikitext_prompts: the fitting corpus for fit.py
"marimo>=0.23.13",
]
[tool.setuptools]
packages = ["jsteer"]