Skip to content

Commit bd3b836

Browse files
committed
升级版本
1 parent 36cdde1 commit bd3b836

File tree

6 files changed

+166
-192
lines changed

6 files changed

+166
-192
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ __pycache__/
66
*.egg-info
77
logs/
88
outputs/
9-
data/
9+
data/
10+
.env

gpt_server/model_backend/vllm_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async def stream_chat(self, params: Dict[str, Any]) -> AsyncGenerator:
8787
if multimodal: # 多模态模型
8888
# ----------------------------------------------------------------
8989
model_config = await self.engine.get_model_config()
90-
conversation, mm_data_future = parse_chat_messages_futures(
90+
conversation, mm_data_future, _ = parse_chat_messages_futures(
9191
messages, model_config, tokenizer, content_format="string"
9292
)
9393

gpt_server/serving/main.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,37 @@
2525
delete_log,
2626
)
2727

28+
29+
def delete_flash_attn():
30+
"删除 flash_attn,避免报错"
31+
import shutil
32+
import os
33+
from pathlib import Path
34+
from loguru import logger
35+
36+
root_path = Path(__file__).parent.parent.parent
37+
flash_attn_path = root_path.joinpath(
38+
".venv/lib/python3.11/site-packages/flash_attn"
39+
)
40+
41+
try:
42+
# 检查路径是否存在
43+
if os.path.exists(flash_attn_path):
44+
# 删除整个目录树
45+
shutil.rmtree(flash_attn_path)
46+
logger.info(f"成功删除: {flash_attn_path}")
47+
48+
except PermissionError:
49+
logger.error("权限不足,无法删除 flash_attn")
50+
except Exception as e:
51+
logger.error(f"删除 flash_attn 失败: {e}")
52+
53+
2854
# 删除日志
2955
delete_log()
3056

57+
delete_flash_attn()
58+
3159
config_path = os.path.join(root_dir, "gpt_server/script/config.yaml")
3260
env = os.getenv("ENV")
3361
if env == "test":

pyproject.toml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "gpt_server"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
description = "gpt_server是一个用于生产级部署LLMs、Embedding、Reranker、ASR和TTS的开源框架。"
55
readme = "README.md"
66
license = { text = "Apache 2.0" }
@@ -11,21 +11,21 @@ dependencies = [
1111
"fastapi==0.115.0",
1212
"ffmpy",
1313
"fschat==0.2.36",
14-
"infinity-emb[all]==0.0.76",
14+
"infinity-emb[all]==0.0.77",
1515
"lmdeploy==0.10.0",
1616
"loguru>=0.7.2",
1717
"openai==1.99.1",
1818
"setuptools==75.2.0",
1919
"streamlit==1.39.0",
20-
"torch==2.6.0",
21-
"torchvision==0.20.1",
22-
"vllm",
20+
"torch==2.8.0",
21+
"torchvision==0.23.0",
22+
"vllm==0.10.2",
2323
"qwen_vl_utils",
2424
"evalscope[perf,rag]==0.16.1",
2525
"modelscope==1.26.0",
2626
"edge-tts>=7.0.0",
2727
"funasr>=1.2.6",
28-
"sglang[all]>=0.5.1.post3",
28+
"sglang[all]>=0.5.2",
2929
"flashinfer-python",
3030
"flashtts>=0.1.7",
3131
"diffusers>=0.35.1",
@@ -37,31 +37,26 @@ dependencies = [
3737
default-groups = [] # 默认只安装dependencies中的库
3838
override-dependencies = [
3939
"setuptools==77.0.3",
40-
"torchvision==0.23.0",
41-
"torchaudio==2.8.0",
42-
"torch==2.8.0",
43-
"triton==3.4.0",
44-
"transformers==4.56.1", # infinity-emb
45-
"soundfile==0.13.1", # infinity
46-
"xgrammar==0.1.23", # sglang[all]==0.4.5 depends on xgrammar==0.1.17
47-
"flashinfer-python==0.2.10",
48-
"outlines-core==0.2.10", # sglang 和 vllm 的冲突
49-
"peft>=0.17.0", # 和 lmdeloy 冲突
40+
"transformers==4.56.1", # infinity-emb
41+
"soundfile==0.13.1", # infinity
42+
"xgrammar==0.1.24", # sglang[all]==0.4.5 depends on xgrammar==0.1.17
43+
"outlines-core==0.2.11", # sglang 和 vllm 的冲突
44+
"peft>=0.17.0", # 和 lmdeloy 冲突
5045
]
5146

5247
[project.scripts]
5348
gpt_server = "gpt_server.cli:main"
5449

55-
[tool.uv.sources]
56-
vllm = { index = "vllm-custom" }
50+
# [tool.uv.sources]
51+
# vllm = { index = "vllm-custom" }
5752

5853
[[tool.uv.index]]
5954
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
6055
default = true
6156

62-
[[tool.uv.index]]
63-
name = "vllm-custom"
64-
url = "https://wheels.vllm.ai/006e7a34aeb3e905ca4131a3251fe079f0511e2f"
57+
# [[tool.uv.index]]
58+
# name = "vllm-custom"
59+
# url = "https://wheels.vllm.ai/006e7a34aeb3e905ca4131a3251fe079f0511e2f"
6560

6661
[build-system]
6762
requires = ["setuptools", "wheel"]

0 commit comments

Comments
 (0)