-
Notifications
You must be signed in to change notification settings - Fork 408
feat(sample-support): score policy logprobs over the recorded support end to end #2084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ee54593
d881ecd
707724c
4bb8674
31d6b3c
e080afe
5dccdc0
a604e5c
58ed80b
c1e71a0
646f87f
bafe553
0caad2f
1c3510a
9a8327d
098017b
ec57e6f
b366738
6be01c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,10 @@ class GeneratorOutput(TypedDict): | |
| rollout_metrics: Optional[Dict[str, Any]] | ||
| rollout_logprobs: Optional[List[List[float]]] | ||
| trajectory_ids: Optional[List[TrajectoryID]] | ||
| rollout_expert_indices: Optional[List[List[List[List[int]]]]] | ||
| trajectory_generation_times: Optional[List[float]] | ||
| trajectory_time_splits: Optional[Dict[str, List[float]]] | ||
| rollout_expert_indices: Optional[List[RoutedExpertIndices]] | ||
| rollout_sample_support: Optional[List[List[List[int]]]] | ||
| # Applicable only for step-wise training | ||
| is_last_step: Optional[List[bool]] | ||
| ``` | ||
|
|
@@ -85,6 +88,8 @@ When `step_wise_trajectories=True`, some related fields: | |
| | `is_last_step` | `List[bool]` | Marks the final step of each trajectory. Must have at least one `True`, and the last element must be `True`. | | ||
| | `trajectory_ids` | `List[TrajectoryID]` | Associates each step-sample with its parent trajectory. All steps of the same trajectory share the same `TrajectoryID`. | | ||
| | `rollout_logprobs` | `List[List[float]]` | Per-token logprobs from the inference engine, aligned with `response_ids`. Required for TIS. | | ||
| | `rollout_sample_support` | `List[List[List[int]]]` | Per generated token, the bounded top-k vocab IDs the sampler drew from, right-padded with `SAMPLE_SUPPORT_PADDING` (`-1`). One dense `[tokens, top_k]` block per row, aligned with `response_ids`. Every position must be present: an observation token or a synthetic (loop-appended) EOS carries an all-padding row rather than being absent, so the block stays rectangular and aligned. Enabled with `generator.inference_engine.enable_return_sample_support_set`, and requested per request (train batches only — eval's greedy `top_k=-1` params cannot satisfy the capture contract). | | ||
| | `rollout_expert_indices` | `Optional[List[RoutedExpertIndices]]` | Per token, the `[layers, topk]` MoE routes vLLM recorded, as one `[tokens, layers, topk]` integer array per trajectory (rollout router replay, R3). **Refused with `step_wise_trajectories=True`**: each step-wise row's prompt is the whole history so far while routes are recorded for that step's generated tokens only, so a step's routes would replay onto the first N prompt tokens of its row with no length mismatch to assert on, silently training against routing that does not match the rollout. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The explanation for why R3 is refused with
|
||
|
|
||
| ### Concrete Example | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is quite long and lists several distinct points. For better readability, consider breaking it down into smaller sentences and using a list. For example: