跳至主要內容

Triton Inference Server

LiteLLM 支援 Triton Inference Server 上的嵌入模型

屬性詳細資料
說明NVIDIA Triton Inference Server
LiteLLM 上的提供者路由triton/
支援的操作/chat/completion, /completion, /embedding
支援的 Triton 端點/infer, /generate, /embeddings
提供者文件連結Triton Inference Server ↗

Triton /generate - 聊天完成

使用 triton/ 前綴來路由至 triton server

from litellm import completion
response = completion(
model="triton/llama-3-8b-instruct",
messages=[{"role": "user", "content": "who are u?"}],
max_tokens=10,
api_base="http://localhost:8000/generate",
)

Triton /infer - 聊天完成

使用 triton/ 前綴來路由至 triton server

from litellm import completion


response = completion(
model="triton/llama-3-8b-instruct",
messages=[{"role": "user", "content": "who are u?"}],
max_tokens=10,
api_base="http://localhost:8000/infer",
)

Triton /embeddings - 嵌入

使用 triton/ 前綴來路由至 triton server

from litellm import embedding
import os

response = await litellm.aembedding(
model="triton/<your-triton-model>",
api_base="https://your-triton-api-base/triton/embeddings", # /embeddings endpoint you want litellm to call on your server
input=["good morning from litellm"],
)
🚅
LiteLLM Enterprise
為正式環境打造的 SSO/SAML、稽核記錄、支出追蹤、多團隊管理與防護欄。
深入瞭解 →