Skip to content

Expose generalized projection params in attention_pair_bias wrapper - #293

Merged
jomitchellnv merged 5 commits into
mainfrom
bio-913-pair-fwd-bwd
Jul 21, 2026
Merged

Expose generalized projection params in attention_pair_bias wrapper#293
jomitchellnv merged 5 commits into
mainfrom
bio-913-pair-fwd-bwd

Conversation

@Supernova-45

@Supernova-45 Supernova-45 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extends the Torch attention_pair_bias wrapper to expose the generalized backend API:

  • Adds optional K/V and gating biases plus projected Q/K LayerNorm parameters.
  • Supports cached projected pair inputs without requiring w_proj_z.
  • Imports the backend op from the public cuequivariance_ops_torch API instead of its internal module path.
  • Updates the public docs, changelog, and regression coverage.

Torch only; there is no JAX counterpart. This requires a backend release with the generalized attention_pair_bias signature.

Validation

  • pytest cuequivariance_torch/tests/primitives/triangle_test.py -q — 7 passed
  • pre-commit run --all-files — passed

Checklist

Supernova-45 and others added 5 commits July 15, 2026 22:57
Expose the optional generalized (Proteina/Complexa) projection parameters of the backend attention_pair_bias op as keyword-only arguments on the cuet frontend wrapper: b_proj_k, b_proj_v, w_ln_q/b_ln_q, w_ln_k/b_ln_k, and b_proj_g. They default to None, so the strict OpenFold3/Boltz contract applied to single_repr is unchanged; supplying them adds the K/V/gate projection biases and the post-projection Q/K LayerNorm (over the full H*DH dimension, before the head split).

- primitives/triangle.py: add the 7 keyword-only params, document them, and forward them to the backend.
- tests/primitives/triangle_test.py: add a case asserting the generalized params are forwarded (output differs from the strict call).
- CHANGELOG.md, SKILL.md: document the new optional params.

Depends on the backend generalization (kernelcatcher !530) being merged and a new cuequivariance_ops_torch wheel published; public CI installs the released backend wheel, so this cannot go green until then. Torch-only; there is no JAX cuex.attention_pair_bias counterpart.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Alexandra Kim <alexandrak@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@jomitchellnv
jomitchellnv merged commit 1d6fb6a into main Jul 21, 2026
18 checks passed
@Supernova-45 Supernova-45 self-assigned this Jul 21, 2026
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.

2 participants