-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]: Can't load the model for 'gpt-cpm-small-cn-distill' #8230
Comments
已修复,或者回退到2.6版本试一下。 |
还是不行吧。 model_name = "gpt-cpm-small-cn-distill" tokenizer = GPTChineseTokenizer.from_pretrained(model_name) inputs = "花间一壶酒,独酌无相亲。举杯邀明月," outputs, _ = model.generate(input_ids=inputs_ids, max_length=10, decode_strategy="greedy_search", use_fast=True) result = tokenizer.convert_ids_to_string(outputs[0].numpy().tolist()) print("Model input:", inputs) Traceback (most recent call last) KeyError: 'model_state' During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) File /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/paddlenlp/transformers/model_utils.py:2116, in PretrainedModel.from_pretrained(cls, pretrained_model_name_or_path, *args, **kwargs) File /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/paddlenlp/transformers/model_utils.py:1638, in PretrainedModel._resolve_model_file_path(cls, pretrained_model_name_or_path, from_hf_hub, from_aistudio, cache_dir, subfolder, config, convert_from_torch, use_safetensors, variant) OSError: Can't load the model for 'gpt-cpm-small-cn-distill'. If you were trying to load it from 'https://paddlenlp.bj.bcebos.com/' |
我在aistduio上跑的,一直报这个错,这云环境有关系吗? |
查看一下你的paddle版本,可以装develop版本试一下 |
我是在昆仑芯R200上跑的,也碰到了同样的问题,请问你解决了吗 |
|
按照如下的命令试一下:
|
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。 |
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。 |
This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。 |
请提出你的问题
from paddlenlp.transformers import GPTChineseTokenizer, GPTLMHeadModel
model_name = "gpt-cpm-small-cn-distill"
tokenizer = GPTChineseTokenizer.from_pretrained(model_name)
model = GPTLMHeadModel.from_pretrained(model_name)
why say "OSError: Can't load the model for 'gpt-cpm-small-cn-distill'. If you were trying to load it from 'https://paddlenlp.bj.bcebos.com/'"?
The text was updated successfully, but these errors were encountered: