Triton
Triton Inference Server
NVIDIA's high-performance ML model serving platform. With multi-framework and multi-model support, it is the standard for production AI deployment.
Triton Inference Server
NVIDIA's high-performance ML model serving platform. With multi-framework and multi-model support, it is the standard for production AI deployment.
Triton Inference Server is an open-source AI model serving platform developed by NVIDIA. It can serve models from many frameworks, such as TensorFlow, PyTorch, ONNX, and TensorRT, simultaneously on a single server, which makes it possible to manage AI inference workloads efficiently in production environments.
Triton began in 2018 as the TensorRT Inference Server and was rebranded as Triton in 2020 to support multiple frameworks. It now supports cloud, data center, edge, and embedded environments, and runs not only on NVIDIA GPUs but also on x86/ARM CPUs and AWS Inferentia.
Its key features include Dynamic Batching (automatically batching requests), Model Ensemble (chaining multiple models), Model Versioning, and Concurrent Model Execution. In particular, Dynamic Batching groups individual requests to maximize GPU utilization and raises throughput several-fold.
In practice, Triton is core infrastructure for large-scale AI services. Global companies such as Grab and PayPal have consolidated their inference infrastructure on Triton to reduce operational complexity, and Triton has demonstrated top-tier performance in the MLPerf Inference benchmarks.
As of January 2025, here are the performance and features of Triton Inference Server.
| Item | Details |
|---|---|
| License | Open source (free, BSD-3 License) |
| MLPerf v4.1 (Llama 2 70B) | Bare-metal-equivalent performance on 8 H200 GPUs |
| GPU vs CPU performance ratio | T4 GPU is 37x more cost-efficient than CPU (BERT large) |
| Dynamic Batching effect | 2-5x higher throughput |
| Supported frameworks | TensorRT, PyTorch, ONNX, TensorFlow, vLLM, etc. |
| Protocols | HTTP/REST, gRPC, C API |
* Triton is free and open source, but GPU infrastructure costs are separate. Enterprise support is available with an NVIDIA AI Enterprise subscription.
Triton Inference Server deployment and Python client example.
# 1. Triton μλ² μ€ν (Docker)
# docker run --gpus all -p 8000:8000 -p 8001:8001 -p 8002:8002 \
# -v /path/to/models:/models \
# nvcr.io/nvidia/tritonserver:24.01-py3 \
# tritonserver --model-repository=/models
# 2. Python ν΄λΌμ΄μΈνΈλ‘ μΆλ‘ μμ²
import tritonclient.http as httpclient
import numpy as np
# Triton μλ² μ°κ²°
client = httpclient.InferenceServerClient(url="localhost:8000")
# μλ² μν νμΈ
if client.is_server_live():
print("Triton μλ² μ μ μλ μ€")
# λͺ¨λΈ μ 보 νμΈ
model_name = "bert_onnx"
model_metadata = client.get_model_metadata(model_name)
print(f"λͺ¨λΈ: {model_metadata['name']}, λ²μ : {model_metadata['versions']}")
# μ
λ ₯ λ°μ΄ν° μ€λΉ
input_ids = np.array([[101, 2023, 2003, 1037, 3231, 102]], dtype=np.int64)
attention_mask = np.array([[1, 1, 1, 1, 1, 1]], dtype=np.int64)
# μΆλ‘ μ
λ ₯ μ€μ
inputs = [
httpclient.InferInput("input_ids", input_ids.shape, "INT64"),
httpclient.InferInput("attention_mask", attention_mask.shape, "INT64")
]
inputs[0].set_data_from_numpy(input_ids)
inputs[1].set_data_from_numpy(attention_mask)
# μΆλ‘ μΆλ ₯ μ€μ
outputs = [httpclient.InferRequestedOutput("output")]
# μΆλ‘ μ€ν
response = client.infer(model_name, inputs, outputs=outputs)
# κ²°κ³Ό νμΈ
output_data = response.as_numpy("output")
print(f"μΆλ‘ κ²°κ³Ό shape: {output_data.shape}")
print(f"μΆλ‘ κ²°κ³Ό: {output_data[:5]}") # μμ 5κ° κ°
# μ±λ₯ ν΅κ³ νμΈ
statistics = client.get_inference_statistics(model_name)
print(f"μ΄ μΆλ‘ νμ: {statistics['model_stats'][0]['inference_count']}")
print(f"νκ· μΆλ‘ μκ°: {statistics['model_stats'][0]['inference_stats']['success']['compute_infer']['avg']/1e6:.2f}ms")
Take a mock interview on this topic β WIA SOOM AI Interview Β· Start for free
If a model folder has no config.pbtxt, loading fails. Specify the input/output shapes and data types exactly.
By default, batching is disabled, so GPU efficiency is low. Be sure to set max_batch_size and preferred_batch_size.
Use Model Analyzer to find the optimal batch size, Perf Analyzer for performance benchmarks, and set up monitoring with Prometheus/Grafana.