Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xla_device argument has been deprecated #57

Closed
pendekarcode opened this issue Aug 21, 2021 · 2 comments
Closed

xla_device argument has been deprecated #57

pendekarcode opened this issue Aug 21, 2021 · 2 comments

Comments

@pendekarcode
Copy link

I found notifications like this:

The xla_device argument has been deprecated in v4.4.0 of Transformers. It is ignored and you can safely remove it from your config.json file.
The xla_device argument has been deprecated in v4.4.0 of Transformers. It is ignored and you can safely remove it from your config.json file.

My model code:
sentence_model = SentenceTransformer("distilbert-base-nli-stsb-mean-tokens", device="cpu")
kw_model = KeyBERT(model=sentence_model)

Thanks

@MaartenGr
Copy link
Owner

You get this warning since device="cpu" in the SentenceTransformer class is deprecated. Now, it automatically detects whether you have a cpu or gpu. In other words, you can remove that parameter.

@pendekarcode
Copy link
Author

Hi @MaartenGr Thanks for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants