出错了

#3
by wbbbbb - opened

audio_start_id: 155163, audio_end_id: 155164, audio_pad_id: 151851.

OSError Traceback (most recent call last)
Cell In[17], line 10
6 tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-Audio", trust_remote_code=True)
9 # use cuda device
---> 10 model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-Audio", device_map="cuda", fp16=True,trust_remote_code=True).eval()

File /usr/local/lib/python3.10/dist-packages/transformers/models/auto/auto_factory.py:462, in _BaseAutoModelClass.from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
458 class_ref = config.auto_map[cls.name]
459 model_class = get_class_from_dynamic_module(
460 class_ref, pretrained_model_name_or_path, **hub_kwargs, **kwargs
461 )
--> 462 return model_class.from_pretrained(
463 pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
464 )
465 elif type(config) in cls._model_mapping.keys():
466 model_class = _get_model_class(config, cls._model_mapping)

File ~/.cache/huggingface/modules/transformers_modules/Qwen/Qwen-Audio/02f8fd45af17fb606010fead66dc2e56fc803543/modeling_qwen.py:1037, in QWenLMHeadModel.from_pretrained(cls, pretrained_model_name_or_path, config, cache_dir, *model_args, **kwargs)
1034 from huggingface_hub import hf_hub_download
1035 hf_hub_download(repo_id=pretrained_model_name_or_path, filename="mel_filters.npz",
1036 token=kwargs.get('token', None), local_dir=os.path.dirname(file))
-> 1037 return super().from_pretrained(pretrained_model_name_or_path, *model_args, config=config, cache_dir=cache_dir,
1038 **kwargs)

File /usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py:2493, in PreTrainedModel.from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
2487 raise EnvironmentError(
2488 f"{pretrained_model_name_or_path} does not appear to have a file named"
2489 f" {_add_variant(WEIGHTS_NAME, variant)} but there is a file without the variant"
2490 f" {variant}. Use variant=None to load this model from those weights."
2491 )
2492 else:
-> 2493 raise EnvironmentError(
2494 f"{pretrained_model_name_or_path} does not appear to have a file named"
2495 f" {_add_variant(WEIGHTS_NAME, variant)}, {TF2_WEIGHTS_NAME}, {TF_WEIGHTS_NAME} or"
2496 f" {FLAX_WEIGHTS_NAME}."
2497 )
2498 except EnvironmentError:
2499 # Raise any environment error raise by cached_file. It will have a helpful error message adapted
2500 # to the original exception.
2501 raise

OSError: Qwen/Qwen-Audio does not appear to have a file named pytorch_model.bin, tf_model.h5, model.ckpt or flax_model.msgpack.

我也遇到了这个问题,我用git clone了modelscope上的模型就可以了,但是在遇到这个问题之前,模型能工作的时候,还是能正常识别的,当我用git clone来获得模型之后,效果就不行了,输出的识别结果就很乱了

Sign up or log in to comment