This PR fixes a bug introduced in the huggingface-inference-toolkit version 0.4.2, affecting sentence-transformers due to the propagation of the kwargs such as the trust_remote_code flag, which was leading to some issues, so those have now been patched so that trust_remote_code and other allowed kwargs can be provided, while some are popped in advanced as not supported e.g. tokenizer or framework.
Description
This PR fixes a bug introduced in the
huggingface-inference-toolkit
version 0.4.2, affectingsentence-transformers
due to the propagation of the kwargs such as thetrust_remote_code
flag, which was leading to some issues, so those have now been patched so thattrust_remote_code
and other allowed kwargs can be provided, while some are popped in advanced as not supported e.g.tokenizer
orframework
.