mirror of
https://github.com/wassname/jsteer.git
synced 2026-10-30 09:20:18 +08:00
Ported from the verified j-steer-dev experiment (word pullback beat random on 3/5 moral foundations, Qwen3-4B n=3). jacobian.py wraps jlens fit/save/ load and derives steering vectors by CPU matvec against the cached J; vjp.py is the one-backward parity path; applies.py registers the methods and delivery modes into steering-lite. Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
32 lines
955 B
TOML
32 lines
955 B
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",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
notebooks = ["matplotlib>=3.8", "ipykernel", "tabulate"]
|
|
test = ["pytest"]
|
|
|
|
[tool.uv.sources]
|
|
jlens = { git = "https://github.com/anthropics/jacobian-lens" }
|
|
steering-lite = { git = "https://github.com/wassname/steering-lite" }
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools]
|
|
packages = ["jsteer"]
|