huggingface / setfit

Efficient few-shot learning with Sentence Transformers
https://hf.co/docs/setfit
Apache License 2.0
2.14k stars 217 forks source link

Error While Loading Model. #399

Open joaopfp opened 1 year ago

joaopfp commented 1 year ago

Hey there, when trying to open a model using .from_pretrained I get the following error: Expected one of cpu, cuda, mkldnn, opengl, opencl, ideep, hip, msnpu, xla device type at start of device string: meta.

The model was trained and saved in a different machine than that in which the error is raised. In the local machine the loading occurs fine.

tomaarsen commented 9 months ago

Hello!

Do you happen to know whether it failed at loading the SentenceTransformer body or the classification head? And do you know if you were using a differentiable head? If so, then it may be related to this: https://github.com/huggingface/setfit/pull/327

It seems that the model immediately tries to load in whatever device was used when training the model. This is indeed not ideal.