Skip to content

feat: Serve Model Connect text and ranking bundles - #133

Merged
yinggeh merged 3 commits into
yinggeh/trtmcfrom
yinggeh/tri-2052-implement-text-api-tensor-input-without-batching
Nov 2, 2026
Merged

yinggeh merged 3 commits into
yinggeh/trtmcfrom
yinggeh/tri-2052-implement-text-api-tensor-input-without-batching

Conversation

@yinggeh

@yinggeh yinggeh commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What does the PR do?

Serves a Model Connect bundle from the TensorRT backend, one request at a time. text_generation and text_continuation take one string or one token-id sequence. structured_ranking takes named numeric tensors. Plan models stay on the existing path.

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

triton-inference-server/core#541

Where should the reviewer start?

src/tensorrt.cc for the plan versus model_connect dispatch, then src/model_connect/instance_state.cc for load and execute.

Test plan:

Loaded dazr, ajk50, ajk64, feed, and gpt2 one at a time. Compared each Triton response with the native SDK on the same inputs. Every output matched.

  • CI Pipeline ID:

Caveats:

One request at a time. No batching and no streaming. The ranking path is built against the private SDK.

Background

The bundle task is read from the bundle header before the model is loaded.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Run one model_connect request at a time for text generation, text
continuation, and structured ranking, while plan models stay on the
existing path.

Signed-off-by: Yingge He <yinggeh@nvidia.com>
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed and no new actionable issue was established.

Summary

The PR adds Model Connect bundle serving alongside the existing plan path.

  • Triton loads bundles by the task named in each header.
  • Model Connect requests return text or ranking results.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Model initialization] --> B{Model type}
  B -->|Plan| C[Existing plan path]
  B -->|Model Connect| D[Read bundle header]
  D --> E[Load matching task]
  E --> F[Copy one request to host]
  F --> G[Run text or ranking task]
  G --> H[Write response and release request]
Loading

Reviews (2) · Last reviewed commit: "fix: Read Model Connect SDK errors after..." · Reviewed by Greptile

Comment thread src/tensorrt.cc Resolved
Comment thread src/model_connect/model_state.cc Resolved

@whoisj whoisj left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM with the exception that I don't think any of the new files are being compiled.

Have they been added to the CMakeLists.txt file?

Comment thread src/model_connect/instance_state.cc Resolved
Comment thread src/model_connect/instance_state.cc Resolved
Comment thread src/model_connect/instance_state.cc Resolved
Add the model_connect sources to the backend library and find the
installed SDK on the default search path.

Signed-off-by: Yingge He <yinggeh@nvidia.com>
Store each SDK status before reading its error pointer, pass text views
by reference, and copy the result owner into the output.

Signed-off-by: Yingge He <yinggeh@nvidia.com>
@yinggeh
yinggeh requested a review from whoisj October 29, 2026 20:49
@yinggeh
yinggeh merged commit e54e334 into yinggeh/trtmc Nov 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants