imp icon indicating copy to clipboard operation
imp copied to clipboard

ModuleNotFoundError: No module named 'transformers_modules.MILVLG.Imp-v1'

Open ersanliqiao opened this issue 1 year ago • 2 comments

why??

ersanliqiao avatar Aug 07 '24 09:08 ersanliqiao

Hey, thanks for your issue. It's easy to work out. You just need to add a '/ ' after the model's path.

bruceisme avatar Aug 29 '24 13:08 bruceisme

After I add '/' to the model path, I get this error.

from transformers import pipeline

messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe = pipeline(
    "text-generation",
    model="MILVLG/Imp-v1.5-4B-Phi3/",
    trust_remote_code=True,
    revision="main"
)
pipe(messages)


---------------------------------------------------------------------------

HFValidationError                         Traceback (most recent call last)

[/usr/local/lib/python3.11/dist-packages/transformers/utils/hub.py](https://localhost:8080/#) in cached_files(path_or_repo_id, filenames, cache_dir, force_download, resume_download, proxies, token, revision, local_files_only, subfolder, repo_type, user_agent, _raise_exceptions_for_gated_repo, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash, **deprecated_kwargs)
    423             # This is slightly better for only 1 file
--> 424             hf_hub_download(
    425                 path_or_repo_id,

9 frames

HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'MILVLG/Imp-v1.5-4B-Phi3/'. Use `repo_type` argument if needed.


During handling of the above exception, another exception occurred:

HFValidationError                         Traceback (most recent call last)

[/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_validators.py](https://localhost:8080/#) in validate_repo_id(repo_id)
    152 
    153     if repo_id.count("/") > 1:
--> 154         raise HFValidationError(
    155             "Repo id must be in the form 'repo_name' or 'namespace/repo_name':"
    156             f" '{repo_id}'. Use `repo_type` argument if needed."

HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'MILVLG/Imp-v1.5-4B-Phi3/'. Use `repo_type` argument if needed

artificialnouveau avatar Apr 27 '25 16:04 artificialnouveau