Skip to content

feat(reranker): detect Intel XPU for local cross-encoder acceleration#2328

Open
r266-tech wants to merge 1 commit into
vectorize-io:mainfrom
r266-tech:xpu-cross-encoder-2260
Open

feat(reranker): detect Intel XPU for local cross-encoder acceleration#2328
r266-tech wants to merge 1 commit into
vectorize-io:mainfrom
r266-tech:xpu-cross-encoder-2260

Conversation

@r266-tech

Copy link
Copy Markdown
Contributor

#2260 added Intel XPU device detection to LocalSTEmbeddings.initialize() (embeddings.py) but the byte-identical sibling block in LocalSTCrossEncoder.initialize() (cross_encoder.py) was left untouched. On an Intel Arc box, embeddings now run on XPU while the local cross-encoder reranker silently falls back to CPU.

This mirrors #2260 exactly into the cross-encoder: the XPU probe is guarded by hasattr(torch, "xpu") + torch.xpu.is_available() inside the existing try/except, so it is a no-op on all current CUDA/MPS/CPU hardware and cannot regress them.

Follow-up to #2260.

Mirror the XPU device-detection block vectorize-io#2260 added to LocalSTEmbeddings into
the byte-identical LocalSTCrossEncoder twin, so the local reranker also uses
Intel Arc XPU instead of silently falling back to CPU. Guarded by
hasattr(torch, 'xpu') + is_available(); no-op on CUDA/MPS/CPU.
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

Successfully merging this pull request may close these issues.

1 participant