AI4S/ESM2
模型介绍文件和版本Pull Requests讨论分析
下载使用量0

组件版本

hdk: 25.0.rc1.1
cann:8.1.RC1
torch:2.3.1
torch_npu:2.3.1.post2

环境准备

  • 创建虚拟环境
conda create -n esm_2 python=3.11.6
  • 安装基础依赖
pip install pyyaml numpy decorator attrs matplotlib
  • 安装torch_npu
pip install torch==2.3.1

wget https://gitee.com/ascend/pytorch/releases/download/v7.0.0-pytorch2.3.1/torch_npu-2.3.1.post2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

pip3 install torch_npu-2.3.1.post2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • 安装fair-esm
pip3 install fair-esm
pip install "fair-esm[esmfold]"

推理

  • source cann
source /usr/local/Ascend/ascend-toolkit/set_env.sh
  • 运行
python pretrained.py