Skip to content

Conversation

@aolemila
Copy link
Collaborator

@aolemila aolemila commented Dec 2, 2025

Resolves #825.

  1. Add codes in scripts/grpo_demo_llama3_qwen2.py to run LoRA.
  2. Add the sglang_jax_lora_test.py to ensure update_params works, and put it into tpu-tests.yml. verify_update_params will be executed when VERIFY_UPDATE_PARAMS_KEY is configured.
  3. Add more fields for SGLangJax in RolloutConfig.
  4. Pass the following tests. Environment: TPU-v6e-4.

Test1: Run verification of update_params

JAX_COMPILATION_CACHE_DIR=/tmp/jit_cache python3 tests/generate/sglang_jax_lora_test.py.
image

Test2: Run scripts/grpo_demo_llama3_qwen2.py without LoRA

JAX_COMPILATION_CACHE_DIR=/tmp/jit_cache python3 scripts/grpo_demo_llama3_qwen2.py --num-batches 2 --num-test-batches 1 --root-dir=/home/gcpuser/aolemila --rollout-engine sglang_jax.
Pasted Graphic 20

Test3: Run scripts/grpo_demo_llama3_qwen2.py with LoRA

JAX_COMPILATION_CACHE_DIR=/tmp/jit_cache python3 scripts/grpo_demo_llama3_qwen2.py --num-batches 2 --num-test-batches 1 --root-dir=/home/gcpuser/aolemila --rollout-engine sglang_jax --enable-lora --lora-target-modules all.
Pasted Graphic 21

Reference

Colab Notebook

Checklist

  • I have added all the necessary unit tests for my change.
  • I have verified that my change does not break existing code and all unit tests pass.
  • I have added all appropriate doc-strings/documentation.
  • My PR is based on the latest changes of the main branch (if unsure, rebase the code).
  • I have signed the Contributor License Agreement.
  • I have followed Contribution Guidelines.

@aolemila aolemila force-pushed the feat/add-lora-for-sglangjax branch from 32a06fd to 3af36c3 Compare December 3, 2025 09:54
@aolemila aolemila changed the title [WIP] Feat/add lora for sglangjax [Feature] Feat/add lora for sglangjax Dec 3, 2025
@aolemila aolemila force-pushed the feat/add-lora-for-sglangjax branch from 3ea01a4 to a56ef3a Compare December 4, 2025 06:46
@aolemila aolemila force-pushed the feat/add-lora-for-sglangjax branch from 3dfcb05 to bb7bd21 Compare December 5, 2025 02:46
@wang2yn84
Copy link
Collaborator

Hi @aolemila , thank you for the PR! Can you rebase to head and resolve the conflicts? We've removed the sglang script so it should merge into our main script. And please squash the commits.

Copy link
Collaborator

@wang2yn84 wang2yn84 left a comment

Choose a reason for hiding this comment

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

Thank you for your PR! Left some comments.

@aolemila
Copy link
Collaborator Author

Hi @wang2yn84 , thanks for your reply. I will rebase the main and modify codes according to your advice.

@aolemila
Copy link
Collaborator Author

I am rerunning scripts and fix new problems I meet.

@aolemila aolemila force-pushed the feat/add-lora-for-sglangjax branch from bb7bd21 to e32615c Compare December 25, 2025 12:44
@aolemila
Copy link
Collaborator Author

Hi, @wang2yn84 . I have updated codes according to your suggestions. In addition to modifications, I have passed three test cases. You can see more details in PR descriptions.

  • Test1: Run verification of update_params
  • Test2: Run scripts/grpo_demo_llama3_qwen2.py without LoRA
  • Test3: Run scripts/grpo_demo_llama3_qwen2.py with LoRA

@aolemila
Copy link
Collaborator Author

I run python scripts/grpo_demo_llama3_qwen2.py --num-batches 2 --num-test-batches 1 --root-dir=/home/gcpuser/aolemila --rollout-engine sglang_jax --enable-lora --lora-target-modules all.

image

Copy link
Collaborator

@wang2yn84 wang2yn84 left a comment

Choose a reason for hiding this comment

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

Much better! Thank you!

Copy link
Collaborator

@wang2yn84 wang2yn84 left a comment

Choose a reason for hiding this comment

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

Thank you! Can you squash the commits?

@aolemila aolemila force-pushed the feat/add-lora-for-sglangjax branch from 5b87a5c to 62c6701 Compare January 16, 2026 04:10
@aolemila
Copy link
Collaborator Author

image

@aolemila
Copy link
Collaborator Author

Thank you! Can you squash the commits?

done

@aolemila aolemila force-pushed the feat/add-lora-for-sglangjax branch from 62c6701 to b516523 Compare January 16, 2026 04:52
@copybara-service copybara-service bot merged commit f71f2f7 into main Jan 17, 2026
9 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.

[Feature] Support LoRA For SGLangJax Rollout

3 participants