Skip to content

[RL] add post process method for low precision rl weight update - #24657

Open
xiuhu17 wants to merge 1 commit into
sgl-project:mainfrom
xiuhu17:2/2--upstream_from_sglang_miles
Open

[RL] add post process method for low precision rl weight update#24657
xiuhu17 wants to merge 1 commit into
sgl-project:mainfrom
xiuhu17:2/2--upstream_from_sglang_miles

Conversation

@xiuhu17

@xiuhu17 xiuhu17 commented May 8, 2026

Copy link
Copy Markdown
Contributor

upstream post_process_weights from sglang-miles branch, needed by nemorl team mxfp8 rl training

Brings the post_process_weights API set from pp_weight_update onto this
branch: PostProcessWeightsReqInput/Output, scheduler dispatch, tp_worker
+ model_runner handlers (Marlin repack, restore-before-load, optional
post_load_weights for DeepSeek MLA), tokenizer-side communicator wiring
and async pause-aware locking, Engine.post_process_weights, and the
/post_process_weights HTTP endpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@xiuhu17
xiuhu17 marked this pull request as ready for review May 12, 2026 18:35
@xiuhu17 xiuhu17 changed the title [wip] upstream partial sglang_miles features upstream partial sglang_miles features May 12, 2026
@yueming-yuan yueming-yuan changed the title upstream partial sglang_miles features [RL] add post process method for low precision rl weight update May 14, 2026

@fzyzcjy fzyzcjy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

very briefly glanced (not check in details) given this is somehow important and a bit urgent; random thoughts: wondering whether our update_weights_from_xxx should need a skip-post-processing, and whether this impl is ideal

Comment on lines +545 to +552
async with self.is_pause_cond:
is_paused = self.is_pause
if is_paused:
results = await self.post_process_weights_communicator(obj)

if not is_paused:
async with self.model_update_lock.writer_lock:
results = await self.post_process_weights_communicator(obj)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: is this a bit improveable

@xiuhu17 xiuhu17 May 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review. Do you think we should combine the logic of post_process_weights into update_weights_from_xxx?

logger.error(f"IPC weight update failed: {e}")
return False, str(e)

def post_process_weights(self, recv_req):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

todo: not sure whether this is the best impl

@xiuhu17 xiuhu17 May 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

post_process_weights only calls once after all update_weights_from_xxx finished and once before. I am not sure whether there is a better way to improve the design. Do you have any suggestion?

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