Skip to content

Deduplicate FusedQKVLinear hooks and add HF adapter tests - #3728

Merged
tianyu-l merged 1 commit into
pytorch:mainfrom
sdmyzlp:br_update_fused_qkv
Jun 23, 2026
Merged

tianyu-l merged 1 commit into
pytorch:mainfrom
sdmyzlp:br_update_fused_qkv

Conversation

@sdmyzlp

@sdmyzlp sdmyzlp commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Deduplicate weight/bias split and merge logic in
_merge_qkv_on_load and _split_qkv_on_save by iterating over ("weight", 4) and ("bias", 3) pairs.

Add test_hf_adapter_roundtrip verifying HF adapter consumes hook-produced wq/wk/wv keys correctly for both llama3 and qwen3 fused debug models.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 21, 2026
@pytorch-bot

pytorch-bot Bot commented Jun 21, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@fegin

fegin commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Please fix CI errors.

Deduplicate weight/bias split and merge logic in
_merge_qkv_on_load and _split_qkv_on_save by iterating over
("weight", 4) and ("bias", 3) pairs.

Add test_hf_adapter_roundtrip verifying HF adapter consumes
hook-produced wq/wk/wv keys correctly for both llama3 and qwen3
fused debug models.
@sdmyzlp
sdmyzlp force-pushed the br_update_fused_qkv branch from 442be91 to 4cf5564 Compare June 23, 2026 01:50
@tianyu-l
tianyu-l merged commit 6392a5d into pytorch:main Jun 23, 2026
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants