Pytorch giving different output in single prediction and batch prediction

I have transformer model which I have quantized for android mobile when I am running a single message for prediction I am getting [7.80595, -3.5064116, -1.6516012, -0.81042784, -5.521521, -3.8056054, -5.5388055] this tensor output but when this same message is included in batch of prediction [7.798512, -3.5149465, -1.6561824, -0.80104315, -5.504274, -3.8043664, -5.5505915,
4.413419, -4.5582056, 1.9779913, 1.3730897, -6.670629, -2.7525914, -7.0175514, 7.798512, -3.5149465, -1.6561824, -0.80104315, -5.504274, -3.8043664, -5.5505915, 7.798512, -3.5149465, -1.6561824, -0.80104315, -5.504274, -3.8043664, -5.5505915, 7.798512, -3.5149465, -1.6561824, -0.80104315, -5.504274, -3.8043664, -5.5505915, 7.798512, -3.5149465, -1.6561824, -0.80104315, -5.504274, -3.8043664, -5.5505915, 7.798512, -3.5149465, -1.6561824, -0.80104315, -5.504274, -3.8043664, -5.5505915, 7.798512, -3.5149465, -1.6561824, -0.80104315, -5.504274, -3.8043664, -5.5505915, 7.798512, -3.5149465, -1.6561824, -0.80104315, -5.504274, -3.8043664, -5.5505915]

which is actually different and I am unable to find the reason behind it. can some one help me in this.