Open maayansharon10 opened 4 days ago
Hello!
Your code is correct,
model_kwargs={'device_map': "auto"},
indeed works with most transformers
architectures. However, it seems that modeling_mpnet
hasn't been updated to add the _no_split_modules
behaviour. Sadly, I can't find much info/docs on how to set _no_split_modules
beyond https://github.com/huggingface/transformers/issues/29786, so I'm not sure what it should be defined as.
Perhaps we can make a fresh issue on transformers
to add _no_split_modules
to MPNetModel
. cc @amyeroberts
Hi,
Trying to load model
all-mpnet-base-v2
withmap_device="auto"
.Following this closed issue I understand that it is possible to load a model with
map_device="auto"
, but I'm not sure what's the syntax when using the example from the doc and not using.from_pretrained()
. Couldn't find an example in the documentation.My current code follows the documentation:
When tried the following:
Got this error -
Again, circling back to the face that in the issue above, and I might misunderstood, there's an option to add
map_device
. If not possible, is there any other way to tackle this?P.s This issue might be similar, not sure if I should have commented there, sorry in advance if I should have.