Skip to main content

Serving LLMs at Scale

Project description

Breathing Life into Language

aphrodite

Aphrodite is an inference engine that optimizes the serving of HuggingFace-compatible models at scale. Built on vLLM's Paged Attention technology, it delivers high-performance model inference for multiple concurrent users. Developed through a collaboration between PygmalionAI and Ruliad, Aphrodite serves as the backend engine powering both organizations' chat platforms and API infrastructure.

Aphrodite builds upon and integrates the exceptional work from various projects, primarily vLLM.

Features

Quickstart

Install the engine:

pip install -U aphrodite-engine --extra-index-url https://downloads.pygmalion.chat/whl

Then launch a model:

aphrodite run Qwen/Qwen3-0.6B

If you're not serving at scale, you can append the --single-user-mode flag to limit memory usage.

This will create a OpenAI-compatible API server that can be accessed at port 2242 of the localhost. You can plug in the API into a UI that supports OpenAI, such as SillyTavern.

Please refer to the documentation for the full list of arguments and flags you can pass to the engine, or simply run aphrodite run -h to see the full list of arguments.

You can play around with the engine in the demo here:

Open In Colab

Docker

Additionally, we provide a Docker image for easy deployment. Here's a basic command to get you started:

docker run --runtime nvidia --gpus all \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    #--env "CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7" \
    -p 2242:2242 \
    --ipc=host \
    alpindale/aphrodite-openai:latest \
    --model NousResearch/Meta-Llama-3.1-8B-Instruct \
    --tensor-parallel-size 8 \
    --api-key "sk-empty"

This will pull the Aphrodite Engine image, and launch the engine with the Llama-3.1-8B-Instruct model at port 2242.

Requirements

  • Operating System: Linux, Windows (WSL2)
  • Python: 3.9 to 3.12

Build Requirements:

  • CUDA >= 12

For supported devices, see here. Generally speaking, all semi-modern GPUs are supported - down to Pascal (GTX 10xx, P40, etc.) We also support AMD GPUs, Intel CPUs and GPUs, Google TPU, and AWS Inferentia.

Notes

  1. By design, Aphrodite takes up 90% of your GPU's VRAM. If you're not serving an LLM at scale, you may want to limit the amount of memory it takes up. You can do this in the API example by launching the server with the --gpu-memory-utilization 0.6 (0.6 means 60%), or --single-user-mode to only allocate as much memory as needed for a single sequence.

  2. You can view the full list of commands by running aphrodite run --help.

Acknowledgements

Aphrodite Engine would have not been possible without the phenomenal work of other open-source projects. A (non-exhaustive) list:

Sponsors

Past and present, in alphabetical order:

Contributing

Everyone is welcome to contribute. You can support the project by opening Pull Requests for new features, fixes, or general UX improvements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aphrodite_engine-0.10.0.tar.gz (24.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aphrodite_engine-0.10.0-py3-none-any.whl (16.8 MB view details)

Uploaded Python 3

File details

Details for the file aphrodite_engine-0.10.0.tar.gz.

File metadata

  • Download URL: aphrodite_engine-0.10.0.tar.gz
  • Upload date:
  • Size: 24.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for aphrodite_engine-0.10.0.tar.gz
Algorithm Hash digest
SHA256 0fa00409bb05f419ce9ac0b0fb48986923d35aea3e61a7ae643c0259ddb4009f
MD5 943b137d0a6ee4a7e95d3032a49acace
BLAKE2b-256 40377bb3b296e96620b90ab7d869f4175c0aa32da93f967700949cc2d9506e90

See more details on using hashes here.

File details

Details for the file aphrodite_engine-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aphrodite_engine-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0dda9b5d69345e7328abed05bdcc23125ed24cf7cdcefe03028aaf8a5ae7b21
MD5 79719e9098850d239ddd9565bf3f8314
BLAKE2b-256 8e7d53c7b0aac3bd4a9481c543a47286c078a5d0771cef7cac8635daf7f3ae11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page