Simple, scalable AI model deployment on GPU clusters
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
gitlawr 24eb231d4e
docs: update inference backend
1 year ago
.github fix: vox dependency on macOS 1 year ago
docs docs: update inference backend 1 year ago
gpustack refactor: add backend params support for vox-box 1 year ago
hack ci: update to semver 1 year ago
tests feat: more schedule detail messages 1 year ago
.flake8 feat: db migration 2 years ago
.gitignore fix: remove sudo from brew commands 1 year ago
.pre-commit-config.yaml docs: add CNAME file 2 years ago
Dockerfile chore: update base image for cuda 1 year ago
Dockerfile.cpu feat: add audio to dockerfile 1 year ago
Dockerfile.musa Add Dockerfile for musa 1 year ago
Dockerfile.npu fix: set env and download tools 1 year ago
LICENSE docs: update 2 years ago
Makefile refactor: enhance windows dev script 2 years ago
README.md Update doc and naming 1 year ago
alembic.ini feat: db migration 2 years ago
docker-compose.yaml chore: update compose 1 year ago
install.ps1 fix: windows post check 1 year ago
install.ps1.sha256sum fix: windows post check 1 year ago
install.sh fix: vox dependency on macOS 1 year ago
install.sh.sha256sum fix: vox dependency on macOS 1 year ago
mkdocs.yml docs: backend version 1 year ago
poetry.lock chore: upgrade vox-box from 0.0.6 to 0.0.7 1 year ago
pyproject.toml chore: upgrade vox-box from 0.0.6 to 0.0.7 1 year ago

README.md


GPUStack


Documentation License WeChat Discord Follow on X(Twitter)


demo

GPUStack is an open-source GPU cluster manager for running large language models(LLMs).

Key Features

  • Supports a Wide Variety of Hardware: Run with different brands of GPUs in Apple MacBooks, Windows PCs, and Linux servers.
  • Scales with Your GPU Inventory: Easily add more GPUs or nodes to scale up your operations.
  • Distributed Inference: Supports both single-node multi-GPU and multi-node inference and serving.
  • Multiple Inference Backends: Supports llama-box (llama.cpp) and vLLM as the inference backends.
  • Lightweight Python Package: Minimal dependencies and operational overhead.
  • OpenAI-compatible APIs: Serve APIs that are compatible with OpenAI standards.
  • User and API key management: Simplified management of users and API keys.
  • GPU metrics monitoring: Monitor GPU performance and utilization in real-time.
  • Token usage and rate metrics: Track token usage and manage rate limits effectively.

Installation

Linux or MacOS

GPUStack provides a script to install it as a service on systemd or launchd based systems. To install GPUStack using this method, just run:

curl -sfL https://get.gpustack.ai | sh -s -

Windows

Run PowerShell as administrator (avoid using PowerShell ISE), then run the following command to install GPUStack:

Invoke-Expression (Invoke-WebRequest -Uri "https://get.gpustack.ai" -UseBasicParsing).Content

Other Installation Methods

For manual installation, docker installation or detailed configuration options, please refer to the Installation Documentation.

Getting Started

  1. Run and chat with the llama3.2 model:
gpustack chat llama3.2 "tell me a joke."
  1. Open http://myserver in the browser to access the GPUStack UI. Log in to GPUStack with username admin and the default password. You can run the following command to get the password for the default setup:

Linux or MacOS

cat /var/lib/gpustack/initial_admin_password

Windows

Get-Content -Path "$env:APPDATA\gpustack\initial_admin_password" -Raw
  1. Click Playground in the navigation menu. Now you can chat with the LLM in the UI playground.

Playground Screenshot

  1. Click API Keys in the navigation menu, then click the New API Key button.

  2. Fill in the Name and click the Save button.

  3. Copy the generated API key and save it somewhere safe. Please note that you can only see it once on creation.

  4. Now you can use the API key to access the OpenAI-compatible API. For example, use curl as the following:

export GPUSTACK_API_KEY=myapikey
curl http://myserver/v1-openai/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $GPUSTACK_API_KEY" \
  -d '{
    "model": "llama3.2",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "stream": true
  }'

Supported Platforms

  • MacOS
  • Linux
  • Windows

Supported Accelerators

  • Apple Metal
  • NVIDIA CUDA
  • Ascend CANN
  • Moore Threads MUSA

We plan to support the following accelerators in future releases.

  • AMD ROCm
  • Intel oneAPI
  • Qualcomm AI Engine

Supported Models

GPUStack uses llama.cpp and vLLM as the backends and supports a wide range of models. Models from the following sources are supported:

  1. Hugging Face

  2. ModelScope

  3. Ollama Library

Example language models:

Example multimodal models:

For full list of supported models, please refer to the supported models section in the inference backends documentation.

OpenAI-Compatible APIs

GPUStack serves the following OpenAI compatible APIs under the /v1-openai path:

  • List Models
  • Create Completions
  • Create Chat Completions
  • Create Embeddings

For example, you can use the official OpenAI Python API library to consume the APIs:

from openai import OpenAI
client = OpenAI(base_url="http://myserver/v1-openai", api_key="myapikey")

completion = client.chat.completions.create(
  model="llama3.2",
  messages=[
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ]
)

print(completion.choices[0].message)

GPUStack users can generate their own API keys in the UI.

Documentation

Please see the official docs site for complete documentation.

Build

  1. Install python 3.10+.

  2. Run make build.

You can find the built wheel package in dist directory.

Contributing

Please read the Contributing Guide if you're interested in contributing to GPUStack.

License

Copyright (c) 2024 The GPUStack authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE file for details.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.