Add gated GLM-5.2 bit-exact compatibility paths - #4
Draft
zrr1999 wants to merge 11 commits into
Draft
Conversation
backend.linear() is required when DSA is built with the local (non-TE) spec. Return TELinear in duplicated mode, distinct from column-parallel.
TESpecProvider.linear stays TELinear, so the TE-on default path is unchanged. LocalSpecProvider.linear is the TE-off counterpart used when accuracy-compatible forces LocalSpecProvider for DSA/MLA down-projections.
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.
Scope
Megatron-LM local spec:
LocalSpecProvider.linear()returns modeloptLinear(notTELinear) so DSA indexer / MLA down-projections can be built on the TE-off path.TESpecProvider.linear()still returnsTELinear. Unchanged._get_backend_spec_provideronly whenuse_accuracy_compatibleis on):LocalSpecProvider.linear()is the non-TE replicated Linear.Evidence
use_transformer_engine=Falseand_get_backend_spec_providerreturnsLocalSpecProvider(E-259 TE-off). ReturningTELinearhere would re-enter Transformer Engine on DSA/MLA down-projections.venvs/torch/bin/python,LD_LIBRARY_PATHwith venv cuDNN first,--noconftest):tests/unit_tests/models/test_local_spec_provider_linear.py— 1 passed (linear() is Linearandis not TELinear).Gate state
Not accepted. Source freeze blocked. This PR's evidence is probe-class and does not advance a gate.
Blocked by
contract_environment.source-freeze-head-vs-pinacceptance_oracle.torch-results-checkpoint-emptyembedding.word_embeddings.weightNot verified
get_gpt_layer_local_spec+ MLA (backend.linear()was previously missing on LocalSpecProvider).