AMCT (PyTorch)
This section uses Ubuntu 20.04 as an example to describe installation preparations. AMCT (PyTorch) supports compression on NPU and CPU processors. The version mapping is as follows.
Type |
Version Requirement |
How to Obtain |
Restriction |
|---|---|---|---|
OS and version |
Ubuntu 20.04 (x86_64) |
Download the required software release from the Ubuntu official website and install it. Run the following command to query the installation: cat /etc/*release && uname -m |
|
OS and version |
Ubuntu 20.04 (AArch64) |
Download the required software release from the Ubuntu official website and install it. Run the following command to query the installation: cat /etc/*release && uname -m |
|
PyTorch |
2.7.1, 2.1.0, 1.10.0, 1.8.0, 1.5.0, 1.4.0
|
Install the CPU or GPU version as needed. For details, see Installing Dependencies. |
|
NPU environment |
Prepare a hardware environment with the AI processor and install the driver, firmware, and CANN package. For details, see CANN Software Installation. |
You need to install the driver, firmware, and CANN package to perform quantization on the NPU. |
|
Ascend Extension for PyTorch |
For details about the version mapping, click here and see "Release Notes > Product Version Mapping." |
- |
|
ONNX |
1.18.0, 1.16.1, 1.14.0, 1.9.0, 1.8.0 |
For details, see Installing Dependencies. |
|
ONNX Runtime |
1.20.0, 1.16.0, 1.8.0, 1.6.0 |
||
Python |
Python3.12/3.13, Python3.11.x, Python3.10.x, Python3.9.x, Python3.8.x, Python3.7.x |
For the Ubuntu OS, see Python 3.9.2 Installation on Ubuntu. For EulerOS, see Python3.9.2 Installation on EulerOS. |
|
NumPy |
|
For details, see Installing Dependencies. |
|
Protobuf |
|
||
pyyaml |
- |
- |
Install this dependency only when performing LLM-based quantization. |
transformers |
5.5.4 |
- |
Install this dependency only when performing LLM-based quantization. |
loguru |
- |
- |
Install this dependency only when performing LLM-based quantization. |
datasets |
- |
- |
Install this dependency only when performing LLM-based quantization. |
accelerate |
- |
- |
Install this dependency only when performing LLM-based quantization. |
compressed_tensors |
0.15.0.1 |
- |
Install this dependency only when performing LLM-based quantization. |
scipy |
- |
- |
Install this dependency only when performing LLM-based quantization. |
torchao |
- |
- |
Install this dependency only when performing LLM-based quantization. |
einops |
- |
- |
Install this dependency only when performing LLM-based quantization. |
sentencepiece |
- |
- |
Install this dependency only when performing LLM-based quantization. |
datasets |
4.8.4 |
- |
Install this dependency only when performing LLM-based quantization. |
zstandard |
0.25.0 |
- |
Install this dependency only when performing LLM-based quantization. |