Important
In addition to the README, please read the Wiki page for information about getting started!
Note
Need help? Join the Discord Server and get the Tabby
role. Please be nice when asking questions.
A FastAPI based application that allows for generating text using an LLM (large language model) using the Exllamav2 backend
TabbyAPI is also the official API backend server for ExllamaV2.
This project is marked as rolling release. There may be bugs and changes down the line. Please be aware that you might need to reinstall dependencies if needed.
TabbyAPI is a hobby project made for a small amount of users. It is not meant to run on production servers. For that, please look at other solutions that support those workloads.
TabbyAPI uses Exllamav2 as a powerful and fast backend for model inference, loading, etc. Therefore, the following types of models are supported:
-
Exl2 (Highly recommended)
-
GPTQ
-
FP16 (using Exllamav2's loader)
In addition, TabbyAPI supports parallel batching using paged attention for Nvidia Ampere GPUs and higher.
If you want to use a different model type or quantization method than the ones listed above, here are some alternative backends with their own APIs:
-
GGUF + GGML - KoboldCPP
-
Production ready + Many other quants + batching - Aphrodite Engine
-
Production ready + batching - VLLM
Find the model you want on huggingface models with exl2 quantization. For example: bartowski/Qwen2-7B-Instruct-exl2
Edit the variables in docker.sh
file.
MODEL_NAME=bartowski/Qwen2-7B-Instruct-exl2 -> repo name
REVISION=6_5 -> the specific model version to use (quantization bits in this case)
TAG=qwen2-7b -> docker image tag
PORT=5000 -> exposed port
Build service
bash docker.sh build
Run service
bash docker.sh start
Stop service
docker stop llm_onprem
Example:
curl http://127.0.0.1:5000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "test",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}'
Use the template when creating issues or pull requests, otherwise the developers may not look at your post.
If you have issues with the project:
-
Describe the issue in detail
-
If you have a feature request, please indicate it as such.
If you have a Pull Request
- Describe the pull request in detail, what, and why you are changing something
TabbyAPI would not exist without the work of other contributors and FOSS projects:
Creators/Developers: