Repository navigation
TP oracle test: read Phi3 head_dim from the config (tiny repo now sets head_dim 8) - #18101
Merged
Merged
Conversation
…ow sets head_dim 8)
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
tests/test_tp_native_oracle.pyfails on main in the CPUrestshard (seen on the staging run of #18003, reproduces on main):Cause
No Unsloth change.
trl-internal-testing/tiny-Phi3ForCausalLM-3has a new revision whose config setshead_dim: 8next tohidden_size: 8and 4 heads (the previous revision had nohead_dim). The fusedqkv_projweight is now[64, 8], so its parts really are(4 * 8, 2 * 8, 2 * 8) = (32, 16, 16), which is what the TP plan derives. The tests computed the head size ashidden_size // num_attention_heads = 2, which only held for the old config.The plan is right, and the packed-plan test's logits check still matches the unsharded model with the new shapes, so tensor parallel handles a head_dim that is not
hidden_size // heads.Fix
A
_head_dim(text)helper reads the config'shead_dimand falls back tohidden_size // num_attention_headswhen it is unset, so both repo revisions give the right expectation. Both call sites use it.Verification