-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[#17016][feat] Add selectable OpenEngine gRPC server #17084
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
1e49c84
0a455c3
9e2bdb4
478c3c2
2c2d6d6
c86e0e9
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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Source: https://github.com/ai-dynamo/openengine/releases/tag/v0.1.0 | ||
| # BSR module: https://buf.build/openengine/openengine | ||
| # Immutable BSR commit: 768a93c7b44e40f28c692ad0b471a8f2 | ||
| --extra-index-url https://buf.build/gen/python | ||
| openengine-openengine-grpc-python==1.67.1.2.20260730172104+768a93c7b44e | ||
|
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. The three BSR pins carry PEP 440 local version labels ( Worth confirming with whoever owns the release upload before this merges; if it does bite, the usual workarounds are to relax the extra to the public part of the version and keep the exact |
||
| openengine-openengine-protocolbuffers-python==31.1.0.2.20260730172104+768a93c7b44e | ||
| openengine-openengine-protocolbuffers-pyi==31.1.0.2.20260730172104+768a93c7b44e | ||
|
Comment on lines
+8
to
+10
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. The provenance of these packages is not documented well in the package metadata, so I'll need to do some digging before we can approve this.
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. Hi @tburt-nv, for some additional context: OpenEngine is a gRPC proto being developed by the Dynamo team for interactions between Dynamo and inference engines. The schema source lives in
|
||
| grpcio>=1.67.1,<2 | ||
| protobuf>=6.31.1,<7 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,87 +1,6 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 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. | ||
|
|
||
| r"""TensorRT-LLM gRPC module for high-performance communication with external routers. | ||
| """Protocol-specific gRPC integrations for TensorRT-LLM.""" | ||
|
|
||
| This module provides a gRPC server interface that accepts pre-tokenized requests | ||
| and returns raw token IDs, enabling efficient binary communication with Rust-based | ||
| routers like sgl-router. | ||
|
|
||
| Key Features: | ||
| - Pre-tokenized input (no Python tokenization overhead) | ||
| - Raw token ID output (no Python detokenization overhead) | ||
| - Streaming support with delta tokens | ||
| - Full sampling parameter support | ||
| - Guided decoding (JSON schema, regex, grammar) | ||
| - LoRA and prompt tuning support | ||
| - Disaggregated inference support | ||
|
|
||
| Proto definitions are provided by the smg-grpc-proto package (pip install smg-grpc-proto). | ||
|
|
||
| Usage: | ||
| python -m tensorrt_llm.commands.serve /path/to/model \ | ||
| --grpc \ | ||
| --host 0.0.0.0 \ | ||
| --port 50051 | ||
| """ | ||
|
|
||
| # Try to import generated protobuf modules from smg-grpc-proto package | ||
| try: | ||
| from smg_grpc_proto.generated import trtllm_service_pb2, trtllm_service_pb2_grpc | ||
|
|
||
| PROTOS_AVAILABLE = True | ||
| except ImportError: | ||
| PROTOS_AVAILABLE = False | ||
| trtllm_service_pb2 = None | ||
| trtllm_service_pb2_grpc = None | ||
|
|
||
| # Try to import request manager | ||
| try: | ||
| from .grpc_request_manager import ( | ||
| GrpcRequestManager, | ||
| create_disaggregated_params_from_proto, | ||
| create_lora_request_from_proto, | ||
| create_sampling_params_from_proto, | ||
| ) | ||
|
|
||
| REQUEST_MANAGER_AVAILABLE = True | ||
| except ImportError: | ||
| REQUEST_MANAGER_AVAILABLE = False | ||
| GrpcRequestManager = None | ||
| create_sampling_params_from_proto = None | ||
| create_lora_request_from_proto = None | ||
| create_disaggregated_params_from_proto = None | ||
|
|
||
| # Try to import servicer | ||
| try: | ||
| from .grpc_servicer import TrtllmServiceServicer | ||
|
|
||
| SERVICER_AVAILABLE = True | ||
| except ImportError: | ||
| SERVICER_AVAILABLE = False | ||
| TrtllmServiceServicer = None | ||
|
|
||
| __all__ = [ | ||
| "PROTOS_AVAILABLE", | ||
| "REQUEST_MANAGER_AVAILABLE", | ||
| "SERVICER_AVAILABLE", | ||
| "trtllm_service_pb2", | ||
| "trtllm_service_pb2_grpc", | ||
| "GrpcRequestManager", | ||
| "TrtllmServiceServicer", | ||
| "create_sampling_params_from_proto", | ||
| "create_lora_request_from_proto", | ||
| "create_disaggregated_params_from_proto", | ||
| ] | ||
| __all__ = [] |
Uh oh!
There was an error while loading. Please reload this page.