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

ValueError: Unrecognized model in tencent/Tencent-Hunyuan-Large. Should have a model_type key in its config.json #15

Open
hrak99 opened this issue Nov 17, 2024 · 2 comments

Comments

@hrak99
Copy link

hrak99 commented Nov 17, 2024

The subject error was generated when I tried to use the following code,

from transformers import AutoModel,AutoTokenizer model_name = "tencent/Tencent-Hunyuan-Large" model = AutoModel.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name)

@mayihehou
Copy link
Collaborator

请配置trust_remote_code=True

tokenizer = AutoTokenizer.from_pretrained("hunyuan-7B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("hunyuan-7B", device_map="auto", trust_remote_code=True)

@hrak99
Copy link
Author

hrak99 commented Nov 30, 2024

the error persists.

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

No branches or pull requests

2 participants