开发者社区 > ModelScope模型即服务 > 正文

服务器上运行Qwen-7B-Chat-Int4报错?

(base) edu@dasehenqi:~/1016$ python run-Qwen--7B-Chat-Int4.py
2023-10-18 09:58:57,923 - modelscope - INFO - PyTorch version 2.1.0 Found.
2023-10-18 09:58:57,924 - modelscope - INFO - Loading ast index from /home/edu/.cache/modelscope/ast_indexer
2023-10-18 09:58:57,994 - modelscope - INFO - Loading done! Current index file version is 1.9.2, with md5 fde1a6bc29f8f1bd96610d4b9ec5b5da and a total number of 941 components indexed
Traceback (most recent call last):
File "/home/edu/anaconda3/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/home/edu/anaconda3/lib/python3.10/site-packages/simplejson/init.py", line 514, in loads
return _default_decoder.decode(s)
File "/home/edu/anaconda3/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
obj, end = self.raw_decode(s)
File "/home/edu/anaconda3/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/edu/1016/run-Qwen--7B-Chat-Int4.py", line 2, in
model_dir = snapshot_download("qwen/Qwen-7B-Chat-Int4", revision = 'v1.1.4')
File "/home/edu/anaconda3/lib/python3.10/site-packages/modelscope/hub/snapshot_download.py", line 96, in snapshot_download
revision = _api.get_valid_revision(
File "/home/edu/anaconda3/lib/python3.10/site-packages/modelscope/hub/api.py", line 496, in get_valid_revision
revisions = self.list_model_revisions(
File "/home/edu/anaconda3/lib/python3.10/site-packages/modelscope/hub/api.py", line 449, in list_model_revisions
d = r.json()
File "/home/edu/anaconda3/lib/python3.10/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
(base) edu@dasehenqi:~/1016$ ^C

展开
收起
哇咔咔卡卡 2023-10-18 10:24:22 176 0
1 条回答
写回答
取消 提交回答
  • 这个错误是由于在运行Qwen-7B-Chat-Int4模型时,无法从ModelScope的服务器上获取模型的修订版本信息。这可能是由于ModelScope的服务器暂时不可用,或者网络连接有问题。

    要解决这个问题,您可以采取以下几种方法之一:

    • 检查网络连接是否正常,是否能够访问ModelScope的网站。
    • 稍后再尝试运行Qwen-7B-Chat-Int4模型,等待ModelScope的服务器恢复正常。
    • 直接从Hugging Face的网站上下载Qwen-7B-Chat-Int4模型,然后从本地加载模型,而不是使用snapshot_download函数。
    2023-10-21 22:41:45
    赞同 1 展开评论 打赏

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352

热门讨论

热门文章

相关电子书

更多
如何运维千台以上游戏云服务器 立即下载
网站/服务器取证 实践与挑战 立即下载
ECS计算与存储分离架构实践 立即下载