Trust remote code requirement - why?

#4
by k8si - opened

I disabled trust_remote_code in the from_pretrained calls because it is not clear what code this would execute and it seems like a terrible idea to trust arbitrary remote code. I get an error The repository for microsoft/Florence-2-base-ft contains custom code which must be executed to correctly load the model. You can inspect the repository content at https://hf.co/microsoft/Florence-2-base-ft. But there is no additional information about this code provided in the model card.

Would your team be willing to provide a description of the code that must be executed to load this model, as well as a pointer to the python source code that would be downloaded/executed?

Anything that is not included in transformers library will require trust_remote_code to execute their modeling_XXX.py. You need python code to know how to init/forward a model.

Microsoft org

hi @k8si , since florence-2 is not yet in the official transformers library, trust_remote_code is needed for loading the model.

Sign up or log in to comment