You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I encode text with device = "cpu", I get slightly different results from device="gpu".
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("all-mpnet-base-v2")
cpu_embs = model.encode("this is a test", device="cpu")
gpu_embs = model.encode("this is a test", device="cuda:0")
cpu_embs.eq(gpu_embs) == False
From investigation, this is a result of floating point arithmetic errors (the diffs are on the order of 1e-6). Is this an issue with sentence-transformers, or with the underlying pytorch?
The text was updated successfully, but these errors were encountered:
When I encode text with device = "cpu", I get slightly different results from device="gpu".
From investigation, this is a result of floating point arithmetic errors (the diffs are on the order of 1e-6). Is this an issue with sentence-transformers, or with the underlying pytorch?
The text was updated successfully, but these errors were encountered: