Files
wassname 5ce8a00547 qlora+bs=4 batched heal, walk-C bisection, round-loosened barrier
- QLoRA (4-bit NF4) base frees ~6GB -> train_bs=4 + grad_accum=4
  (block/Linear-level hooks survive bnb Linear4bit: add to dequantized
  output, same pattern as peft randlora/bnb.py)
- walk-C: log-kappa bisection dose controller, ~5 probes of 8 gens to
  highest kappa with >=75% filter survival, then collect to n_keep
- filter: char-level n-gram rep (catches TTTT/!!!! loops), ppl over the
  tail 25% of completion (steering collapses mid-completion)
- lam_round_pow<0 loosens the KL-to-base barrier with round
  (lam_eff=lam/sqrt(1+N)): only the cumulative-vs-fixed-anchor barrier
  self-inflates with round; per-increment spectral_lam + weight_decay
  stay flat
- alphas capped at 1.0, gen_pass_target 0.75

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-06-09 10:42:01 +08:00

54 lines
1.4 KiB
TOML

[project]
name = "steer_heal"
version = "0.1.0"
description = "Distil an activation steering vector into a LoRA, heal the incoherency with a KL-to-original barrier, then loop."
requires-python = ">=3.11"
dependencies = [
"torch",
"transformers",
"accelerate",
"datasets",
"safetensors",
"einops",
"jaxtyping",
"beartype",
"loguru",
"polars",
"tabulate",
"tyro",
"tqdm",
"numpy",
"wandb",
"plotly",
"baukit",
# wassname building blocks, vendored under docs/vendor (run `just vendor`)
"steering-lite",
"iso-kl-figure",
"tiny-mfv",
"srsly>=2.5.3",
"kaleido>=1.3.0",
"bitsandbytes>=0.49.2",
]
[tool.uv.sources]
# Editable path deps to the clones in docs/vendor (wassname's vendor pattern).
# w2schar-mini is NOT a dep (needs py3.13 + pinned flash-attn wheels); we vendor
# it for reference and copy its adapter/bake/plot modules into src/steer_heal/ws.
steering-lite = { path = "docs/vendor/steering-lite", editable = true }
iso-kl-figure = { path = "docs/vendor/isokl_steering_calibration", editable = true }
tiny-mfv = { path = "docs/vendor/tinymfv", editable = true }
baukit = { git = "https://github.com/davidbau/baukit.git" }
[tool.ruff.lint]
ignore = ["F722"] # jaxtyping shape strings
[tool.uv]
exclude-newer = "5 days"
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]