rename: post_mlp -> post_block hook point (mechanical, no behavior change)#175
Draft
maxsloef-goodfire wants to merge 1 commit into
Draft
Conversation
…ange) Token-level rename across code, tests, docs, and examples. The hook fires after the mlp() call in program order, but in deferred-residual architectures the captured/steered `residual` does not yet include the MLP contribution (the add happens in the NEXT layer's fused add+norm) -- so 'post_mlp' misdescribes the dataflow. 'post_block' names the position in the layer, not a dataflow claim. No functional change: same tensors captured/steered as before. The semantic correction (capturing the true block output, residual + hidden) is stacked on top of this PR. Clients sending 'post_mlp' in capture specs must switch to 'post_block' (pre-release branch; no alias kept). Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mechanical token rename:
post_mlp→post_blockacross code, tests, docs, and examples (126 files). No behavior change — same tensors captured and steered as before.Why: the hook fires after the
mlp()call in program order, but in deferred-residual architectures theresidualit sees does not yet include the MLP contribution (the add happens inside the next layer's fused add+norm) — so at this hook pointpost_mlpis byte-identical topost_attnand the name misdescribes the dataflow.post_blocknames the position in the layer rather than making a dataflow claim.This is PR 1 of a stack — the semantic correction (actually capturing the true block output
residual + hidden_states, plus capture-path fixes and features) is in #174, which is rebased on top of this branch. Reviewing this one is just confirming the rename is mechanical; the substantive diff in #174 is then only ~60 files.API note: capture specs sending
"post_mlp"must switch to"post_block"(pre-release branch; no alias kept — happy to add a deprecation alias if you'd prefer).🤖 Generated with Claude Code