trust_remote_code=True and flash_attn

#16
by saehee - opened

Without the argument trust_remote_code=True, loading the model leads to a ValueError.

ValueError: The repository for upstage/solar-pro-preview-instruct contains custom code which must be executed to correctly load the model. You can inspect the repository content at https://hf.co/upstage/solar-pro-preview-instruct.
Please pass the argument trust_remote_code=True to allow custom code to be run.

Now after adding the argument, even after installing the library, an ImportError is raised.

ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run pip install flash_attn

This seems like a common error when using the trust_remote_code=True argument. (reference link here: https://github.com/huggingface/transformers/issues/28459)
Can anyone help me out with resolving this error?

uninstalling and re-installing flash_attn works for me!

saehee changed discussion status to closed

Sign up or log in to comment