Ascend NPU에 설치#
Xinference는 Ascend NPU에서 실행할 수 있으며, 다음 명령어를 사용하여 설치하세요.
경고
오픈소스 버전은 Transformers에 의존하여 추론을 수행하며, 310p3 등의 칩에서는 실행 속도가 느린 문제가 발생할 수 있습니다. 우리는 MindIE 엔진을 지원하는, 성능이 더 뛰어나고 호환성이 개선된 엔터프라이즈 버전을 제공하여 Ascend NPU를 지원합니다. 자세한 내용은 `Xinference 엔터프라이즈 버전 <https://xinference.cn>`_을 참조하십시오.
PyTorch 및 Ascend 확장 설치#
PyTorch CPU 버전과 해당 Ascend 확장을 설치합니다.
PyTorch v2.1.0를 예로 들어보겠습니다.
pip3 install torch==2.1.0 torchvision==0.16.0 --index-url https://download.pytorch.org/whl/cpu
다음으로 `昇腾 PyTorch 扩展 <https://gitee.com/ascend/pytorch>`_를 설치하십시오.
pip3 install 'numpy<2.0' pip3 install decorator pip3 install torch-npu==2.1.0.post3
다음 명령을 실행하여 확인합니다. 정상적으로 실행되면, Ascend NPU의 개수가 출력됩니다.
python -c "import torch; import torch_npu; print(torch.npu.device_count())"
Xinference 설치#
pip3 install xinference
이제 :ref:`문서 <using_xinference>`를 참고하여 Xinference를 사용할 수 있습니다. ``Transformers``는 오픈 소스에서 유일하게 지원하는 Ascend NPU 엔진입니다.
기업 지원#
If you encounter any performance or other issues with the Ascend NPU, please feel free to inquire about the Xinference Enterprise Edition. Contact us here.