-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from knmlprz/api-embeding
Api embeding as service
- Loading branch information
Showing
2 changed files
with
46 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,36 +57,42 @@ | |
|
||
### Starting app production | ||
|
||
#### Embedding api | ||
|
||
Download models (need git-lfs): | ||
#### Starting app | ||
|
||
```sh | ||
cd models | ||
git clone [email protected]:intfloat/e5-large-v2 | ||
docker compose --profile prod up | ||
``` | ||
|
||
Upon app startup, OpenAI-compatible embedding API will be available at: | ||
<http://172.16.3.101:5001/v1> | ||
### Starting llm and embedding | ||
|
||
Check the docs here: <http://172.16.3.101:5001/docs> | ||
1. Download model (must have for service llm-embedding to work!!!) | ||
|
||
#### Download llm model (must have for servis llm to work !!!) | ||
Download model (size of file 3.6GB ): | ||
|
||
Download model (size of file 3.6GB ): | ||
```sh | ||
curl -o ./llm/models/llama-2-7b.Q3_K_L.gguf -L https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q3_K_L.gguf | ||
``` | ||
|
||
```sh | ||
curl -o ./llm/models/llama-2-7b.Q3_K_L.gguf -L https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q3_K_L.gguf | ||
``` | ||
or | ||
|
||
or | ||
```sh | ||
wget -P ./llm/models/llama-2-7b.Q3_K_L.gguf https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q3_K_L.gguf | ||
``` | ||
|
||
```sh | ||
wget -P ./llm/models/llama-2-7b.Q3_K_L.gguf https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q3_K_L.gguf | ||
``` | ||
2. Launching llm and embedding | ||
|
||
#### Starting app | ||
2.1. Running on cpu | ||
|
||
```sh | ||
docker compose --profile prod up | ||
``` | ||
```sh | ||
docker compose --profile cpu up | ||
``` | ||
|
||
2.2. Running on gpu | ||
|
||
```sh | ||
docker compose --profile gpu up | ||
``` | ||
|
||
#### LLM and embedding api swagger | ||
|
||
Swegger with EP for completions(llm + embedding) and only embedding is [here](http://0.0.0.0:9000/docs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters