Skip to content

feat(intervene): read the steering direction from Results (composable…#112

Merged
alirezabayatmk merged 1 commit into
mainfrom
feat/results-driven-intervene
Jul 8, 2026
Merged

feat(intervene): read the steering direction from Results (composable…#112
alirezabayatmk merged 1 commit into
mainfrom
feat/results-driven-intervene

Conversation

@alirezabayatmk

Copy link
Copy Markdown
Member

Summary 📝

Makes activation steering and ablation composable: Intervene can read its direction from Results at run time, so deriving a direction and applying it is one pipeline instead of two with a manual hand-off.

Details

  1. Intervene gets direction_key / mode / alpha: when direction_key is set it reads the SteeringResult an upstream step wrote and builds a steer or ablate intervention at run time. The fn= API is unchanged (backward compatible).
  2. direction_key is added to the step's reads, so a pipeline that forgets to produce the direction fails pre-flight with a clear KeyError instead of silently generating without the intervention.

Checks

  • Tested Changes: Verified on GPT-2, Llama-2-13B, GPT-J-6B, Qwen2.5-7B, and Pythia-1.4b.

@alirezabayatmk alirezabayatmk force-pushed the feat/results-driven-intervene branch from 2057b18 to 6c8a081 Compare July 8, 2026 19:04
@alirezabayatmk alirezabayatmk merged commit 1484f70 into main Jul 8, 2026
5 checks passed
@alirezabayatmk alirezabayatmk deleted the feat/results-driven-intervene branch July 8, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant