Browse Source

fix: disable tokenizers parallelism in lmdeploy server configuration

myhloli 2 weeks ago
parent
commit
7516d3ddf4
1 changed files with 2 additions and 0 deletions
  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:
     if os.getenv('OMP_NUM_THREADS') is None:
         os.environ["OMP_NUM_THREADS"] = "1"
         os.environ["OMP_NUM_THREADS"] = "1"
 
 
+    os.environ["TOKENIZERS_PARALLELISM"] = "false"
+
     # 启动 lmdeploy 服务器
     # 启动 lmdeploy 服务器
     print(f"start lmdeploy server: {sys.argv}")
     print(f"start lmdeploy server: {sys.argv}")