Skip to content

[multi-lora] 1/n - 1, feat: per-token loss-weight/advantage sample channels - #2724

Open
yushengsu-thu wants to merge 2 commits into
mainfrom
split/1n-1-sample-channels
Open

[multi-lora] 1/n - 1, feat: per-token loss-weight/advantage sample channels#2724
yushengsu-thu wants to merge 2 commits into
mainfrom
split/1n-1-sample-channels

Conversation

@yushengsu-thu

Copy link
Copy Markdown
Collaborator

Adds client-supplied per-token channels to the sample data format: Sample.loss_weights/Sample.advantages (response-aligned like loss_mask, float32 on the wire while the binary loss_masks stay int32), CP-slice coverage, and observation-span zero-padding in multi-turn merges. AdapterRef gains registration-scoped serving-identity fields and get_reward_value tolerates arg namespaces without reward_key. All additions are inert until a rollout path populates them.

Extracted from #2273; the stack rebases after this merges.

Client-supplied per-token channels ride Sample like the OPD lists: wire
dtypes stay float32 while the binary loss_masks remain int32, CP slicing
covers them, and multi-turn merges zero them over injected observation
spans. AdapterRef gains registration-scoped serving identity fields, and
get_reward_value tolerates arg namespaces without reward_key.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@yushengsu-thu yushengsu-thu removed run-ci-megatron run-ci-lora run-ci-lora-native Run native (raw-mode) LoRA plugin e2e tests labels Aug 25, 2026

@Shi-Dong Shi-Dong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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