Skip to content

Conversation

@gongshaotian
Copy link
Collaborator

@gongshaotian gongshaotian commented Nov 21, 2025

Motivation

In RL training tasks, we have enabled recording of routing information during the inference process and directly utilized the experts selected during inference in the training process to alleviate the consistency issue between training and inference.
image

Modifications

Add RoutingReplayManager and RoutingStore class to support routing replay

  • RoutingStore: The client used for interacting with Routing Store has two routing storage modes based on File System and RDMA(WIP).
  • RoutingReplayManager: Implement request level routing table management within FastDeploy.

Usage or Command

Add a startup switch for route replay:


    --routing-replay-config '{"enable_routing_replay":true, "routing_store_type":"local", "local_store_dir":"xxx/routing_replay_output"}'

Accuracy Tests

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link

paddle-bot bot commented Nov 21, 2025

Thanks for your contribution!

@gongshaotian gongshaotian changed the title [Cherry-Pick][RL] Support R3 [Cherry-Pick][RL] Support Rollout Routing Replay Nov 21, 2025
moba_attention_config = self.create_moba_attention_config()
eplb_cfg = self.create_eplb_config()
routing_replay_config = self.create_routing_repaly_config()
print("after create {routing_replay_config}")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

delete debug code


@abstractmethod
def apply_ep_decode(
self,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

为啥 ep decode 没加 hook

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

develop 分支的 xpu backend 迁移到哪里了?

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