pytorch/serve is a Java project with 4.3k stars in the AI Tools space. Serve, optimize and scale PyTorch models in production
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This project is no longer actively maintained. While existing releases remain available, there are no planned updates, bug fixes, new features, or security patches. Users should be aware that vulnerabilities may not be addressed.
❗ANNOUNCEMENT: Security Changes❗
TorchServe now enforces token authorization enabled and model API control disabled by default. These security features are intended to address the concern of unauthorized API calls and to prevent potential malicious code from being introduced to the model server. Refer the following documentation for more information: Token Authorization, Model API control
TorchServe
TorchServe is a flexible and easy-to-use tool for serving and scaling PyTorch models in production.
# Make sure to install torchserve with pip or conda as described above and login with `huggingface-cli login`
python -m ts.llm_launcher --model_id meta-llama/Llama-3.2-3B-Instruct --disable_token_auth
# Try it out
curl -X POST -d '{"model":"meta-llama/Llama-3.2-3B-Instruct", "prompt":"Hello, my name is", "max_tokens": 200}' --header "Content-Type: application/json" "http://localhost:8080/predictions/model/1.0/v1/completions"
TRT-LLM Engine
# Make sure to install torchserve with python venv as described above and login with `huggingface-cli login`
# pip install -U --use-deprecated=legacy-resolver -r requirements/trt_llm.txt
python -m ts.llm_launcher --model_id meta-llama/Meta-Llama-3.1-8B-Instruct --engine trt_llm --disable_token_auth
# Try it out
curl -X POST -d '{"prompt":"count from 1 to 9 in french ", "max_tokens": 100}' --header "Content-Type: application/json" "http://localhost:8080/predictions/model"
🚢 Quick Start LLM Deployment with Docker
#export token=<HUGGINGFACE_HUB_TOKEN>
docker build --pull . -f docker/Dockerfile.vllm -t ts/vllm
docker run --rm -ti --shm-size 10g --gpus all -e HUGGING_FACE_HUB_TOKEN=$token -p 8080:8080 -v data:/data ts/vllm --model_id meta-llama/Meta-Llama-3-8B-Instruct --disable_token_auth
# Try it out
curl -X POST -d '{"model":"meta-llama/Meta-Llama-3-8B-Instruct", "prompt":"Hello, my name is", "max_tokens": 200}' --header "Content-Type: application/json" "http://localhost:8080/predictions/model/1.0/v1/completions"
Refer to LLM deployment for details and other methods.
⚡ Why TorchServe
Write once, run anywhere, on-prem, on-cloud, supports inference on CPUs, GPUs, AWS Inf1/Inf2/Trn1, Google Cloud TPUs, Nvidia MPS
Model Management API: multi model management with optimized worker to model allocation
Inference API: REST and gRPC support for batched inference
TorchServe Workflows: deploy complex DAGs with multiple interdependent models
Default way to serve PyTorch models in
Sagemaker
Vertex AI
Kubernetes with support for autoscaling, session-affinity, monitoring using Grafana works on-prem, AWS EKS, Google GKE, Azure AKS
Kserve: Supports both v1 and v2 API, autoscaling and canary deployments for A/B testing
Kubeflow
MLflow
Export your model for optimized inference. Torchscript out of the box, PyTorch Compiler preview, ORT and ONNX, IPEX, TensorRT, FasterTransformer, FlashAttention (Better Transformers)
Performance Guide: builtin support to optimize, benchmark, and profile PyTorch and TorchServe performance
Expressive handlers: An expressive handler architecture that makes it trivial to support inferencing for your use case with many supported out of the box
Metrics API: out-of-the-box support for system-level metrics with Prometheus exports, custom metrics,
Large Model Inference Guide: With support for GenAI, LLMs including
SOTA GenAI performance using torch.compile
Fast Kernels with FlashAttention v2, continuous batching and streaming response
Walmart Search: Serving Models at a Scale on TorchServe
🎥 Scaling inference on CPU with TorchServe
🎥 TorchServe C++ backend
Grokking Intel CPU PyTorch performance from first principles: a TorchServe case study
Grokking Intel CPU PyTorch performance from first principles( Part 2): a TorchServe case study
Case Study: Amazon Ads Uses PyTorch and AWS Inferentia to Scale Models for Ads Processing
Optimize your inference jobs using dynamic batch inference with TorchServe on Amazon SageMaker
Using AI to bring children's drawings to life
🎥 Model Serving in PyTorch
Evolution of Cresta's machine learning architecture: Migration to AWS and PyTorch
🎥 Explain Like I’m 5: TorchServe
🎥 How to Serve PyTorch Models with TorchServe
How to deploy PyTorch models on Vertex AI
Quantitative Comparison of Serving Platforms
Efficient Serverless deployment of PyTorch models on Azure
Deploy PyTorch models with TorchServe in Azure Machine Learning online endpoints
Dynaboard moving beyond accuracy to holistic model evaluation in NLP
A MLOps Tale about operationalising MLFlow and PyTorch
Operationalize, Scale and Infuse Trust in AI Models using KFServing
How Wadhwani AI Uses PyTorch To Empower Cotton Farmers
TorchServe Streamlit Integration
Dynabench aims to make AI models more robust through distributed human workers
Announcing TorchServe
💖 All Contributors
Made with contrib.rocks.
⚖️ Disclaimer
This repository is jointly operated and maintained by Amazon, Meta and a number of individual contributors listed in the CONTRIBUTORS file. For questions directed at Meta, please send an email to [email protected]. For questions directed at Amazon, please send an email to [email protected]. For all other questions, please open up an issue in this repository here.
TorchServe acknowledges the Multi Model Server (MMS) project from which it was derived
The most recent commit recorded on pytorch/serve was 1.1 years ago, based on the GitHub push timestamp. The repository has 881 forks — one of the better signals of community interest.
Is pytorch/serve open source?
Yes — pytorch/serve ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/pytorch/serve.
What license does pytorch/serve use?
pytorch/serve is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is pytorch/serve associated with?
GitHub's repository topics for pytorch/serve: "cpu", "deep-learning", "docker", "gpu", "kubernetes", "machine-learning", "metrics", "mlops", "optimization", "pytorch", "serving". TopGit's editorial category is AI Tools.
Where can I see pytorch/serve in action?
The project maintains a homepage at https://pytorch.org/serve/. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about pytorch/serve?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/pytorch/serve is the definitive source.
Read full README in the tab above.
Is serve worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of serve.