mirror of
https://github.com/wassname/steer-heal-love.git
synced 2026-06-27 16:47:16 +08:00
scaffold steer_heal: spec, repo infra, vendored deps
Setup per setup-repo conventions: uv + justfile + fast-dev-run on wassname/qwen3-5lyr-tiny-random, package under src/steer_heal (config + pipeline skeleton). Stages fail fast with NotImplementedError pointing at the docs/vendor module to port from. Design in spec.md: distil a steering-lite mean-diff teacher vector (iso-KL dosed) into a conditioned LoRA, heal incoherency with a KL-rev-to-original barrier, fold each round via w2schar gated bake, eval on tinymfv. Three uncertainty gates (filter / heal / iterate) each with a UAT artifact. Base model google/gemma-3-1b-it (RTX 3090, 24GB). Reference repos vendored under docs/vendor (gitignored): steering-lite, isokl, tinymfv, w2schar-mini. The lighter three are editable path deps; w2schar (py3.13 + flash-attn) is reference-only, we copy its adapter/bake/plot modules. Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
set shell := ["bash", "-cu"]
|
||||
|
||||
BASE := "uv run python -m steer_heal.run"
|
||||
SEEDS_3 := "41 42 43"
|
||||
|
||||
# List available recipes
|
||||
default:
|
||||
@just --list
|
||||
|
||||
# Clone the vendored reference repos (editable path deps live here).
|
||||
vendor:
|
||||
#!/usr/bin/env bash
|
||||
set -eux
|
||||
mkdir -p docs/vendor && cd docs/vendor
|
||||
for r in steering-lite isokl_steering_calibration tinymfv w2schar-mini; do
|
||||
[ -d "$r" ] || git clone --depth 1 "https://github.com/wassname/$r"
|
||||
done
|
||||
|
||||
# fast-dev-run: ONE end-to-end run of the real pipeline on the tiny-random model.
|
||||
# Real LLM, real eval, real I/O; only knob is scale. NOT a unit test.
|
||||
fast-dev-run *ARGS:
|
||||
BEARTYPE=1 {{ BASE }} --fast-dev-run {{ ARGS }}
|
||||
|
||||
# Real run on gemma-3-1b-it (24GB / RTX 3090). Set flash-attn first if installed.
|
||||
run *ARGS:
|
||||
STEER_ATTN_IMPL=eager {{ BASE }} {{ ARGS }}
|
||||
|
||||
# Queue sweeps (comment out completed; `just results` to check).
|
||||
queue:
|
||||
#!/usr/bin/env bash
|
||||
set -x
|
||||
just sweep-reg
|
||||
|
||||
# H: kl_rev heals best (mode-seeking suppresses low-base-prob = incoherent tokens).
|
||||
sweep-reg:
|
||||
#!/usr/bin/env bash
|
||||
set -x
|
||||
export WANDB_RUN_GROUP="sweep-reg-$(date +%Y%m%d-%H%M)"
|
||||
for seed in {{ SEEDS_3 }}; do
|
||||
for reg in nll kl_fwd kl_rev wd; do
|
||||
echo "=== reg=$reg seed=$seed ==="
|
||||
{{ BASE }} --reg=$reg --seed=$seed
|
||||
done
|
||||
done
|
||||
|
||||
# flash-attn: install a prebuilt wheel (see `flash-attn-prebuilt` skill), then
|
||||
# run with STEER_ATTN_IMPL=flash_attention_2.
|
||||
Reference in New Issue
Block a user