Reason for `trust_remote_code`?
Hey team and thank you for the model!
Quick question - can you please give more details on the need for trust_remote_code
? If I remember correctly, it is related to AliBi (but I might be wrong). Additional details would be welcome.
Thank you in advance!
Hello!
trust_remote_code
is required for loading code from a model repository. This is required for model implementations that are not natively implemented in transformers
.
In particular, for this model, these files are loaded:
- https://huggingface.co./jinaai/jina-reranker-v1-turbo-en/blob/main/modeling_bert.py
- https://huggingface.co./jinaai/jina-reranker-v1-turbo-en/blob/main/configuration_bert.py
If you ever see trust_remote_code=True
when loading a model, feel free to inspect any Python files in the repository. The files & classes that are used will be described in the config.json
here.
Based on my quick glance, everything looks quite normal.
- Tom Aarsen
Thank you, @tomaarsen !