-
Notifications
You must be signed in to change notification settings - Fork 766
docs: add aggregated example turning on MTP with DeepSeek R1 #1421
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
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
examples/tensorrt_llm/configs/deepseek_r1/mtp/mtp_agg.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| Frontend: | ||
| served_model_name: "nvidia/DeepSeek-R1-FP4" | ||
| endpoint: dynamo.TensorRTLLMWorker.generate | ||
| port: 8000 | ||
| router: round-robin | ||
|
|
||
| TensorRTLLMWorker: | ||
| served_model_name: "nvidia/DeepSeek-R1-FP4" | ||
| engine_args: "configs/deepseek_r1/mtp/mtp_agg_llm_api_config.yaml" | ||
| router: round-robin | ||
| ServiceArgs: | ||
| workers: 1 | ||
| resources: | ||
| gpu: 4 |
54 changes: 54 additions & 0 deletions
54
examples/tensorrt_llm/configs/deepseek_r1/mtp/mtp_agg_llm_api_config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # NOTE: FP4 only supported starting with Blackwell GPUs. | ||
| # https://huggingface.co/nvidia/DeepSeek-R1-FP4 | ||
| # You can also specify the full path to locally downloaded weights | ||
| # instead of a HuggingFace ID here. | ||
|
|
||
| model_name: "nvidia/DeepSeek-R1-FP4" | ||
| backend: pytorch | ||
| tensor_parallel_size: 4 | ||
| moe_expert_parallel_size: 4 | ||
| enable_attention_dp: true | ||
| max_batch_size: 256 | ||
| # 8448 = 8192 ISL + 256 OSL | ||
| max_num_tokens: 8448 | ||
| max_seq_len: 8448 | ||
| kv_cache_config: | ||
| free_gpu_memory_fraction: 0.30 | ||
|
|
||
| # Enable the MTP(Multi-Token Prediction) in the model engine | ||
| speculative_config: | ||
| decoding_type: MTP | ||
| num_nextn_predict_layers: 1 | ||
|
|
||
| use_cuda_graph: true | ||
| # Please keep cuda_graph_padding_enabled setting as 'false' when MTP is turned on. | ||
| # There is known bug with MTP and cuda_graph_padding_enabled. | ||
| # Tensorrt LLM team is working on a fix in the next release. | ||
| cuda_graph_padding_enabled: false | ||
| cuda_graph_batch_sizes: | ||
| - 1 | ||
| - 2 | ||
| - 4 | ||
| - 8 | ||
| - 16 | ||
| - 32 | ||
| - 64 | ||
| - 128 | ||
| - 256 | ||
| print_iter_log: true | ||
| kv_cache_dtype: fp8 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.