GPUStack
Project description
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
- Run and chat with the llama3.2 model:
gpustack chat llama3.2 "tell me a joke."
- Open
http://myserver
in the browser to access the GPUStack UI. Log in to GPUStack with usernameadmin
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
- Click
Playground
in the navigation menu. Now you can chat with the LLM in the UI playground.
-
Click
API Keys
in the navigation menu, then click theNew API Key
button. -
Fill in the
Name
and click theSave
button. -
Copy the generated API key and save it somewhere safe. Please note that you can only see it once on creation.
-
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
We plan to support the following accelerators in future releases.
- AMD ROCm
- Intel oneAPI
- MTHREADS MUSA
- 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:
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
-
Install
python 3.10+
. -
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file gpustack-0.3.2rc1.tar.gz
.
File metadata
- Download URL: gpustack-0.3.2rc1.tar.gz
- Upload date:
- Size: 4.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96caa64de12156613037be235176bc7ad32202ededc8ac4a411f35af2fe59736 |
|
MD5 | 4598e9013a3e1286841c9ed0a5652e9f |
|
BLAKE2b-256 | 7fca904a428b097f7718daa8dbcb5171fd6987b9d65927cc38bada63593416e3 |
File details
Details for the file gpustack-0.3.2rc1-py3-none-win_amd64.whl
.
File metadata
- Download URL: gpustack-0.3.2rc1-py3-none-win_amd64.whl
- Upload date:
- Size: 7.9 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f136f5541180b05ec05eef4c0fdfebc295aa3591963f6ba837e38c9720c12b6 |
|
MD5 | b262834bebeaa4b7ca8cb526fdceae6d |
|
BLAKE2b-256 | 425923053a618be5332bf685501ca48295d04b0a626748188563dfa735b6b097 |
File details
Details for the file gpustack-0.3.2rc1-py3-none-manylinux2014_x86_64.whl
.
File metadata
- Download URL: gpustack-0.3.2rc1-py3-none-manylinux2014_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4eed84f0da498b3f37cc58d9ece84550ab55a0b159d3f06185b21fa0ea221af9 |
|
MD5 | 935e1662e64aa800077fe64bfff23e30 |
|
BLAKE2b-256 | 5c2157f70177c55298f15c9fd27b7952482d604fac0dd53514598839f2c5af9f |
File details
Details for the file gpustack-0.3.2rc1-py3-none-manylinux2014_aarch64.whl
.
File metadata
- Download URL: gpustack-0.3.2rc1-py3-none-manylinux2014_aarch64.whl
- Upload date:
- Size: 4.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92be3ae568709f2408e1923df453607c3126508747a6b0457376cab22986e6bc |
|
MD5 | 19cf74c019a12e544a59ca44f270923e |
|
BLAKE2b-256 | ee57fcdf3f6f80088cd6f5d11bca0eb558327fedc687fa0353a23aeea8e1b555 |
File details
Details for the file gpustack-0.3.2rc1-py3-none-macosx_11_0_universal2.whl
.
File metadata
- Download URL: gpustack-0.3.2rc1-py3-none-macosx_11_0_universal2.whl
- Upload date:
- Size: 4.0 MB
- Tags: Python 3, macOS 11.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9452f35c6602663e5167d75e8f72786abea5b8579ae4ac1372f15f5d82ae9df7 |
|
MD5 | e9e826fa9364ebcd27f841ca4acad5a3 |
|
BLAKE2b-256 | 04c9284b25a88b68d115c29bb448233cbb6afe425b215258976cce8b66045b80 |