Open muchi674 opened 1 week ago
I don't think this is a bug but due to numerical differences as order of operations with finite precisions is not associative and the two versions you have could have different orders. The lower precision exacerbates the effect.
If you need them to match (or at least be a lot closer), use fp32. I tried it and I they were identical in that case.
I will let @jagrit06 comment on this before closing, to be sure. Also if you notice any instances with larger discrepancies that would be useful to share.
Describe the bug matmul yields different result when multiplying vectors concatenated into the same matrix versus multiplying them separately
To Reproduce code:
output:
Expected behavior the last four numbers of mlx output should match in the two versions
Desktop (please complete the following information):
Additional context If this is the case, there should be plenty of issues in your mlx_lm library