Intervention API¶
Intervention points declared on a PyTorch model in Caliper LIB let the viewer ablate, scale, steer and patch at step boundaries, with each intervention recorded with the run and compared with the original.
| Field | Value |
|---|---|
| ID | INT-10 |
| Status | Planned |
| Scope | Core |
| Pillar | Interpretability and Interventions |
| Sprint | 6 |
| Depends On | Interventions and the Inspector (INT-20)J-Space Interventions ( INT-32)Run Comparison ( RUN-05) |
| Unblocks | Scale (INT-12)Steer ( INT-13)Patch ( INT-14)MLX Support ( INT-18)JAX Support ( INT-19)Interventions from the Viewer ( INT-21)nnsight and TransformerLens Adapters ( INT-22)Interventions in the Trace Pane ( INT-33) |
| Docs | None |
| Branches | None |
| Design | Roadmap, Streaming and embedding |
Coverage Ledger¶
- Branch
sprint2-pyctl2, 1 commit, 6a86cf8c; the other 16 are on main. A roadmap edit that marks the controls of wire protocol 3.1 as done through caliper.serve() and the hub on both senders, with interventions on a model as the next step. - design/gpu-programs.md, under Interventions. The first intervention, ablate, sets a module's output or one head to zero at a step boundary.
- design/gpu-programs.md, under Intervention Points. Each module is an intervention point, and an attention module with a head count also gives one point for each head.
- design/gpu-programs.md, under Intervention Commands. The commands intervene.points, intervene.set, intervene.clear and intervene.list act on the attached script.
- design/gpu-programs.md, under Intervention Errors. The intervention commands answer with fixed error codes.
- design/gpu-programs.md, under Intervention Lifetime. Interventions end when no viewer with the control permission stays connected for the linger time.
- design/roadmap.md, under MCP. Use: running interpretability experiments automatically through the inspector's intervention API.
- design/roadmap.md, under Streaming and embedding. Still to do 1: interventions on a model, such as ablating a head or steering, after the controls of 3.1; they come with the inspector work.
- Pull request #14. Follow-up recorded in pull request 14, not done. Interventions on a model (ablating a head, steering a direction), with the inspector work.
- Orchestrators' notes,
sprint2/PR.md. Follow-up: interventions on a model, ablating a head and steering a direction, with the inspector work.