Skip to content

Conversation

@gongshaotian
Copy link
Collaborator

@gongshaotian gongshaotian commented Oct 27, 2025

Motivation

Add the switch of using CUDAGraph with Draft Model. CUDAGraph can be used in Draft Model and Target Model respectively.

Modifications

Add the flag draft_model_use_cudagraph.

Usage or Command

draft_model_use_cudagraph defaults to False, close command:

 --graph-optimization-config '{"use_cudagraph":true,  "use_unique_memory_pool":true, "draft_model_use_cudagraph":true}'

Accuracy Tests

Pass

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 Oct 27, 2025

Thanks for your contribution!

@gongshaotian gongshaotian changed the title [Graph Optimization] Add the switch of using CUDAGraph with Draft Model [Graph Optimization] Add the CUDAGraph usage switch for Draft Model Oct 27, 2025
yuanlehome
yuanlehome previously approved these changes Oct 28, 2025
@gongshaotian gongshaotian merged commit cd3b7cc into PaddlePaddle:develop Oct 30, 2025
16 of 18 checks passed
Deleter-D pushed a commit to Deleter-D/FastDeploy that referenced this pull request Oct 30, 2025
…addlePaddle#4601)

* add draft model using cudagraph switch

* set default as false

* capture draft model in ci

* fix bug
@gongshaotian gongshaotian deleted the dev_draft_model_flag branch November 3, 2025 06:48
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.

4 participants