Skip to content

Comments

Move LoRA out of experimental section#1440

Merged
willccbb merged 6 commits intomainfrom
will/lora-not-experimental
Dec 17, 2025
Merged

Move LoRA out of experimental section#1440
willccbb merged 6 commits intomainfrom
will/lora-not-experimental

Conversation

@willccbb
Copy link
Member

@willccbb willccbb commented Dec 17, 2025

Move LoRA config out of "experimental" section


Note

Moves LoRA config from model.experimental.lora to model.lora and updates trainers, validators, weight broadcast/checkpointing, and example configs accordingly.

  • Config:
    • Remove ExperimentalConfig; add top-level model.lora: LoRAConfig | None in ModelConfig.
    • Update validators to reference model.lora (adapter saving, NCCL/adapter-only checks).
  • Model/Trainer:
    • Apply LoRA via config.lora in setup_model before FSDP.
    • RL flow: auto_setup_lora now reads trainer.model.lora; sets adapter-only broadcast and inference LoRA settings.
    • RL/SFT train: pass config.model.lora to checkpoint/broadcast setup.
  • Configs:
    • Replace [trainer.model.experimental.lora] with [trainer.model.lora] across configs/... and examples/... TOMLs.
  • Docs:
    • Add CHANGELOG entry documenting the move from model.experimental.lora to model.lora.

Written by Cursor Bugbot for commit 9758514. This will update automatically on new commits. Configure here.

Signed-off-by: will brown <williambrown97@gmail.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Checkpoint setup uses removed LoRA config

setup_ckpt_managers is still called with config.model.experimental.lora, but ExperimentalConfig no longer defines lora after this change. This makes config.model.experimental.lora raise an AttributeError at runtime and can prevent RL/SFT training from starting when checkpoint managers are initialized.

src/prime_rl/trainer/rl/train.py#L96-L99

logger.info(f"Initializing checkpoint managers ({config.ckpt})")
ckpt_manager, weight_ckpt_manager = setup_ckpt_managers(
config.output_dir, config.ckpt, config.model.experimental.lora
)

Fix in Cursor Fix in Web


@willccbb willccbb requested a review from samsja December 17, 2025 06:08
@willccbb willccbb merged commit e259535 into main Dec 17, 2025
6 checks passed
mikasenghaas added a commit that referenced this pull request Dec 17, 2025
* Move LoRA out of experimental section (#1440)

* Add Bug Bot instructions for changelog enforcement (#1441)

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

* duplicate chat completinos endpoint into /generate

* serve chat with token in functionality

* use field to avoid misleading warning

* nicer error msg

* lock feature branch

* make use tokens prompt configurable

* use setter and print info

* bump

* include inference

* do not print warning log (logs all the time)

* bump

* bump + bring back warning log

* bump vf

* bump vf

* use dp=6 in wordle example

* no deepcopy and no warning

* do not tokenize on the server

* add field names so that tokens is cached and no warning of unrecognized field is shown

* bump vf

* auto install

* bump vf

* bump vf + set vllm tokenize method

* skip applying chat template

* Revert "skip applying chat template"

This reverts commit 43c6a2b.

* Revert "do not tokenize on the server"

This reverts commit 9182191.

* bring back log

* use route /v1/chat/completions/tokens

* fix log

* bump vf and make everything configurable

* bump and more informative log

* bump and make non-exact tokenization default

* use token prompts by default

* remove retokenization issue from docs

* rename class

* bump vf

* fix auto asc setup for lora

* bump vf

* bump vf

* bump vf

* bring back setter

* bump vf

* bump vf to latest prime-rl

* make custom routes v0.12.0 compatible

* monkey patch api server worker proc again to enable multi api server mode

---------

Co-authored-by: will brown <williambrown97@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
samsja pushed a commit that referenced this pull request Dec 18, 2025
* dont use enum setter for logprobs mode

* fix: stale imports

* update to torch 2.9

* init_app_state doesnt take vllm config anymore somehow

* use runnable because of CUDAGraphWrapper

* vllm now uses default seed 0

* fix import

* moe venv

* use mjun flash attn for torch 2.9 and up vllm version

* Revert "moe venv"

This reverts commit 8934ceb.

* remove some todos

* remove unused import

* Apply suggestions from code review

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

* set very high max cpu loras to patch around areal lora hack

* make flash attn optional and put uv sync extras everywhere

* Integrate token-in route with vLLM v0.12.0 (#1444)

* Move LoRA out of experimental section (#1440)

* Add Bug Bot instructions for changelog enforcement (#1441)

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

* duplicate chat completinos endpoint into /generate

* serve chat with token in functionality

* use field to avoid misleading warning

* nicer error msg

* lock feature branch

* make use tokens prompt configurable

* use setter and print info

* bump

* include inference

* do not print warning log (logs all the time)

* bump

* bump + bring back warning log

* bump vf

* bump vf

* use dp=6 in wordle example

* no deepcopy and no warning

* do not tokenize on the server

* add field names so that tokens is cached and no warning of unrecognized field is shown

* bump vf

* auto install

* bump vf

* bump vf + set vllm tokenize method

* skip applying chat template

* Revert "skip applying chat template"

This reverts commit 43c6a2b.

* Revert "do not tokenize on the server"

This reverts commit 9182191.

* bring back log

* use route /v1/chat/completions/tokens

* fix log

* bump vf and make everything configurable

* bump and more informative log

* bump and make non-exact tokenization default

* use token prompts by default

* remove retokenization issue from docs

* rename class

* bump vf

* fix auto asc setup for lora

* bump vf

* bump vf

* bump vf

* bring back setter

* bump vf

* bump vf to latest prime-rl

* make custom routes v0.12.0 compatible

* monkey patch api server worker proc again to enable multi api server mode

---------

Co-authored-by: will brown <williambrown97@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>

---------

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Co-authored-by: Mika Senghaas <mail@mikasenghaas.de>
Co-authored-by: will brown <williambrown97@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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