cd FastChat-76f0424d1add61aadc8e5bdeed5ebe540f266ba3 vi pyproject.toml
[project] name = "fschat" version = "0.2.2" description = "An open platform for training,serving,and evaluating large language model based chatbots." readme = "README.md" requires-python = ">=3.8" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: Apache Software License", ] dependencies = [ "accelerate", "fastAPI", "gradio==3.23", "markdown2[all]", "numpy", "prompt_toolkit>=3.0.0", "requests", "rich>=10.0.0", "sentencepiece", "shortuuid", "transformers>=4.28.0", "tokenizers>=0.12.1", "torch", "uvicorn", "wandb", "httpx", "shortuuid", "pydantic", ]
修改后(python 一般使用3.7较多,并固定transformers版本):
[project] name = "fschat" version = "0.2.2" description = "An open platform for training, serving, and evaluating large language model based chatbots." readme = "README.md" requires-python = ">=3.7" # 当前 NPU python3.7使用较多 classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: Apache Software License", ] dependencies = [ "accelerate", "fastAPI", "gradio==3.23", "markdown2[all]", "numpy", "prompt_toolkit>=3.0.0", "requests", "rich>=10.0.0", "sentencepiece", "shortuuid", "transformers==4.28.1", "tokenizers>=0.12.1", # 锁定修改版本 "uvicorn", "httpx", "shortuuid", "pydantic", ]
pip3 install einops sympy regex decorator scipy setuptools_scm prompt_toolkit pip3 install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple cd ..
pip3 install deepspeed==0.9.2 git clone https://gitee.com/ascend/DeepSpeed.git cd DeepSpeed pip3 install . # 安装deepspeed_npu cd ..