Skip to content

Add gated GLM-5.2 bit-exact compatibility paths - #4

Draft
zrr1999 wants to merge 11 commits into
PFCCLab:mainfrom
zrr1999:glm52-bit-exact-alignment
Draft

Add gated GLM-5.2 bit-exact compatibility paths#4
zrr1999 wants to merge 11 commits into
PFCCLab:mainfrom
zrr1999:glm52-bit-exact-alignment

Conversation

@zrr1999

@zrr1999 zrr1999 commented Jul 27, 2026

Copy link
Copy Markdown

Scope

Megatron-LM local spec: LocalSpecProvider.linear() returns modelopt Linear (not TELinear) so DSA indexer / MLA down-projections can be built on the TE-off path.

  • Default TE-on: TESpecProvider.linear() still returns TELinear. Unchanged.
  • Accuracy-compatible TE-off (ms-swift patches _get_backend_spec_provider only when use_accuracy_compatible is on): LocalSpecProvider.linear() is the non-TE replicated Linear.

Evidence

  • Needed when ms-swift forces use_transformer_engine=False and _get_backend_spec_provider returns LocalSpecProvider (E-259 TE-off). Returning TELinear here would re-enter Transformer Engine on DSA/MLA down-projections.
  • Focused test (venv venvs/torch/bin/python, LD_LIBRARY_PATH with venv cuDNN first, --noconftest): tests/unit_tests/models/test_local_spec_provider_linear.py — 1 passed (linear() is Linear and is 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-pin
  • acceptance_oracle.torch-results-checkpoint-empty
  • live first remaining family: embedding.word_embeddings.weight

Not verified

  • Full DSA/MLA construction through this provider on the frozen 100-step Profile.
  • Non-UAC callers that already used get_gpt_layer_local_spec + MLA (backend.linear() was previously missing on LocalSpecProvider).

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.

1 participant