fix(causal): Harden clamp residuals and add resume notebook#8
fix(causal): Harden clamp residuals and add resume notebook#8DaviBonetto merged 1 commit intomainfrom
Conversation
Protect long Colab sweeps from tiny float residuals in the discrete_A clamp and add a resumable notebook flow for partially completed Table 3 runs. - compute discrete_A rho in float64 and apply follow-up correction when post-clamp rho still overshoots by epsilon - cover the residual-overshoot path with a regression test - add a dedicated resume notebook that syncs the branch, reuses checkpoint CSVs, and saves progress after each threshold
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughIntroduces a resumable Jupyter notebook for causal intervention sweeps that reads from checkpoints and refines rho-clamping logic with multi-pass refinement, improved overshoot handling, and dtype preservation in discrete activations. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Setup as Environment<br/>Setup
participant Repo as Repo<br/>Manager
participant Model as Model<br/>Loader
participant Checkpoint as Checkpoint<br/>Handler
participant Prompt as Prompt<br/>Miner
participant Protocol as Protocol<br/>Executor
participant Output as Consolidator
User->>Setup: Initialize notebook
Setup->>Setup: Install deps, prepare workspace
User->>Repo: Locate/clone repo & script
Repo->>Repo: Handle manual override if needed
User->>Model: Load model + tokenizer
Model->>Model: Move to CUDA, set padding token
User->>Checkpoint: Read existing CSVs
Checkpoint->>Checkpoint: Determine completed targets
User->>Prompt: Mine validated prompts
Prompt->>Prompt: Cache per-seed results
User->>Protocol: Execute sweep resume
Protocol->>Checkpoint: Iterate seeds & targets
Protocol->>Prompt: Generate prompts
Protocol->>Protocol: Evaluate accuracy per rho
Protocol->>Checkpoint: Write results to CSVs
User->>Output: Validate & consolidate
Output->>Output: Aggregate results, create summary
Output->>User: Display final paths & stats
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Protect long Colab sweeps from tiny float residuals in the discrete_A clamp and add a resumable notebook flow for partially completed Table 3 runs.
compute discrete_A rho in float64 and apply follow-up correction when post-clamp rho still overshoots by epsilon
cover the residual-overshoot path with a regression test
add a dedicated resume notebook that syncs the branch, reuses checkpoint CSVs, and saves progress after each threshold
Summary by CodeRabbit
New Features
Bug Fixes
Tests