01-ai / Yi-1.5

Yi-1.5 is an upgraded version of Yi, delivering stronger performance in coding, math, reasoning, and instruction-following capability.
Apache License 2.0
355 stars 20 forks source link

modelscope模型下载问题 #15

Closed airsxue closed 1 month ago

airsxue commented 1 month ago

为什么通过以下脚本下载模型文件会报错,我用这个指令下载其他模型都是没问题的

import torch from modelscope import snapshot_download, AutoModel, AutoTokenizer from modelscope import GenerationConfig model_dir = snapshot_download('01-ai/Yi-1.5-34B-Chat', cache_dir='/public/home/team4/zerooneai', revision='master')

Yimi81 commented 1 month ago

能给一下报错信息吗

airsxue commented 1 month ago

能给一下报错信息吗

在这儿: (zerooneai) [team4@ZSGPU14 zerooneai]$ python zeroone_download.py 2024-05-17 23:15:09,932 - modelscope - INFO - PyTorch version 2.3.0 Found. 2024-05-17 23:15:09,933 - modelscope - INFO - Loading ast index from /public/home/team4/.cache/modelscope/ast_indexer 2024-05-17 23:15:12,143 - modelscope - INFO - No valid ast index found from /public/home/team4/.cache/modelscope/ast_indexer, generating ast index from prebuilt! 2024-05-17 23:15:12,478 - modelscope - INFO - Loading done! Current index file version is 1.9.5, with md5 f620269b7f4a89ac910ac3a2292b4e70 and a total number of 945 components indexed 2024-05-17 23:15:33,005 - modelscope - ERROR - Authentication token does not exist, failed to access model 01-ai/Yi-1.5-34B-Chat which may not exist or may be private. Please login first. Traceback (most recent call last): File "/public/home/team4/.conda/envs/zerooneai/lib/python3.10/site-packages/modelscope/hub/errors.py", line 91, in handle_http_response response.raise_for_status() File "/public/home/team4/.conda/envs/zerooneai/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://www.modelscope.cn/api/v1/models/01-ai/Yi-1.5-34B-Chat/revisions?EndTime=1715958932

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/public/home/team4/Industrial/XUECONG/zerooneai/zeroone_download.py", line 4, in model_dir = snapshot_download('01-ai/Yi-1.5-34B-Chat', cache_dir='/public/home/team4/zerooneai', revision='master') File "/public/home/team4/.conda/envs/zerooneai/lib/python3.10/site-packages/modelscope/hub/snapshot_download.py", line 96, in snapshot_download revision = _api.get_valid_revision( File "/public/home/team4/.conda/envs/zerooneai/lib/python3.10/site-packages/modelscope/hub/api.py", line 478, in get_valid_revision all_revisions = self.list_model_revisions( File "/public/home/team4/.conda/envs/zerooneai/lib/python3.10/site-packages/modelscope/hub/api.py", line 448, in list_model_revisions handle_http_response(r, logger, cookies, model_id) File "/public/home/team4/.conda/envs/zerooneai/lib/python3.10/site-packages/modelscope/hub/errors.py", line 98, in handle_http_response raise HTTPError('Response details: %s, Request id: %s' % requests.exceptions.HTTPError: Response details: {'Code': 10010205001, 'Message': '获取模型版本失败,信息:record not found', 'RequestId': '786c28ce-1935-4c60-9c12-ae620f03f442', 'Success': False}, Request id: c9a72b77f15f4eb6ad6e83e2aae51fce

Yimi81 commented 1 month ago

这似乎是modelscope方面的问题,请参考这个https://github.com/modelscope/modelscope/issues/535

airsxue commented 1 month ago

这似乎是modelscope方面的问题,请参考这个modelscope/modelscope#535

好的 我试一下 多谢回复~

nuoma commented 1 month ago

modelscope 1.14.0,我这里测试没问题model_dir = snapshot_download('01ai/Yi-1.5-34B', cache_dir='./', revision='master')