AI 模型量化

在使用社区中介绍的模型量化方法进行模型量化时,
第一步进行xquant-1.1.3-py3-none-any.whl安装时,使用$ python3 -m pip install spacengine-wheel/xquant/xquant-1.1.0-py3-none-any.whl --extra-index-url https://pypi.ngc.nvidia.com

这条命令报错不能连上这个网址,用电脑和手机连接https://pypi.ngc.nvidia.com这个网址也不能连接,请问有什么解决办法?


可在此链接查看当前由我们维护的pypi,xquant已更新至2.0.2, 软件包库 · archive / pypi · GitLab
另外,如果 --extra-index-url https://pypi.ngc.nvidia.com无法连接,转为使用清华源/阿里源也可以,--extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple

按照您回复的信息,下载了最新版本的WHL文件2.0.3版本,并按社区模型量化部分中教程进行安装(使用的是清华的源):$ python3 -m pip install xquant-2.0.3-py3-none-any.whl --extra-index-url Simple Index
提示仍然是连接不成功:
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, Simple Index
Processing ./xquant-2.0.3-py3-none-any.whl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcec531ed40>: Failed to establish a new connection: [Errno 101] Network is unreachable’)': /simple/onnxconverter-common/
随后用电脑和手机都测试了清华源的网址,发现能连接,但是随后就不响应了,请问还能有什么方法解决,或者,还有什么方式能进行模型量化?

根据您的提示,下载了最新的量化工具安装包,我们使用命令安装量化工具:pip --trusted-host pypi.tuna.tsinghua.edu.cn --disable-pip-version-check install spacemit-ai-sdk.v1.1.0/spacengine-wheel/xquant/xquant-2.0.3-py3-none-any.whl -i Simple Index
遇到问题:
Collecting nvidia-pyindex
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/92/59/813c065a5434541c1fff59b3a25f2767e5d176b470ef3a9b025f21edc71d/nvidia-pyindex-1.0.9.tar.gz (10 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
/usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
。。。
ERROR: Could not find a version that satisfies the requirement appdirs<1.5,>=1.4 (from versions: none)
ERROR: No matching distribution found for appdirs<1.5,>=1.4
发现在下载依赖nvidia-pyindex时就报错,不知是什么原因?