Skip to content

Release v3.7.1 - #1643

Merged
jlarson4 merged 3 commits into
mainfrom
dev
Aug 11, 2026
Merged

Release v3.7.1#1643
jlarson4 merged 3 commits into
mainfrom
dev

Conversation

@jlarson4

Copy link
Copy Markdown
Collaborator

Description

  • Fix issue with Bloom residual branch hook semantics
  • Fix issue with Phi-3 support for explicit head_dim

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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

physicsrob and others added 3 commits August 10, 2026 09:34
Valid Phi3ForCausalLM configs may set head_dim independently of
hidden_size // num_attention_heads; HF sizes the fused qkv_proj as
(n_heads + 2 * n_kv_heads) * head_dim. The generic config mapper already
maps explicit head_dim to cfg.d_head, but Phi3ArchitectureAdapter
re-derived d_head = d_model // n_heads in both its
weight_processing_conversions split sizes and the live _split_phi3_qkv
path, so bridge construction crashed in torch.split for such models
(e.g. hidden_size=8192, 57 heads, head_dim=64 -> split_with_sizes
expected [3648, 3648, 3648] rows but computed [8151, 8151, 8151]).

Use cfg.d_head in both places. Models without an explicit head_dim keep
the derived d_model // n_heads value via the existing mapper fallback.

Tests: adapter unit tests with d_head deliberately decoupled from
d_model // n_heads (MHA and GQA), mapper-precedence unit tests for
explicit head_dim vs the derived fallback, and network-free integration
tests booting tiny explicit-head_dim Phi-3 models end-to-end with HF
eager logit parity.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@jlarson4
jlarson4 merged commit 4194e13 into main Aug 11, 2026
73 of 75 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.

3 participants