Skip to content

[chore][deps] Support GLM-5.2 configs - #1974

Open
bvolpato wants to merge 3 commits into
NovaSky-AI:mainfrom
bvolpato:bvolpato/transformers-5-11
Open

bvolpato wants to merge 3 commits into
NovaSky-AI:mainfrom
bvolpato:bvolpato/transformers-5-11

Conversation

@bvolpato

@bvolpato bvolpato commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add GLM-5.2 configuration support by pinning the first tested Transformers release that accepts its deepseek_sparse_attention layer type. Update PEFT and make FSDP adapter configuration serialization handle every set and enum field exposed by the newer release.

Changes

  • Pin Transformers 5.11.0 and PEFT 0.19.1.
  • Make the Transformers override apply on every platform where SkyRL depends on it.
  • Serialize nested PEFT sets and enums before adapter sync or checkpoint save.
  • Refresh the lockfile and AMD dependency manifest.

Version choice

Transformers 5.8.0 through 5.10.0 reject the 0.8B GLM-5.2 config. Versions 5.13.0 and 5.14.1 conflict with pinned Megatron Bridge through duplicate qwen3_asr registration, while 5.12.0 exposes a Torch/TorchAudio CUDA wheel mismatch during eager audio import. Version 5.11.0 loads GlmMoeDsaConfig without rewriting model configuration or expanding this PR into those separate dependency changes.

Validation

  • Post-rebase uv lock --check and full pre-commit
  • Focused FSDP, SFT, and config suite (360 passed); two Qwen VLM processor cases were omitted because torchvision is not part of selected CPU test extras
  • Direct GlmMoeDsaConfig load for inference-optimization/GLM-5.2-0.8B-A0.8B
  • Qwen3.5 CI compatibility override with Transformers 5.2.0 (26 passed)
  • Prior SkyRL Train CPU suite (1395 passed, 5 skipped, 5 deselected)
  • BF16 SDPA load and five-step LoRA update on RTX 5070 Ti (loss 12.4402 to 11.9881)
  • Combined with [feat][fsdp] Add QLoRA and Gemma 4 training support #1968, 12-step exact-model GRPO QLoRA completed rollout, backward, optimizer updates, and LoRA sync with finite gradients

Local GLM rollout used a test-only dense MLA fallback because current sparse MLA kernels reject this checkpoint's 192-wide compressed KV head on SM120. Native long-context DSA and Megatron GLM-5.2 support remain outside scope. AMD and Megatron GPU runs were not available locally.


Note

Medium Risk
Changes the PEFT pin and how adapter configs are written during FSDP checkpointing and vLLM LoRA sync; incorrect serialization would break adapter reload, though behavior is covered by a focused test.

Overview
Bumps PEFT from 0.18.1 to 0.19.1 in the root and AMD pyproject files and refreshes uv.lock.

Adds serialize_peft_config in fsdp_utils so LoRA adapter_config.json is JSON-safe under newer PEFT configs (recursive handling of enums, sets, and nested structures). FSDP checkpoint saves and inference LoRA hot-sync now call this helper instead of ad-hoc asdict plus manual task_type / peft_type / target_modules fixes.

Includes a unit test that LoraConfig with enums and module lists round-trips through json.dumps.

Reviewed by Cursor Bugbot for commit 0101bea. Bugbot is set up for automated code reviews on this repo. Configure here.

@bvolpato
bvolpato marked this pull request as ready for review August 3, 2026 19:37

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the dependency versions in pyproject.toml and docker/pyproject.amd.toml. Specifically, it upgrades transformers to version 5.11.0 (pinning it and removing platform restrictions in overrides) and updates peft from 0.18.1 to 0.19.1 across dependencies and training extras. There are no review comments, so I have no feedback to provide.

@bvolpato
bvolpato force-pushed the bvolpato/transformers-5-11 branch from 44eeae4 to 87ab3cb Compare August 4, 2026 00:37
@bvolpato
bvolpato force-pushed the bvolpato/transformers-5-11 branch 3 times, most recently from 13334fc to 61c5469 Compare August 16, 2026 15:31
@bvolpato
bvolpato force-pushed the bvolpato/transformers-5-11 branch from 61c5469 to 4bcab05 Compare August 21, 2026 00:56
@bvolpato
bvolpato force-pushed the bvolpato/transformers-5-11 branch 2 times, most recently from 78a703a to 1c82a8b Compare September 2, 2026 06:22
@bvolpato
bvolpato force-pushed the bvolpato/transformers-5-11 branch from 1c82a8b to 386d502 Compare September 9, 2026 13:38
Pin Transformers 5.11.0, first tested release accepting deepseek_sparse_attention layer types. Update PEFT for compatible adapter APIs and apply Transformers override on every platform.

Signed-off-by: bvolpato <brunocvcunha@gmail.com>
Signed-off-by: bvolpato <brunocvcunha@gmail.com>
@bvolpato
bvolpato force-pushed the bvolpato/transformers-5-11 branch from 386d502 to 21765af Compare September 12, 2026 18:21
@bvolpato
bvolpato force-pushed the bvolpato/transformers-5-11 branch from cdbbe80 to 0101bea Compare October 8, 2026 23:54

This branch has not been deployed

No deployments
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