Skip to content

Commit

Permalink
修复embdding
Browse files Browse the repository at this point in the history
  • Loading branch information
shell-nlp committed Dec 29, 2024
1 parent 8fc7d83 commit 1e180df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gpt_server/model_worker/embedding_infinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ def __init__(
self.mode = "rerank"
elif "ImageEmbedEngine" in engine_type_str:
self.mode = "image"
elif "PredictEngine" in engine_type_str:
self.mode = "classify"
self.engine: AsyncEmbeddingEngine = AsyncEngineArray.from_args([engine_args])[0]
loop = asyncio.get_running_loop()
loop.create_task(self.engine.astart())
logger.info(f"正在使用 {self.mode} 模型...")
logger.info(f"模型:{model_names[0]}")
logger.info(f"正在使用 {self.mode} 模型...")

async def astart(self):
await self.engine.astart()
Expand Down

0 comments on commit 1e180df

Please sign in to comment.