[codex] Add synchronous ES LoRA trainer#2447
Closed
Matthew-agi wants to merge 12 commits into
Closed
Conversation
added 12 commits
May 8, 2026 11:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a synchronous ES-LoRA trainer as a peer trainer path under
prime_rl.trainer.es, plus aneslauncher/config surface.The trainer:
This intentionally reuses the pieces ES needs from Prime-RL: config parsing, launch/process handling, torch distributed rank setup, env wrappers, client/admin clients, LoRA adapter serialization, logging, checkpoints, and monitors. It does not pull in SFT CE loss, optimizer, FSDP training, gradient scaling, or RL orchestrator async weight-update machinery.
Validation
Local macOS:
uv tool run ruff check packages/prime-rl-configs/src/prime_rl/configs/es.py src/prime_rl/entrypoints/es.py src/prime_rl/trainer/es tests/unit/train/es/test_candidates.py tests/unit/test_configs.pyuv tool run ruff format --check packages/prime-rl-configs/src/prime_rl/configs/es.py src/prime_rl/entrypoints/es.py src/prime_rl/trainer/es tests/unit/train/es/test_candidates.py tests/unit/test_configs.pygit diff --checkPrime Intellect A6000 smoke box:
uv run ruff check packages/prime-rl-configs/src/prime_rl/configs/es.py src/prime_rl/entrypoints/es.py src/prime_rl/trainer/es tests/unit/train/es/test_candidates.py tests/unit/test_configs.pyuv run ruff format --check packages/prime-rl-configs/src/prime_rl/configs/es.py src/prime_rl/entrypoints/es.py src/prime_rl/trainer/es tests/unit/train/es/test_candidates.py tests/unit/test_configs.pyuv run pytest tests/unit/train/es/test_candidates.py tests/unit/test_configs.py -q(79 passed)uv run es @ configs/debug/es/train.toml --dry-runPrimeIntellect/Qwen3-0.6B+ dynamic LoRA loading:/home/ubuntu/es-smoke-output/adapter/adapter_model.safetensors/home/ubuntu/es-smoke-output/checkpoints/step_1/es/es_state.ptgeneration_s=39.07,adapter_write_s=0.22,adapter_load_s=0.19,adapter_unload_s=0.01,update_s=0.08