Risks of Remote Code Execution.
Hi. Can anyone tell me the risks of using the param "trust_remote_code=True".
Hello!
If you set trust_remote_code
to True, then you agree to "trust" the code from this repository. Notably, the code in modeling.py and configuration.py. This code is not authored by the transformers
or sentence_transformers
maintainers themselves, so for security purposes you have to set trust_remote_code=True
to run this "remote" code.
I didn't write any of the code in this repository, but I did look it over. As far as I can tell, it looks proper/normal. I use this model without worries.
If it makes you feel a bit better, then you can also download the repository and load that local model instead. Then you know that the modeling code won't be unexpectedly changed one day. I believe you can also set revision=2aa5579fcae1c579de199a3866b6e514bbbf5d10
(a.k.a. the last commit) when loading the model and then you'll always get the model at this version, rather than any unexpected updates.
- Tom Aarsen