Repository navigation
[Lumen-RL] Enable Rollout Router Replay (R3) #2274
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
ae912f8
0dd2de0
c94c0b2
fe8c0b9
ed12c55
6a8d086
ec8239d
e6a574b
62332e6
6586c2c
96fbcf2
888abcd
52cb3d2
51bcc30
57cd818
3372d12
10added
a1850df
b340b8f
49144bc
ab2bb23
ce4b61d
53f46b7
95a7e6b
1696e67
b542967
18430bb
c271f13
ecac39b
9606dcd
b02deb7
af142eb
0e63603
cddc323
329b855
9a12cc8
fc666e6
ad10b75
9d4242c
dbd0631
c9e710c
e12acf1
3cdd10b
daeaaf7
f869895
1105f69
b79d1c1
e61a333
a5ff585
6d1929c
078cfc5
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 |
|---|---|---|
|
|
@@ -2012,6 +2012,43 @@ def indexer_cp_unsupported_reason( | |
| return None | ||
|
|
||
|
|
||
| def check_return_routed_experts(config: "Config") -> None: | ||
| """Refuse topologies that cannot assemble a full [seq_len-1] route tensor.""" | ||
| if not config.enable_return_routed_experts: | ||
| return | ||
| plugin = config.plugin_config | ||
| if (plugin is not None and plugin.is_plugin_mode) or is_plugin_mode(): | ||
| raise ValueError( | ||
| "enable_return_routed_experts is not supported in plugin mode: " | ||
| "capture lives in ATOM's ModelRunner, which a host framework does " | ||
| "not run" | ||
| ) | ||
| if ( | ||
| config.decode_context_parallel_size != 1 | ||
| or config.prefill_context_parallel_size != 1 | ||
| ): | ||
| raise ValueError( | ||
| "enable_return_routed_experts requires decode_context_parallel_size " | ||
| "== 1 and prefill_context_parallel_size == 1" | ||
| ) | ||
| if config.pipeline_parallel_size != 1: | ||
| raise ValueError( | ||
| "enable_return_routed_experts requires pipeline_parallel_size == 1" | ||
| ) | ||
| if config.kv_transfer_config: | ||
| raise ValueError( | ||
| "enable_return_routed_experts does not support KV transfer " | ||
| "(prefill/decode disaggregation or KV offload); routed-expert " | ||
| "metadata is not moved with KV blocks" | ||
| ) | ||
| if config.enable_rapidserve: | ||
| raise ValueError( | ||
| "enable_return_routed_experts does not support RapidServe " | ||
| "prefill/decode disaggregation; decode skips KV allocation and " | ||
| "never initializes the process-local capture buffer" | ||
| ) | ||
|
|
||
|
|
||
| @dataclass | ||
| class Config: | ||
| model: str | ||
|
|
@@ -2100,6 +2137,14 @@ class Config: | |
| kv_cache_dtype: str = "bf16" | ||
| index_cache_dtype: str | None = None | ||
| enable_prefix_caching: bool = True | ||
| # Return per-request MoE routes from generate() as int16 | ||
| # [seq_len - 1, num_layers, top_k]. Scatter is CUDA-graph-safe (device | ||
| # write inside fused MoE). Refused here: DCP/PCP/PP != 1, plugin mode, KV | ||
| # transfer / offload, RapidServe P/D. Refused after weight load: a model | ||
| # without FusedMoE, an attention backend without per-token slots | ||
| # (DeepSeek-V4 / V4.1). Mono decode turns off for models whose kernels | ||
| # route in-kernel. Prefix cache stays on. | ||
| enable_return_routed_experts: bool = False | ||
|
Collaborator
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. [15] Not in
Author
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. Added docs. |
||
| enable_chunked_prefill: bool = True | ||
| enable_log_stats: bool = True | ||
| enable_request_context_metrics: bool = False | ||
|
|
@@ -2626,6 +2671,8 @@ def __post_init__(self): | |
| self._resolve_dynamic_chunking() | ||
| self._check_pp_support() | ||
|
|
||
| check_return_routed_experts(self) | ||
|
|
||
| if self.speculative_config is not None: | ||
| num_spec = self.speculative_config.num_speculative_tokens | ||
| is_dspark = getattr(self.speculative_config, "use_dspark", lambda: False)() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.