Skip to content

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

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

[chore][deps] Support GLM-5.2 configs#1974
bvolpato wants to merge 2 commits into
NovaSky-AI:mainfrom
bvolpato:bvolpato/transformers-5-11

Conversation

@bvolpato

@bvolpato bvolpato commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pin Transformers 5.11.0, first tested release that accepts GLM-5.2 deepseek_sparse_attention layer types
  • bump PEFT to 0.19.1 for compatible adapter APIs
  • serialize all PEFT set and enum fields before FSDP adapter sync or checkpoint save
  • make Transformers uv override unconditional because SkyRL depends on it on every platform
  • refresh lockfile and AMD dependency manifest

Why 5.11.0 instead of latest

This PR intentionally stops at 5.11.0:

  • 5.8.0, 5.9.0, and 5.10.0 reject the 0.8B GLM-5.2 config during validation
  • 5.11.0 loads GlmMoeDsaConfig without rewriting model config
  • 5.13.0 and 5.14.1 conflict with pinned Megatron Bridge because both register qwen3_asr
  • 5.12.0 adds an eager Transformers audio import that exposes a CUDA-version mismatch between current Torch and TorchAudio wheels

Keeping first compatible release makes GLM config support available without bundling Megatron Bridge or CUDA wheel-source changes. Wider version ranges can follow once those conflicts are resolved.

Validation

  • uv lock --check
  • pre-commit: Ruff, Black, secret scan
  • focused FSDP/LoRA and SFT config tests: 58 passed
  • SkyRL train/backend CPU suite: 1,395 passed, 5 skipped, 5 deselected
  • upstream CI: CPU, code quality, SkyRL Train, and SkyRL Gym passed on previous head
  • Qwen3.5 CI compatibility override: 26 passed with --with transformers==5.2.0
  • exact inference-optimization/GLM-5.2-0.8B-A0.8B BF16 SDPA load on RTX 5070 Ti
  • LoRA update on fixed 32-token batch: loss 12.4402 to 11.9881 over five steps
  • combined with [feat][fsdp] Add QLoRA and Gemma 4 training support #1968, 10-step SkyRL FSDP LoRA SFT reduced loss monotonically from 12.4953 to 11.3287; every gradient was finite
  • combined with [feat][fsdp] Add QLoRA and Gemma 4 training support #1968, two-step colocated GLM GRPO completed vLLM rollout, reward, advantage, FSDP backward, optimizer, and LoRA sync on one RTX 5070 Ti
    • absolute advantages: 0.7070, 0.7071
    • gradient norms: 0.0418, 0.0448
    • all six q_a_proj LoRA-B matrices became nonzero
    • post-update vLLM adapter sync completed after both steps
  • combined with [feat][fsdp] Add QLoRA and Gemma 4 training support #1968, 10-step Gemma 4 E2B SkyRL QLoRA SFT reduced loss monotonically from 17.6720 to 0.0127; every gradient was finite

The local GLM rollout used a test-only vLLM dense MLA fallback because current sparse MLA kernels reject this checkpoint's 192-wide compressed KV head on SM120. At smoke-test sequence lengths below the model's index_topk=2048, dense MLA attends the same complete prefix. Native long-context DSA support remains separate vLLM work and is not claimed by this PR.

Megatron GPU and AMD runs were not available locally. Megatron-native GLM-5.2 support remains separate from this config/FSDP prerequisite.

  • Combined with [feat][fsdp] Add QLoRA and Gemma 4 training support #1968, a 12-step exact-model GRPO QLoRA run completed on one 16 GB RTX 5070 Ti. Every step had nonzero GRPO advantages and gradients, then synchronized updated adapters back to vLLM. Mean toy reward increased from 0.6938 over steps 1-4 to 0.7147 over steps 9-12, with expected sampling noise. Dense MLA required generator.inference_engine.enable_prefix_caching=false because vLLM v0.23 compressed-cache gather kernels only accept head widths 320 or 576, not this model’s 192.

@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.

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.
@bvolpato
bvolpato force-pushed the bvolpato/transformers-5-11 branch from 44eeae4 to 87ab3cb Compare August 4, 2026 00:37
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