Bug/bridge hook gating followups - #1724
Merged
Merged
Conversation
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.
Description
add_hooknow skips gated-off hook points and warns naming them, instead of silently attaching hooks that never fire.MoERouterBridgefireshook_expert_weightsandhook_expert_indicesinHookedTransformer's[tokens, num_experts]layout, scattering top-k weights in and gathering them back so edits still reach HuggingFace.blocks.N.mlp.hook_expert_*resolves onto the router submodule, so code migrated fromHookedTransformerfinds the hooks under the legacy names.mlp.hook_expert_indicesandmlp.hook_expert_weightsexemptions are removed now that both hooks exist.encoder_blocksanddecoder_blocksas one index space and resolve the decoder'sself_attn, so all eight stacked properties work on T5 instead of raisingAttributeError.all_head_labelsemits the EL/DL scheme derived from real block counts, replacing a list that named only half the heads.-BERT pooler – the adapter wraps the pooler module rather than its inner Linear, so hook_out carries the post-tanh pooled [CLS] that
HookedEncoderexposes ashook_pooler_out.BertPoolerBridgealiaseshook_pooler_outontohook_outfor migrated code.to_sentence_pair_tokensandpredict_next_sentencepair-tokenize two strings and own thetoken_type_idsplumbing that callers otherwise forget.encoder_outputruns the audio encoder from precomputed frames, bypassing the convolutional front end while leaving thestart_at_layerguard intact.n_key_value_headsagainst their own fixture's input are deleted.Type of change
Checklist: