Skip to content

Commit

Permalink
update to 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
iaalm committed Apr 8, 2023
1 parent 3c3adb8 commit 9c464f0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 28 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ format:

tags:
ctags -R pretzel

pack:
$(PYTHON) -m build
64 changes: 37 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,19 @@
llama-api-server
=======

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Release](https://github.com/iaalm/llama-api-server/actions/workflows/release.yml/badge.svg)](https://github.com/iaalm/llama-api-server/actions/workflows/release.yml)

This project is under active deployment. Breaking changes could be made any time.

Llama as a Service! This project try to build a REST-ful API server compatible to OpenAI API using open source backends like llama.

#### Tested with
- [X] openai-python
- [X] OPENAI\_API\_TYPE=default
- [X] OPENAI\_API\_TYPE=azure

#### Supported APIs
- [X] Completions
- [X] set `temperature`, `top\_p`, and `top\_k`
- [X] set `max\_tokens`
- [ ] set `stop`
- [ ] set `stream`
- [ ] set `n`
- [ ] set `presence\_penalty` and `frequency\_penalty`
- [ ] set `logit\_bias`
- [X] Embeddings
- [X] batch process
- [ ] Chat

#### Supported backed
- [X] [llama.cpp](https://github.com/ggerganov/llama.cpp) via [llamacpp-python](https://github.com/thomasantony/llamacpp-python)
## Get started

#### Others
- [ ] Documents
- [ ] Token auth
- [ ] Intergration tests
- [ ] Performance parameters like `n_batch` and `n_thread`
- [ ] A tool to download/prepare pretrain model
### Prepare model

## Get started
#### llama.cpp
If you you don't have quantize llama, you need to follow [instruction](https://github.com/ggerganov/llama.cpp#usage) to prepare model.

### Install
```
Expand All @@ -59,3 +39,33 @@ python -m python -m llama_api_server
export OPENAI_API_BASE=http://127.0.0.1:5000/v1
openai api completions.create -e text-davinci-003 -p "hello?"
```

## Roadmap

#### Tested with
- [X] openai-python
- [X] OPENAI\_API\_TYPE=default
- [X] OPENAI\_API\_TYPE=azure

#### Supported APIs
- [X] Completions
- [X] set `temperature`, `top\_p`, and `top\_k`
- [X] set `max\_tokens`
- [ ] set `stop`
- [ ] set `stream`
- [ ] set `n`
- [ ] set `presence\_penalty` and `frequency\_penalty`
- [ ] set `logit\_bias`
- [X] Embeddings
- [X] batch process
- [ ] Chat

#### Supported backed
- [X] [llama.cpp](https://github.com/ggerganov/llama.cpp) via [llamacpp-python](https://github.com/thomasantony/llamacpp-python)

#### Others
- [ ] Documents
- [ ] Token auth
- [ ] Intergration tests
- [ ] Performance parameters like `n_batch` and `n_thread`
- [ ] A tool to download/prepare pretrain model
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "llama_api_server"
version = "0.1.0"
version = "0.1.2"
description = ""
authors = [
{name = "iaalm", email= "[email protected]"}
Expand All @@ -24,6 +24,12 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]

dependencies = [
"llamacpp>=0.1.11",
"Flask>=2.0.0",
"numpy",
]

[project.urls]
homepage = "https://github.com/iaalm/llama-api-server"
repository = "https://github.com/iaalm/llama-api-server"

0 comments on commit 9c464f0

Please sign in to comment.