Skip to content

Commit d80890c

Browse files
committed
feat: initial testing for translating with qwen 2.5
1 parent b78b584 commit d80890c

12 files changed

Lines changed: 102287 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ build/
3636
# Uploaded files (if saved locally during dev)
3737
uploads/
3838
data/
39+
40+
models/
41+
.models

docker-compose.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,28 @@ services:
7070
exit 0;
7171
"
7272
73+
vllm:
74+
container_name: qwen2.5
75+
image: vllm/vllm-openai:latest
76+
runtime: nvidia
77+
ipc: host
78+
volumes:
79+
- ./models/Qwen2.5-14B-Instruct:/mnt/model/
80+
# - /home/ubuntu/.cache/hugging-face:/root/.cache/huggingface
81+
ports:
82+
- "80:8000"
83+
environment:
84+
- NVIDIA_VISIBLE_DEVICES=0,1,2,3
85+
- HF_HUB_OFFLINE=1
86+
command: [
87+
"--model", "/mnt/model/",
88+
"--served-model-name","qwen2.5",
89+
"--max-model-len", "4096",
90+
"--tensor-parallel-size", "4",
91+
"--gpu-memory-utilization", "0.8",
92+
"--enable-auto-tool-choice",
93+
"--tool-call-parser", "hermes"
94+
]
95+
7396
volumes:
7497
minio-data:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from fastapi import FastAPI
2+
from routers import health
3+
from docling_translation_service.routers import translation
4+
from routers import session
5+
import logging
6+
7+
# Set up logger
8+
logging.basicConfig(
9+
level=logging.INFO,
10+
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s"
11+
)
12+
13+
app = FastAPI()
14+
15+
app.include_router(health.router)
16+
app.include_router(translation.router)
17+
app.include_router(session.router)

0 commit comments

Comments
 (0)