BentoML: The easiest way to serve AI apps and models
pip install bentoml==1.4.40 Copy PIP instructions
Unified Model Serving Framework 🍱 Build model inference APIs and multi-model serving systems with any open-source or custom AI models. 👉 Join our forum!
BentoML is a Python library for building online serving systems optimized for AI apps and model inference.
# Requires Python≥3.9 pip install -U bentoml Define APIs in a service.py file.
import bentoml @bentoml.service( image=bentoml.images.Image(python_version="3.11").python_packages("torch", "transformers"), ) class Summarization: def __init__(self) -> None: import torch from transformers import pipeline device = "cuda" if torch.cuda.is_available() else "cpu" self.pipeline = pipeline('summarization', device=device) @bentoml.api(batchable=True) def summarize(self, texts: list[str]) -> list[str]: results = self.pipeline(texts) return [item['summary_text'] for item in results] 💻 Run locally Install PyTorch and Transformers packages to your Python virtual environment.
pip install torch transformers # additional dependencies for local run Run the service code locally (serving at http://localhost:3000 by default):
bentoml serve You should expect to see the following output.
[INFO] [cli] Starting production HTTP BentoServer from "service:Summarization" listening on http://localhost:3000 (Press CTRL+C to quit) [INFO] [entry_service:Summarization:1] Service Summarization initialized Now you can run inference from your browser at http://localhost:3000 or with a Python script:
import bentoml with bentoml.SyncHTTPClient('http://localhost:3000') as client: summarized_text: str = client.summarize([bentoml.__doc__])[0] print(f"Result: {summarized_text}") 🐳 Deploy using Docker Run bentoml build to package necessary code, models, dependency configs into a Bento - the standardized deployable artifact in BentoML:
bentoml build Ensure Docker is running. Generate a Docker container image for deployment:
bentoml containerize summarization:latest Run the generated image:
docker run --rm -p 3000:3000 summarization:latest Examples LLMs: Llama 3.2, Mistral, DeepSeek Distil, and more. Image Generation: Stable Diffusion 3 Medium, Stable Video Diffusion, Stable Diffusion XL Turbo, ControlNet, and LCM LoRAs. Embeddings: SentenceTransformers and ColPali Audio: ChatTTS, XTTS, WhisperX, Bark Computer Vision: YOLO and ResNet Advanced examples: Function calling, LangGraph, CrewAI Check out the full list for more sample code and usage.
See Documentation for more tutorials and guides.
Get involved and join our Community Forum 💬, where thousands of AI/ML engineers help each other, contribute to the project, and talk about building AI products.
To report a bug or suggest a feature request, use GitHub Issues.
There are many ways to contribute to the project:
The BentoML framework collects anonymous usage data that helps our community improve the product. Only BentoML's internal API calls are being reported. This excludes any sensitive information, such as user code, model data, model names, or stack traces. Here's the code used for usage tracking. You can opt-out of usage tracking by the --do-not-track CLI option:
bentoml [command] --do-not-track Or by setting the environment variable:
export BENTOML_DO_NOT_TRACK=True License Apache License 2.0
All 2 files in this release have provenance metadata.
all aws grpc grpc-channelz grpc-reflection io io-image io-pandas monitor-otlp tracing tracing-jaeger tracing-otlp tracing-zipkin triton unsloth
BentoML Compound AI Systems LLMOps MLOps Model Deployment Model Inference Model Serving
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Yanked reason: A critical module import issue has been introduced in version 1.0.6. Please see release note https://github.com/bentoml/BentoML/releases/tag/v1.0.7




