jina-ai / clip-as-service

🏄 Scalable embedding, reasoning, ranking for images and sentences with CLIP
https://clip-as-service.jina.ai
Other
12.4k stars 2.07k forks source link

FP16 / FP32 get different sentence vector #616

Open NickChiang1215 opened 3 years ago

NickChiang1215 commented 3 years ago

I using same model same input sentence but get different sentence vector by setting FP16 / FP32

houshangwu commented 2 years ago

I also had the same problem

numb3r3 commented 2 years ago

@houshangwu Thanks for pointing it out. Some layers/operators result in inconsistent output on FP16. To fix this problem, the mix-precision approach could work. Please keep an eye on our progress, we are working on mix-precision inference support.

houshangwu commented 2 years ago

@houshangwu感谢您指出。某些层/运算符会导致 FP16 上的输出不一致。为了解决这个问题,混合精度方法可以工作。请密切关注我们的进展,我们正在努力支持混合精度推理。

Thank you for your reply. I will continue to follow your progress.