Skip to content

Split Q/K/V inputs with per-head attention results#1257

Merged
jlarson4 merged 7 commits intodev-3.x-canaryfrom
bug/position-embeddings-attention-bridge-fix
Apr 16, 2026
Merged

Split Q/K/V inputs with per-head attention results#1257
jlarson4 merged 7 commits intodev-3.x-canaryfrom
bug/position-embeddings-attention-bridge-fix

Conversation

@jlarson4
Copy link
Copy Markdown
Collaborator

Description

BlockBridge.hook_aliases declared hook_q_input/hook_k_input/hook_v_input/hook_attn_in (pointing at the attention bridge), and AttentionBridge declared these as HookPoint attributes — but nothing fired them. The aliases resolved to a HookPoint, satisfying Tier 1 resolution checks, yet forward bypassed them entirely. Patches at those hooks had zero effect on logits.

This PR makes the hooks live on their intended path. The feature is opt-in via config flags, and when the flags are off the code flows through the existing simple path unchanged. Pure superset, no regression risk for existing callers.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

@jlarson4 jlarson4 merged commit 9f1fabe into dev-3.x-canary Apr 16, 2026
21 checks passed
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