tabby/README.md

67 lines
2.4 KiB
Markdown
Raw Normal View History

2023-03-27 04:09:07 +00:00
<div align="center">
2023-03-27 04:45:59 +00:00
2023-03-27 04:09:07 +00:00
# 🐾 Tabby
2023-03-16 09:28:20 +00:00
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
2023-03-16 09:26:43 +00:00
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
2023-03-22 15:20:24 +00:00
![Docker build status](https://img.shields.io/github/actions/workflow/status/TabbyML/tabby/docker.yml?label=docker%20image%20build)
2023-03-27 04:45:59 +00:00
2023-03-27 05:26:03 +00:00
![architecture](https://user-images.githubusercontent.com/388154/227848286-f5b697f2-9df7-4adc-9a2a-84b029788030.png)
2023-03-27 04:45:59 +00:00
2023-03-27 04:09:07 +00:00
</div>
2023-03-16 09:26:43 +00:00
> **Warning**
2023-03-27 04:09:07 +00:00
> Tabby is still in the alpha phrase
An opensource / on-prem alternative to GitHub Copilot.
## Features
* Self-contained, with no need for a DBMS or cloud service
* Web UI for visualizing and configuration models and MLOps.
* OpenAPI interface, easy to integrate with existing infrastructure (e.g Cloud IDE).
* Consumer level GPU supports (FP-16 weight loading with various optimization).
2023-03-16 10:23:45 +00:00
2023-03-27 04:54:37 +00:00
## Get started
2023-03-27 04:59:08 +00:00
### Docker
2023-03-27 04:54:37 +00:00
The easiest way of getting started is using the `deployment/docker-compose.yml`:
```bash
docker-compose up
```
Note: To use GPUs, you need to install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html). We also recommend using NVIDIA drivers with CUDA version 11.8 or higher.
You can then query the server using `/v1/completions` endpoint:
```bash
curl -X POST http://localhost:5000/v1/completions -H 'Content-Type: application/json' --data '{
"prompt": "def binarySearch(arr, left, right, x):\n mid = (left +"
}'
```
We also provides an interactive playground in admin panel [localhost:8501](http://localhost:8501)
![image](https://user-images.githubusercontent.com/388154/227792390-ec19e9b9-ebbb-4a94-99ca-8a142ffb5e46.png)
2023-03-22 16:21:07 +00:00
2023-03-27 04:59:08 +00:00
### API documentation
Tabby opens an FastAPI server at [localhost:5000](https://localhost:5000), which embeds an OpenAPI documentation of the HTTP API.
2023-03-27 05:07:41 +00:00
## Development
Go to `development` directory.
2023-03-28 13:06:45 +00:00
```bash
2023-03-27 05:07:41 +00:00
make dev
```
or
2023-03-28 13:06:45 +00:00
```bash
2023-03-28 13:06:28 +00:00
make dev-python # Turn off triton backend (for non-cuda env developers)
2023-03-27 05:07:41 +00:00
```
2023-03-27 04:45:59 +00:00
## TODOs
2023-03-26 16:13:19 +00:00
2023-03-28 12:12:39 +00:00
* [X] DuckDB integration, to plot metrics in admin panel (e.g acceptance rate). [#24](https://github.com/TabbyML/tabby/issues/24)
2023-03-28 08:31:54 +00:00
* [ ] Fine-tuning models on private code repository. [#23](https://github.com/TabbyML/tabby/issues/23)
2023-03-27 04:09:07 +00:00
* [ ] Production ready (Open Telemetry, Prometheus metrics).
2023-03-27 04:48:58 +00:00
* [ ] Token streaming using Server-Sent Events (SSE)