Skip to content

[tinker] 7/n towards Kimi K2.6: apply client LoRA config before config validation - #2029

Merged
erictang000 merged 1 commit into
NovaSky-AI:mainfrom
casper-hansen:casper/kimi-7-tinker-lora-config
Aug 19, 2026
Merged

[tinker] 7/n towards Kimi K2.6: apply client LoRA config before config validation#2029
erictang000 merged 1 commit into
NovaSky-AI:mainfrom
casper-hansen:casper/kimi-7-tinker-lora-config

Conversation

@casper-hansen

Copy link
Copy Markdown
Contributor

What

Injects the client-requested LoRA rank/alpha into the override dict passed to from_cli_overrides instead of assigning them onto the config afterwards (client wins over backend_config, matching the previous post-assignment semantics).

Why

create_lora_training_client requests were rejected whenever the backend config enables trainer.policy.model.fake_int4_qat: TrainerConfig.__post_init__ validated fake_int4_qat against the default lora.rank=0 and raised "fake_int4_qat requires LoRA" even for LoRA clients, because the client's rank/alpha arrived after validation.

Part of the Kimi K2.x series (follow-up to #1862). Independent of the other PRs in the series.

Made with Cursor

…g validation

create_lora_training_client requests were rejected whenever the backend
config enables trainer.policy.model.fake_int4_qat: the client's LoRA
rank/alpha were assigned onto the config *after* from_cli_overrides, so
TrainerConfig.__post_init__ validated fake_int4_qat against the default
lora.rank=0 and raised "fake_int4_qat requires LoRA" even for LoRA
clients. Inject rank/alpha into the override dict (client wins over
backend_config, matching the previous post-assignment semantics) so
validation sees the real rank.

Co-authored-by: Cursor <cursoragent@cursor.com>

@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 modifies skyrl/backends/skyrl_train_backend.py to apply LoRA rank and alpha configurations to the user_overrides dictionary before instantiating SkyRLTrainConfig via from_cli_overrides. This ensures that post-initialization validation checks, such as verifying that fake_int4_qat.enabled requires lora.rank > 0, are executed correctly. There are no review comments, so I have no feedback to provide.

@erictang000
erictang000 merged commit 9719b4f into NovaSky-AI:main Aug 19, 2026
5 of 7 checks passed
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.

2 participants