triton
БесплатноБез исполняемых скриптовНе проверенServes trained machine-learning models over HTTP and gRPC with NVIDIA Triton Inference Server: one server for ONNX, TensorRT, PyTorch, TensorFlow, OpenVINO…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
NVIDIA Triton Inference Server
Overview
Triton loads models from a directory called the model repository and serves each of them over HTTP (port 8000), gRPC (8001) and Prometheus metrics (8002), using the KServe v2 inference protocol. Each model is run by a backend (onnxruntime, tensorrt, pytorch, tensorflow, openvino, python, fil, vllm and others), so one server can host models from different frameworks. The server is released together with an NGC container of the same year.month: release 2.73.0 is container 26.09 (checked October 2026). Use the newest container your NVIDIA driver supports; the release notes list the minimum driver for each tag.
Instructions
Step 1: Lay out the model repository
model_repository/
├── text_classifier/
│ ├── config.pbtxt
│ ├── 1/model.onnx # version 1
│ └── 2/model.onnx # version 2 (latest is served by default)
├── image_model/
│ ├── config.pbtxt
│ └── 1/model.plan # TensorRT engine
├── preprocess/
│ ├── config.pbtxt
│ └── 1/model.py # Python backend
└── ensemble_pipeline/
├── config.pbtxt
└── 1/ # empty directory for an ensemble
Default file names are fixed per backend: model.onnx, model.plan, model.pt (TorchScript), model.savedmodel/, model.py. For ONNX, TensorRT and OpenVINO models Triton can generate the minimal configuration (inputs, outputs, max_batch_size) itself, so config.pbtxt may be left out until you need batching or instance settings. Models of other types, such as TorchScript, need a config file. To see what Triton generated, run curl localhost:8000/v2/models/text_classifier/config.
Step 2: Start the server
docker run --gpus all --rm -p 8000:8000 -p 8001:8001 -p 8002:8002 \
-v "$(pwd)/model_repository:/models" \
nvcr.io/nvidia/tritonserver:26.09-py3 \
tritonserver --model-repository=/models
Drop --gpus all to run on CPU only (use KIND_CPU in instance_group). The log ends with a table of models; each should show READY, otherwise the table gives the load error. curl -s -o /dev/null -w "%{http_code}" localhost:8000/v2/health/ready returns 200 when the server is ready. With --model-control-mode=explicit models load only on request (--load-model=text_classifier or the repository API).
Step 3: Write config.pbtxt
# model_repository/text_classifier/config.pbtxt
name: "text_classifier"
backend: "onnxruntime" # older configs use: platform: "onnxruntime_onnx"
max_batch_size: 64
input [
{ name: "input_ids" data_type: TYPE_INT64 dims: [ 128 ] },
{ name: "attention_mask" data_type: TYPE_INT64 dims: [ 128 ] }
]
output [
{ name: "logits" data_type: TYPE_FP32 dims: [ 2 ] }
]
dynamic_batching {
max_queue_delay_microseconds: 100
}
instance_group [
{ count: 2 kind: KIND_GPU gpus: [ 0 ] }
]
With max_batch_size above 0, the batch dimension is implicit: dims describes one sample and requests carry shape [batch, 128]. Dynamic batching merges concurrent requests up to that size; the queue delay is how long Triton waits to fill a batch. NVIDIA advises leaving out preferred_batch_size for most models, except TensorRT models with several optimization profiles. instance_group runs two copies of the model on GPU 0 so requests overlap. Measure with Perf Analyzer (in the -py3-sdk container) before tuning.
Step 4: Call the server
# http_client.py — plain HTTP, no Triton library needed
import numpy as np
import requests
TRITON_URL = "http://localhost:8000"
assert requests.get(f"{TRITON_URL}/v2/health/ready").status_code == 200
ids = np.random.randint(0, 30000, (1, 128))
payload = {"inputs": [
{"name": "input_ids", "shape": [1, 128], "datatype": "INT64", "data": ids.flatten().tolist()},
{"name": "attention_mask", "shape": [1, 128], "datatype": "INT64", "data": [1] * 128},
]}
reply = requests.post(f"{TRITON_URL}/v2/models/text_classifier/infer", json=payload, timeout=30)
reply.raise_for_status()
print(reply.json()["outputs"][0]["data"]) # two logits for the one sample
# grpc_client.py — pip install "tritonclient[grpc]"
import numpy as np
import tritonclient.grpc as grpcclient
client = grpcclient.InferenceServerClient(url="localhost:8001")
assert client.is_model_ready("text_classifier")
input_ids = np.random.randint(0, 30000, (4, 128)).astype(np.int64) # batch of 4
attention_mask = np.ones((4, 128), dtype=np.int64)
inputs = [grpcclient.InferInput("input_ids", input_ids.shape, "INT64"),
grpcclient.InferInput("attention_mask", attention_mask.shape, "INT64")]
inputs[0].set_data_from_numpy(input_ids)
inputs[1].set_data_from_numpy(attention_mask)
result = client.infer("text_classifier", inputs, outputs=[grpcclient.InferRequestedOutput("logits")])
print(result.as_numpy("logits").shape) # (4, 2)
The tritonclient version follows the server release (2.73.0 today). Extras are http, `gr
Установить triton в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл triton?
Serves trained machine-learning models over HTTP and gRPC with NVIDIA Triton Inference Server: one server for ONNX, TensorRT, PyTorch, TensorFlow, OpenVINO and Python models, with dynamic batching, model ensembles, versioning and Prometheus metrics, on GPU or CPU. Use when a user asks to deploy a model for production inference, write a config.pbtxt, batch requests for GPU throughput, chain preprocessing and a model, or call Triton from Python.
Как установить скилл triton?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл triton запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic