Parcourir la source

fix: disable tokenizers parallelism in lmdeploy server configuration

myhloli il y a 3 semaines
Parent
commit
7516d3ddf4
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      mineru/model/vlm/lmdeploy_server.py

+ 2 - 0
mineru/model/vlm/lmdeploy_server.py

@@ -64,6 +64,8 @@ def main():
     if os.getenv('OMP_NUM_THREADS') is None:
         os.environ["OMP_NUM_THREADS"] = "1"
 
+    os.environ["TOKENIZERS_PARALLELISM"] = "false"
+
     # 启动 lmdeploy 服务器
     print(f"start lmdeploy server: {sys.argv}")