TypeError: forward() takes 2 positional arguments but 3 were given

#1
by DanielTTY - opened

I tried this and it gives the error:
TypeError: forward() takes 2 positional arguments but 3 were given

This is the same error when one sets "--gradient_checkpointing False".

@DanielTTY i'll take a look at this tomorrow if you give me more information

Does it work for you with the 7B parameter model from cekal? Can you also confirm your pytorch and transformers versions? Also can you post the full stack trace and maybe a minimal reproducible script if you have it handy

hey @DanielTTY , I haven't managed to replicate this. I'm using pytorch 2.0.1 and transformers 4.28.1.

I won't be able to help much unless I get a way to replicate this so if you can help answer the questions above i'll take a closer look. Not sure which "forward" method is failing there (it doesn't seem to be the MPT one, that doesn't have 2 positional arguments) so if you can post the full trace that'd help.

eluzhnica changed discussion status to closed

Sign up or log in to comment