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

Issue running inference on Huggingface after model upload #13

Open
umm-maybe opened this issue May 28, 2023 · 2 comments
Open

Issue running inference on Huggingface after model upload #13

umm-maybe opened this issue May 28, 2023 · 2 comments

Comments

@umm-maybe
Copy link

Followed the instructions to create a new model repo and add the required files via Git. When I test the uploaded model via the HF sandbox, I get the following error:

Loading umm-maybe/StackStar_Santa requires you to execute the configuration file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option trust_remote_code=True to remove this error.

It's unclear which configuration file it's referring to, but I did notice the config.json references the parent model (santacoder), instead of mine, and changed that. I also executed the configuration_gpt2_mq.py, which does nothing. There's no trust_remote_code option in either of these files; from what I understand it's an option when running local inference using AutoModelForCausalLM.from_pretrained. It's not clear how to set this option for on-line inference via the HuggingFace Hub.

@loubnabnl
Copy link
Owner

make sure you have the configuration and modeling files of santacoder in your modek repo and call the model with trust_remote_code=True

model = AutoModelForCausalLM.from_pretrained(checkpoint, trust_remote_code=True)

@umm-maybe
Copy link
Author

Hi, thank you for the response. Let me clarify that I want to run inference using the Huggingface Accelerated CPU API, not locally. I can't find the equivalent place to set this option... unless you're saying to set this before running model.push_to_hub()?

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