Support for AMD ROCm?

Author: SebJansenCreated Jan 17, 2023Updated Sep 21, 2026

I see that in the docs there are CUDA-specific instructions, though none about ROCm.

From what I understand, PyTorch supports ROCm, but as a newcomer it is unclear to me how I can get support working.

By doing a print(model.device) it tells me that on default settings, CPU is being used, even though I have an AMD GPU in my system.

Source: huggingface/sentence-transformers