Using without `trust_remote_code=True`
Dear authors,
Thank you for releasing your model and providing the code to start in the README.
Can you please add a section to README with instructions on how to avoid using trust_remote_code=True
. I do not like this option because even if I examine the code on HF thoroughly, it might change in the future and I would need to examine it again to be sure I am not installing/running some malware. In contrast, having a local copy gives me full control of what I am running.
I think, creating a directory and putting some of the code and config files available in this HF space would do the job. Can you please specify which files from the HF repository are needed and how to refer to them when setting up the model?
Many thanks,
George Batchkala
Hi George,
Thank you for your interest in our model.
You can clone the repository locally and init the model from it. Make sure you install LFS and do LFS pull to get the weights. Create virtual env, install the requirements, and then do:
from transformers import AutoModel
model = AutoModel.from_pretrained(".", local_files_only=True)
Try this and verify that you can reproduce the scores in README.
For more info on HF model init, see:
https://huggingface.co/docs/transformers/v4.46.3/en/main_classes/model#transformers.PreTrainedModel.from_pretrained
https://discuss.huggingface.co/t/download-models-for-local-loading/1963
Let us know if you have more questions.
Best,
George
Hi George,
Thank you for explaining this! I will let you know if I have any problems after I try it.
Best,
George