EasyJailbreak / EasyJailbreak

An easy-to-use Python framework to generate adversarial jailbreak prompts.
http://easyjailbreak.org/
GNU General Public License v3.0
438 stars 39 forks source link

got an unexpected keyword argument 'model_name_or_path' #24

Open Flagami opened 4 months ago

Flagami commented 4 months ago

Traceback (most recent call last): File "/storage/zhaofulai/projects/EasyJailbreak/tutorial/diy_attacker.py", line 5, in target_model = HuggingfaceModel(model_name_or_path='meta-llama/Llama-2-7b-chat-hf', TypeError: HuggingfaceModel.init() got an unexpected keyword argument 'model_name_or_path'

I got this error while running the demo scripts of diy attack parts

Isaac-theori commented 4 months ago

I'm having the same problem.

marcorosa commented 2 months ago

meta's models require authentication. Did you export the huggingface token before running that script?

Jeff-Huang-SHU commented 4 weeks ago

I encountered the same problem. It seems there's no input keyword named 'model_name_or_path', but 'model', 'tokenizer', 'model_name'.