fix(lora_grpo): support openpipe-art >= 0.5.20 and always pass the LoRA rank #162
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.37) × (1 − Review Confidence (0.68)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 186 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.35 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.313
Real PR Conversation Timeline
1 comments
"Review active on #162"
general
weight: 0.35
xingliu-netizen
Maxusmusti
Problem
1.
lora_grpo(backend="art")fails before training on openpipe-art ≥ 0.5.20. ART 0.5.20 moved LoRA settings from_internal_config.peft_argsto a top-levelTrainableModel(lora_config=...), andart.dev.PeftArgsnow raises:The same release also made
run_namea required keyword-only argument ofTrainableModel, so removingpeft_argsalone would just fail with aTypeError.pyproject.tomlfloorsopenpipe-art>=0.5.17with no cap, so a fresh install resolves 0.5.24. Every release after 0.5.18 on PyPI is affected (0.5.19 has no wheel).2. The default LoRA rank was silently ignored. The old code only passed
rwhenlora_r != 16, assuming ART defaults to 16. ART defaults to 8 (0.5.18get_model_config:r=8; 0.5.24_peft_args_from_lora_config:r=8), so defaultlora_grpo(backend="art")runs have been training rank-8 adapters.Change
_build_art_model_kwargs()picks the API from theTrainableModelsignature instead of a version string:- new ART:
lora_config={"rank", "alpha", "target_modules"}plusrun_name.run_namereuses the model name, so the checkpoint layout is unchanged.- old ART:
_internal_config.peft_args, as before.tests/test_lora_grpo_art_config.py) cover fake old/new ART APIs and whichever openpipe-art is installed. AGENTS.md documents the API change.The
openpipe-art>=0.5.17floor is unchanged, since both sides of the API change work.Validation
1× H100, Qwen2.5-1.5B-Instruct, generic-mode arithmetic reward,
num_iterations=2,group_size=4,prompt_batch_size=8,lora_r=16,lora_alpha=8, torch 2.14.0, vllm 0.33.0:| Code | openpipe-art | Result | Saved adapter rank |
|---|---|---|---|
|
main| 0.5.24 | ❌ValueError(peft_argsreplaced) | — ||
main| 0.5.18 | ✅ reward 0.156 → 0.375 | r=8 (requested 16) || this PR | 0.5.18 | ✅ reward 0.125 → 0.375 | r=16 |
| this PR | 0.5.24 | model + initial adapter built correctly (r=16); then fails inside ART's managed vLLM runtime (see below) | r=16 (checkpoint 0000) |
tests/test_lora_grpo_art_config.py+tests/test_lora_grpo_wandb_stub.py: 13 passed with ART 0.5.24 and with ART 0.5.18.test_embedding_sft.py::TestLossFnValidation) also fail on unmodifiedmain; that environment lacks the optionalsentence_transformerspackage.Known limitation: ART ≥ 0.5.20 end-to-end (not addressed here)
From 0.5.20, ART no longer uses the vLLM installed in the environment. At training time it builds its own managed vLLM runtime: it downloads a pinned torch 2.11.0 + vLLM 0.25.1 (partly from GitHub release URLs) into
$XDG_CACHE_HOME/vllm_runtime(override:ART_VLLM_RUNTIME_CACHE_DIR) and serves rollouts from there. In my test it failed to start withImportError: tilelang is required for mhc but is not installed, raised inside that ART-managed venv, which training_hub doesn't control. This PR gets ART ≥ 0.5.20 past model construction, but full runs on those versions also depend on ART's runtime. For offline / AIPCC deployments it also means rollouts don't use the image's vLLM and need network access at training time. Whether to capopenpipe-art<0.5.20(the AIPCC indexes still carry 0.5.17/0.5.18) or adopt ART'sexternalruntime mode should be a separate decision.🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Improved LoRA training compatibility across supported versions of openpipe-art.
* LoRA training now consistently applies the configured rank and alpha, includes target modules when specified, and uses the model name for run identification when supported.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->