mirror of
https://github.com/katanemo/plano.git
synced 2026-07-14 16:22:12 +02:00
Add support for local llm (mistral 7b) (#31)
This commit is contained in:
parent
b49fc2f264
commit
445b1ea210
24 changed files with 703 additions and 51 deletions
16
embedding-server/.vscode/launch.json
vendored
Normal file
16
embedding-server/.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "embedding server",
|
||||
"cwd": "${workspaceFolder}/app",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "uvicorn",
|
||||
"args": ["main:app","--reload", "--port", "8000"],
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -35,9 +35,11 @@ RUN apt-get update && apt-get install -y \
|
|||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN python install.py
|
||||
# comment it out for now as we don't want to download the model every time we build the image
|
||||
# we will mount host cache to docker image to avoid downloading the model every time
|
||||
# see docker-compose file for more details
|
||||
|
||||
# RUN python install.py && \
|
||||
# find /root/.cache/torch/sentence_transformers/ -name onnx -exec rm -rf {} +
|
||||
|
||||
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import os
|
|||
import sentence_transformers
|
||||
from gliner import GLiNER
|
||||
|
||||
def load_transformers(models = os.getenv("MODELS", "sentence-transformers/all-MiniLM-L6-v2")):
|
||||
def load_transformers(models = os.getenv("MODELS", "BAAI/bge-large-en-v1.5")):
|
||||
transformers = {}
|
||||
|
||||
for model in models.split(','):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue