install huggingface transformers

Step 1: 首先下载源文件并安装

git clone https://github.com/huggingface/transformers.git
cd transformers
pip install -e .

Step 2: 测试

安装pytest, pip install pytest
安装examples需要的库,pip install -r ./examples/requirements.txt

python -m pytest -sv ./transformers/tests/
python -m pytest -sv ./examples/

你可能感兴趣的:(install huggingface transformers)