neulab / prompt2model

prompt2model - Generate Deployable Models from Natural Language Instructions
Apache License 2.0
1.96k stars 177 forks source link

Support models that require trust_remote_code #357

Open neubig opened 1 year ago

neubig commented 1 year ago

Some recent models require Hugging Face's trust_remote_code to be set to true. This should be off by default, but we should allow users to set it if they wish. Reference: https://github.com/neulab/prompt2model/issues/356

In order to implement this, trust_remote_code will probably need to be set when we load the model here: https://github.com/neulab/prompt2model/blob/72d97cce42e7fa13db95f317fd2717611813bc05/prompt2model/model_trainer/generate.py#L64-L77

This should be set as an argument to GenerationModelTrainer with a default of false: https://github.com/neulab/prompt2model/blob/72d97cce42e7fa13db95f317fd2717611813bc05/prompt2model/model_trainer/generate.py#L28

imdevtej commented 1 year ago

I Will do it