trust_remote_code=True
Hello!
I'm new at this sort of stuff and for the life of me, I cannot figure out where I set the trust_remote_code to true. I've downloaded it from the Oobagooba UI but when I try running it I've ran into this error.
ValueError: Loading models\OccamRazor_mpt-7b-storywriter-4bit-128g requires you to execute the configuration file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option trust_remote_code=True
to remove this error.
I had to ask chatGpt on how to fix it... which is ironic (it didn't work) and gave me this answer down below
"You can copy and paste this code into a Python file or a Python interactive environment, such as a Jupyter Notebook, to instantiate a pre-trained model and turn on trust_remote_code.
Open a text editor, such as Notepad or Sublime Text, and create a new file.
Copy the following code into the file:
python
Copy code
import transformers
model = transformers.AutoModelForCausalLM.from_pretrained(
'mosaicml/mpt-7b-storywriter',
trust_remote_code=True
)
Save the file with a .py extension, for example, my_model.py.
Open a command prompt or terminal and navigate to the directory where the file is saved.
Type python my_model.py and press Enter to run the file.
I've also gone through all the files in the repository and Word searching for "trust_remote_code" and I didn't find anywhere where I could change it to true.
if anyone could explain it to me how or where to set trust_remote_code to true for a dummy like me would be greatly appreciated.
This method is not working for me on this model but it does on the og storywriter model. I'll leave it here so you know
One way of doing that is to launch it in the env In ooba so:
launch cmd_windows.bat file in you main ooba floder
in the command prompt type "cd text-generation-webui" and hit enter.
in that command prompt you can launch by typing "python server.py --model mosaicml_mpt-7b-storywriter --listen --trust-remote-code"
That worked in the other model for me. I got it from cheshire - https://www.youtube.com/watch?v=QVVb6Md6huA&t=1s
The other way to do it that I have found is detailed here at about 08.35 - https://www.youtube.com/watch?v=O9Y_ZdsuKWQ