Skip to content
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

pass kwargs into AutoModel.from_pretrained #1354

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ayang
Copy link

@ayang ayang commented Jan 25, 2025

比如local_files_only必须传进去,要不断网后没法使用。直接把所有kwargs传进去是没问题的,因为 transformers/models/auto/auto_factory.py from_pretrained 函数对参数进行了过滤。

比如local_files_only必须传进去,要不断网后没法使用。直接把所有kwargs传进去是没问题的,因为 transformers/models/auto/auto_factory.py from_pretrained 函数对参数进行了过滤。
@hanhainebula
Copy link
Collaborator

你好,@ayang,谢谢提交这个 PR。考虑到简洁性,local_files_only 这个参数是不是可以用本地的 model_name_or_path 绝对路径替代?或者通过指定 cache_dir 参数来解决呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants