Different Embeddings values on different OS
Author: samarthsarin
Pull request: no

### System Info

Sentence Transformers Version - 2.2.0
Platform - Windows 10
Python Version - 3.8.5

I am trying to create word embeddings for a couple of words and the same embeddings are not getting generated on different OS machines. I have checked it on Windows and Linux machines. I am trying to perform clustering on text embeddings and te embeddings are not the same for a particular word hence the overall clusters are not the same. I am doing all development on my windows machine and the final deployment is on AWS EC2 instance which is a Linux machine. The results of embeddings are the same on both machines. Can you please help me solve this issue? I have tried setting all the seed values but still then are not the same. There is a very small variation that starts at the 4th or 5th decimal position in the embeddings array.

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

from sentence_transformers import SentenceTransformer, util
import random
import numpy as np
import torch
import os

random.seed(42)
np.random.seed(42)
torch.manual_seed(42)
torch.cuda.manual_seed_all(42)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
os.environ['PYTHONHASHSEED'] = str(42)
torch.use_deterministic_algorithms(True)

model = SentenceTransformer('sentence-transformers/msmarco-distilbert-base-v2')
embeddings = model.encode(sentences)

model.encode("customer experience")

### Expected behavior

The embedding created doesn't have exactly same values across different machines. Specially for different OS Machines. The value starts to differ at 4th or 5th positions of every element. Here is the embeddings array of my machine for the word "customer experience"

array([-5.63166857e-01, -4.05957282e-01,  3.00267637e-01, -2.46767655e-01,
        4.89773035e-01, -1.94317810e-02,  1.80651009e-01,  8.92449439e-01,
       -1.74235195e-01,  3.29178236e-02, -1.19764984e-01,  2.58512050e-01,
        1.51172578e+00, -5.46738386e-01, -1.15303159e-01, -5.24251983e-02,
       -2.24761695e-01,  3.28272223e-01,  4.98460889e-01, -8.20172966e-01,
       -1.17172766e+00, -9.98448491e-01,  3.21752965e-01,  3.72964174e-01,
        1.82584435e-01, -4.08045053e-01, -2.02570185e-01, -4.01083052e-01,
       -1.54582113e-01,  6.08542264e-02,  3.55301678e-01,  1.58671722e-01,
       -4.71475840e-01, -4.93791938e-01,  1.62821263e-04,  3.33021164e-01,
        2.97434449e-01,  3.72983813e-01, -5.82175553e-01, -8.59432593e-02,
       -1.84757441e-01, -5.53481221e-01,  6.05549157e-01, -1.52354419e-01,
       -8.89008582e-01, -1.22463606e-01, -6.02528095e-01, -1.82574391e-01,
        3.01688969e-01,  6.89519763e-01,  2.30612442e-01,  6.26742125e-01,
        8.43013823e-02, -3.03132862e-01, -1.85130581e-01,  5.28024077e-01,
        6.71206862e-02, -9.32246521e-02, -4.03505266e-02, -4.49038267e-01,
        5.06386906e-03,  7.86191404e-01, -8.70651156e-02, -7.72568226e-01,
       -1.32925123e-01, -1.24123693e-01,  3.29535365e-01, -5.11285424e-01,
       -5.65095618e-02,  9.33079541e-01,  3.53344619e-01, -5.66991568e-01,
        2.39370614e-01,  6.86836958e-01, -1.44293070e+00, -2.73904860e-01,
       -1.90752760e-01,  5.77968955e-01, -3.78967732e-01, -2.59176493e-01,
        2.76730835e-01, -5.14467835e-01,  1.06894684e+00, -4.06756431e-01,
       -6.92828238e-01, -2.19953716e-01,  4.77855325e-01, -5.88070691e-01,
        5.13936020e-02,  2.48879939e-01, -4.67677772e-01, -2.15098113e-01,
       -1.09672315e-01,  1.01601869e-01, -2.71980494e-01,  4.15393680e-01,
        2.42622405e-01,  1.73546404e-01, -1.73137829e-01,  9.69614685e-02,
        4.23627317e-01, -9.35343504e-02,  8.40337425e-02, -3.80988598e-01,
        2.08486021e-01,  5.14860749e-01,  3.26781601e-01, -5.36286473e-01,
       -3.18198889e-01,  8.19383442e-01, -6.75107002e-01, -1.86185926e-01,
        3.88082922e-01,  8.55610073e-01, -7.86133289e-01,  3.95356789e-02,
       -2.44248822e-01,  1.14838436e-01,  6.87963545e-01, -9.37253654e-01,
        1.19670846e-01,  2.22856849e-02, -1.01163872e-02,  2.25836709e-01,
        8.92986879e-02, -6.63402498e-01,  5.70526302e-01,  6.88406408e-01,
       -8.66231248e-02, -4.10765529e-01,  5.30590117e-01, -7.02219427e-01,
       -3.93625051e-01,  6.24131560e-01,  1.48762420e-01,  8.14396262e-01,
        4.03758168e-01, -4.09283876e-01, -1.13471504e-02,  1.74081907e-01,
        2.16557682e-01, -8.00780594e-01,  3.03449005e-01, -2.27454484e-01,
       -1.42966017e-01, -5.93980193e-01,  6.39644504e-01, -4.82465982e-01,
       -5.32015800e-01, -9.92556393e-01,  6.19081676e-01,  1.07305683e-01,
       -1.31213859e-01, -1.93007499e-01,  1.17079806e+00,  2.76987970e-01,
       -9.27469432e-01,  4.39499795e-01, -4.15544622e-02,  7.88270384e-02,
        3.29236805e-01,  3.67188096e-01, -1.04401684e+00,  3.53199422e-01,
        2.66258687e-01,  7.28520513e-01, -1.70863360e-01, -3.29261243e-01,
       -1.86119117e-02, -3.16396415e-01,  1.98385924e-01, -3.98931444e-01,
       -2.50344127e-01,  7.89347351e-01,  2.74530977e-01,  3.58546704e-01,
       -3.60908270e-01,  4.97751117e-01, -2.81880677e-01,  1.68201163e-01,
       -1.12762606e+00,  7.02131689e-01,  1.80761516e-01, -9.53825295e-01,
        3.74447078e-01, -3.55577737e-01,  8.39326233e-02, -7.67105103e-01,
       -8.43731999e-01, -1.86966315e-01,  5.03540993e-01, -6.08295083e-01,
       -3.00569564e-01, -1.36414242e+00, -4.82496992e-02, -9.76607054e-02,
       -6.12891853e-01,  1.57747135e-01, -2.03161985e-01,  2.40768135e-01,
        6.33511603e-01,  2.32761055e-01, -1.51648432e-01, -3.39404374e-01,
        2.62024403e-01, -4.33223426e-01,  1.16399661e-01, -7.55017877e-01,
        2.25884423e-01, -3.73176008e-01, -3.69134128e-01, -3.18936348e-01,
       -1.70973599e-01,  7.32566595e-01,  4.68904078e-01,  7.00135976e-02,
       -3.62482786e-01, -2.02929229e-01, -7.19937533e-02,  2.56802320e-01,
        3.79254043e-01,  6.80404246e-01,  4.17938679e-01,  3.91916335e-01,
       -4.78704631e-01,  6.18772432e-02,  3.69294941e-01,  2.43110564e-02,
       -2.21559495e-01, -6.37414038e-01,  4.22997415e-01,  2.84579862e-02,
        1.39831871e-01, -7.43579507e-01,  2.52516031e-01,  1.08011149e-01,
        3.73635620e-01,  1.69237405e-01, -1.94794923e-01,  4.08671081e-01,
       -5.18766701e-01,  3.21041405e-01, -3.61130059e-01,  9.24525499e-01,
        2.80599803e-01, -5.23387730e-01, -9.23230588e-01,  2.09240839e-01,
        5.50950229e-01, -5.63352942e-01, -4.63511765e-01,  2.38961935e-01,
        3.58597219e-01,  4.27797139e-01, -1.00327037e-01, -1.08362997e+00,
        1.55897349e-01,  5.38530573e-02,  1.59043074e-03,  2.29418337e-01,
       -5.35291284e-02, -1.12637460e-01,  2.65441805e-01,  4.49611723e-01,
        3.90090346e-01, -1.42261416e-01, -7.70705462e-01,  1.08629473e-01,
        5.40238500e-01,  1.08955741e+00, -5.29613614e-01, -5.03211975e-01,
        3.90169293e-01,  9.20682132e-01,  6.66368484e-01, -3.91029358e-01,
       -3.09388995e-01,  2.70938456e-01,  6.76514268e-01, -3.87805164e-01,
       -1.60892338e-01, -3.64872932e-01,  3.67217273e-01, -7.62496114e-01,
        7.96184301e-01, -4.87817109e-01, -9.04241800e-01,  5.17966866e-01,
       -1.11159825e+00,  8.57870877e-02,  8.98796916e-02,  3.31583843e-02,
        2.30660737e-01, -3.57683510e-01,  1.25084507e+00, -6.78460658e-01,
        7.95050085e-01,  9.12836134e-01, -3.08217525e-01, -4.36114669e-02,
        3.08174826e-02, -3.00375223e-01,  4.11211967e-01,  1.09019957e-01,
        7.06879079e-01, -6.82136357e-01,  5.54503620e-01, -1.12970269e+00,
       -8.21152806e-01, -1.34905732e+00,  3.00113320e-01, -5.02252460e-01,
       -2.98326731e-01, -6.62151694e-01,  1.02041280e+00,  1.64372265e-01,
        1.27767578e-01,  1.05911744e+00,  4.48069215e-01,  3.38572681e-01,
       -1.08860053e-01, -4.10779119e-01, -2.82041848e-01,  1.19134068e+00,
        1.02312341e-02, -4.56356674e-01,  1.92146748e-01,  3.40512484e-01,
       -4.04280692e-01, -6.11404777e-01,  5.63679859e-02,  4.72349763e-01,
        4.93698537e-01, -4.36762571e-01, -1.56004876e-02,  2.46875226e-01,
       -1.43379673e-01,  3.10023427e-02,  3.13399971e-01,  2.04513907e-01,
       -8.23624253e-01,  1.72084451e-01,  4.49703097e-01, -9.49652433e-01,
        1.19886644e-01, -4.77594048e-01,  5.51294923e-01, -7.20850348e-01,
       -4.27250206e-01, -4.53100443e-01,  8.13941360e-01,  4.01361167e-01,
        6.83571458e-01, -3.42129886e-01, -7.66427994e-01, -3.53065670e-01,
        5.49451828e-01,  1.82685345e-01, -1.86077744e-01, -1.42353363e-02,
        2.29258999e-01, -3.30613971e-01,  3.69689107e-01, -6.29568338e-01,
        7.90782347e-02,  3.44798952e-01,  5.59364378e-01,  7.05829799e-01,
       -9.61028263e-02, -1.39723748e-01, -2.31106445e-01,  2.35272795e-01,
       -6.72725201e-01, -1.37946084e-02, -1.04533529e+00, -5.14720857e-01,
       -6.02638245e-01,  1.42247796e-01,  1.38257787e-01, -3.10868174e-02,
        1.48533672e-01, -2.18283951e-01, -4.00203288e-01, -5.81396222e-01,
        1.10336840e+00,  1.29402208e+00,  1.06964624e+00, -3.32895130e-01,
        2.55944878e-01,  6.79058790e-01,  3.22150648e-01, -1.64049804e-01,
       -9.84220207e-02,  6.52461171e-01,  1.86710641e-01,  2.99713403e-01,
       -5.97481191e-01, -9.41333696e-02, -9.03365016e-02,  9.17031825e-01,
        6.96043000e-02,  3.91068816e-01,  9.05843750e-02, -1.76928818e-01,
        8.88674974e-01,  6.19346559e-01, -5.14562845e-01, -4.47102636e-01,
        2.60381103e-01, -1.22727379e-01, -6.05612040e-01,  2.77419269e-01,
       -2.34546542e-01, -9.54378620e-02,  6.49136305e-03, -4.91520852e-01,
        8.34568143e-01, -2.58982517e-02, -2.86573529e-01, -6.15404367e-01,
       -1.51788199e+00,  3.47156405e-01, -8.39735866e-01,  3.24092031e-01,
        6.57103062e-01,  6.23090267e-01,  2.63404757e-01, -4.45135310e-02,
        9.08290148e-01,  1.18319124e-01,  8.70594263e-01,  6.80169523e-01,
       -4.84604776e-01, -7.03717947e-01, -1.89168632e-01,  1.16403615e+00,
       -3.50110173e-01, -4.15479571e-01, -9.21172857e-01, -2.33189672e-01,
        6.42113864e-01,  8.00730109e-01,  3.99987459e-01,  3.83187056e-01,
        4.83411551e-01, -4.20992970e-02,  5.06903112e-01,  7.40851760e-01,
        9.11108702e-02,  6.55519247e-01,  7.62610734e-01,  1.12601042e-01,
       -4.01560158e-01, -2.08203390e-01, -4.87336189e-01,  5.74378014e-01,
        5.99273086e-01, -5.23595288e-02, -7.59932876e-01, -3.45638156e-01,
        6.99717045e-01, -1.51044503e-01,  5.20237088e-01, -3.08910757e-03,
        1.49888724e-01, -2.29050353e-01, -4.98495191e-01,  2.51217410e-02,
        4.10942405e-01, -1.57569438e-01,  2.43655652e-01,  1.33666843e-02,
        3.19108926e-02,  2.01601386e-01,  1.30144671e-01,  2.91789353e-01,
       -1.87403232e-01, -1.12883002e-01,  5.42151570e-01, -2.47579753e-01,
        5.09843528e-01, -4.74907577e-01,  1.22318432e-01, -8.71497840e-02,
        1.10734373e-01,  2.24654555e-01,  7.06339240e-01, -1.18613824e-01,
        1.79778591e-01,  6.78329289e-01, -2.88403273e-01, -3.57292056e-01,
        9.37119365e-01,  1.15470958e+00,  1.79152638e-01,  1.75601542e-01,
        2.84290433e-01, -3.61450374e-01,  2.07007974e-01,  2.91608930e-01,
       -6.35592461e-01, -8.93313050e-01,  1.05036795e-01,  8.57329369e-03,
        6.08366072e-01, -5.03044486e-01,  3.17721739e-02, -4.24353957e-01,
        3.90238464e-01, -3.29834163e-01, -6.89130187e-01, -4.17219624e-02,
       -9.35876787e-01,  2.66513348e-01,  3.34133267e-01, -3.65045339e-01,
       -6.92205131e-01, -5.72713852e-01, -4.77733314e-01, -5.86308017e-02,
        1.98600173e-01, -1.85073182e-01, -5.17492890e-01,  3.38486731e-01,
       -4.74322766e-01,  8.16874862e-01, -7.71266043e-01,  8.25465083e-01,
       -2.50290662e-01,  7.52730444e-02, -6.25011086e-01, -8.58676061e-02,
       -4.33004260e-01,  4.56393622e-02, -2.78941654e-02, -2.53382444e-01,
       -8.48090887e-01, -5.19386292e-01, -6.39506280e-01, -5.87998986e-01,
       -3.09086069e-02, -4.45444703e-01,  7.53717065e-01,  1.12176526e+00,
       -1.47348925e-01,  5.91460109e-01,  1.49989009e-01,  5.84628761e-01,
       -7.06241906e-01,  4.73896340e-02, -4.02556092e-01, -3.51079516e-02,
        5.82646608e-01,  4.22980964e-01, -1.13974705e-01,  5.19442677e-01,
       -4.21998501e-01,  4.76445556e-02, -6.82383329e-02,  9.83098507e-01,
        5.77297986e-01,  6.72681808e-01,  4.63875353e-01, -4.40883100e-01,
        3.28395277e-01, -4.51458216e-01, -1.08331466e+00, -2.27949128e-01,
       -3.48160297e-01, -6.54514432e-01, -1.06261909e+00,  3.78970280e-02,
        3.76855463e-01,  1.23420453e+00, -1.54484093e-01, -2.39598811e-01,
       -6.96872354e-01,  1.58317983e-01,  3.26650649e-01,  6.56132340e-01,
        9.27726999e-02,  1.17278016e+00,  2.04693019e-01,  9.35090780e-02,
       -4.41390455e-01, -3.65751505e-01,  1.49403632e-01, -1.13220736e-01,
       -1.06763467e-01, -6.80416882e-01, -5.72383285e-01, -1.00686356e-01,
        8.13092351e-01,  3.27822149e-01, -6.00021541e-01,  3.44711006e-01,
        8.28786194e-02,  1.25907615e-01,  4.17931914e-01, -8.35630968e-02,
        5.91417730e-01,  2.51130730e-01,  4.58533823e-01, -1.83726788e-01,
        4.93454754e-01, -4.29039717e-01, -6.57490715e-02,  2.03398407e-01,
       -4.31751430e-01,  5.68911254e-01,  2.54821964e-02, -4.16832864e-01,
       -2.70133823e-01,  5.73930085e-01, -6.77836776e-01, -5.92604160e-01,
       -1.24327138e-01, -1.29152715e+00, -3.77081074e-02, -5.18579423e-01,
       -2.62488842e-01, -3.72892916e-01, -3.80493939e-01,  7.40116090e-02,
       -5.15156910e-02, -7.21140265e-01, -1.39724612e-01,  7.07901493e-02,
       -1.12637803e-01, -1.60605922e-01,  1.51501581e-01,  3.13334197e-01,
        1.21444154e+00, -2.14568496e-01, -5.66242695e-01, -2.38805786e-01,
       -2.13572249e-01, -1.32878691e-01,  2.12020248e-01,  5.40322185e-01,
        1.93933874e-01,  4.43719685e-01,  1.48676664e-01,  3.87566030e-01,
       -8.89887452e-01,  8.66037533e-02, -2.93432958e-02, -5.26472628e-02,
        8.01454112e-02,  3.83317508e-02,  1.04065776e+00,  4.99512762e-01,
       -4.15351212e-01,  1.12056828e+00,  4.18051839e-01,  8.18798468e-02,
       -1.22060739e-02, -4.64514703e-01, -6.00997984e-01, -1.78236380e-01,
        1.37272656e-01, -1.48927256e-01, -3.94253761e-01, -6.18627429e-01,
       -8.96688998e-01,  5.76650023e-01,  6.77368343e-02,  4.78950560e-01,
       -8.79291445e-03,  1.49765313e-01,  1.85265213e-01, -7.22151637e-01,
        4.68619287e-01,  2.87488699e-01, -4.97989774e-01,  3.60051811e-01,
       -7.40101188e-02,  7.89022982e-01, -9.01167750e-01,  4.41429734e-01,
       -1.04249132e+00, -9.19685781e-01,  1.15506038e-01, -7.13049531e-01,
       -6.65355742e-01, -5.30628860e-01, -3.26595902e-01,  2.66646266e-01,
       -1.25525951e-01,  5.60440779e-01,  5.07836461e-01,  3.95468861e-01,
        9.60432529e-01,  4.94689703e-01, -3.03658307e-01, -1.77312210e-01,
       -4.58492279e-01, -7.47409761e-01,  4.59275484e-01, -6.79710865e-01,
        3.75889093e-02,  7.20455572e-02,  1.30812436e-01, -4.99181062e-01,
        2.22169235e-01, -4.90931898e-01,  4.04202938e-01, -8.05476069e-01,
       -6.52545542e-02, -8.90152752e-01,  7.38128006e-01, -7.10134208e-02,
        4.61333185e-01,  6.00929521e-02, -8.14593077e-01,  2.95668125e-01,
       -3.19611222e-01, -6.16702795e-01, -3.27287138e-01,  5.32396674e-01,
       -3.02708775e-01, -3.89988780e-01,  8.80602375e-03, -6.62351489e-01,
        4.32329148e-01,  4.50594246e-01,  4.41902071e-01,  4.36784565e-01,
       -2.12716207e-01,  6.03905916e-01,  9.52148795e-01, -5.97970843e-01,
        8.71068358e-01, -5.62861085e-01, -9.95771408e-01,  4.22280073e-01,
        4.24299121e-01, -1.84334852e-02,  5.01072884e-01, -6.66608214e-01,
        8.03120807e-02,  2.01032907e-01,  7.90493011e-01, -2.10665435e-01,
        3.26374441e-01, -9.52832401e-02,  6.92926943e-01,  5.12748480e-01,
       -8.07392776e-01, -5.92466474e-01,  6.91362977e-01,  6.96171284e-01,
       -4.52700555e-01, -1.18983597e-01, -7.88870752e-02, -4.05955195e-01,
       -1.73313439e-01,  5.43577015e-01, -5.59811592e-01, -6.02401972e-01,
        1.25281483e-01, -7.22728595e-02, -9.14074957e-01,  1.59500167e-01,
        3.40227425e-01,  1.24806687e-01, -4.74854290e-01, -4.31868196e-01],
      dtype=float32)

Comments:
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.