diff --git a/docs/features/poetry_guide.md b/docs/features/poetry_guide.md new file mode 100644 index 0000000000000000000000000000000000000000..b3b8a404aba9c4b0146c3f841d4d70a16a726277 --- /dev/null +++ b/docs/features/poetry_guide.md @@ -0,0 +1,20 @@ + +### poetry管理环境 + +```shell +# 准备MindSpeed-LLM及megatron +git clone https://github.com/NVIDIA/Megatron-LM.git +git clone https://gitee.com/ascend/MindSpeed-LLM.git +cp -r Megatron-LM/megatron MindSpeed-LLM/ +cd MindSpeed-LLM + +# 创建并进入虚拟环境 +pip install poetry +poetry env use python3.8 +poetry shell + +# 手动安装PTA,MindSpeed-LLM依赖库会根据pyproject.toml文件自动安装 +poetry add torch-2.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl +poetry add torch_npu-2.1.0.post8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl +poetry add apex-0.1.dev20241015+ascend-cp38-cp38-linux_aarch64.whl +``` \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..1030df0d2ae1e11836403b39203dd57b257bec67 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,51 @@ +[tool.poetry] +name = "mindspeed-llm" +version = "0.1.0" +description = "The Python dependencies of MindSpeed-LLM" +authors = [""] +readme = "README.md" + +[tool.poetry.dependencies] +python = ">=3.8" +numpy = ">=1.19.2,<2.0.0" +transformers = "4.43.2" +transformers-stream-generator = "*" +sympy = "*" +decorator = "*" +scipy = "*" +sentencepiece = "*" +einops = "*" +datasets = ">=2.16.0" +pybind11 = "*" +accelerate = "*" +six = "*" +protobuf = "*" +peft = "0.7.1" +tiktoken = "*" +ray = "2.10.0" +tensordict = "0.1.2" +hydra-core = "1.3.2" +codetiming = "*" +bitsandbytes-npu-beta = "0.45.2" +word2number = "*" +latex2sympy2 = "*" +antlr4-python3-runtime = "==4.9.*" +ninja = "*" +wheel = "*" +regex = "*" +attrs = "*" +psutil = "*" +pyyaml = "*" +tokenizers = "<=0.20.3" +gpytorch = "*" +pandas = "*" +scikit-learn = "*" +SQLAlchemy = "*" +mindspeed = { git = "https://gitee.com/ascend/MindSpeed.git", rev = "0dfa0035ec54d9a74b2f6ee2867367df897299df" } + +[tool.poetry.group.dev.dependencies] +pytest = "^8.3.5" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" \ No newline at end of file