* Add non-JSON version of `tools` and `functions` to `template_vars`. Increase the compatibility with VLLM templates which use a non-JSON tools object. * Add list of tool template variables to the documentation * Use Jinja templates to provide `tools_json` and `functions_json` This should be functionally equivelant, but the JSON won't be produced unless it's needed. * Make message.tool_calls match the JSON from ToolCallProcessor * Log something when generating tool calls * Add template for Qwen QwQ 32b * Only log if tool calls have been detected * API: Fix tool call variable assignments Jinja functions do not run when variables are called. Use json.dumps instead. In addition, log the request ID when stating that a tool call was fired. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com> * Add `ToolCallProcessor.dump()` to get the list of processed dicts * Remove qwen_qwq_32b.jinja This will be added to the following repository at a later date: https://github.com/theroyallab/llm-prompt-templates --------- Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com> Co-authored-by: kingbri <8082010+kingbri1@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| backends | ||
| colab | ||
| common | ||
| docker | ||
| docs | ||
| endpoints | ||
| loras | ||
| models | ||
| sampler_overrides | ||
| templates | ||
| tests | ||
| update_scripts | ||
| .dockerignore | ||
| .gitignore | ||
| api_tokens_sample.yml | ||
| config_sample.yml | ||
| formatting.bat | ||
| formatting.sh | ||
| LICENSE | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| start.bat | ||
| start.py | ||
| start.sh | ||
TabbyAPI
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
Tabbyrole. Please be nice when asking questions.
Note
Want to run GGUF models? Take a look at YALS, TabbyAPI's sister project.
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.
Disclaimer
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.
Getting Started
Important
Looking for more information? Check out the Wiki.
For a step-by-step guide, choose the format that works best for you:
📖 Read the Wiki – Covers installation, configuration, API usage, and more.
🎥 Watch the Video Guide – A hands-on walkthrough to get you up and running quickly.
Features
- OpenAI compatible API
- Loading/unloading models
- HuggingFace model downloading
- Embedding model support
- JSON schema + Regex + EBNF support
- AI Horde support
- Speculative decoding via draft models
- Multi-lora with independent scaling (ex. a weight of 0.9)
- Inbuilt proxy to override client request parameters/samplers
- Flexible Jinja2 template engine for chat completions that conforms to HuggingFace
- Concurrent inference with asyncio
- Utilizes modern python paradigms
- Continuous batching engine using paged attention
- Fast classifier-free guidance
- OAI style tool/function calling
And much more. If something is missing here, PR it in!
Supported Model Types
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.
Contributing
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
Acknowldgements
TabbyAPI would not exist without the work of other contributors and FOSS projects:
Developers and Permissions
Creators/Developers: