Model requires permission to load due to custom code

by KennethEnevoldsen - opened

Seems like the model requires permission to load due to the custom code. This leads to the model being hard to include in workflows e.g. using the sentence transformer package. Would it be possible to commit the custom code as an architecture?

(I would like to include the model in a benchmark, but can't at the moment)

@KennethEnevoldsen You can e.g. set trust_remote_code=True in your from_pretrained methods to automate it - that's what I've done in ScandEval, for instance.

Yea but the sentence transformer does not expose the argument (and I can't pass it in)

edit: ideally I would make a PR to the sentence transformers to allow it

Language Technology Group (University of Oslo) org

Hi, we opened a PR to merge the custom code into transformers, but the HF team recommended us to do it this way instead. Did you make a PR to the sentence transformers? I'd be happy to support you there :)

Hi @davda54 , I have not made a PR, but agree that would be the ideal solution. If I find the time for it I might have a look at it.

Sign up or log in to comment