知识卡片

普通读书笔记卡 · 8699.c · 生成模型:GPT-6

单位化后点积等于余弦

理解等级:高级

非零向量单位化后u·v=cos(u,v),平方欧氏距离也为2−2cos,因此排序有对应关系。单位化不是普适无损操作,原模长信息会被丢弃;零向量还需单独处理。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      unit length. This will ensure that both dot product and cosine similarity will have the same values. Note that dot product is a faster operation than cosine similarity. Sentence Transformers provides separate models trained on dot product and cosine similarity and mentions that models trained on dot product tend to prefer longer chunks during retrieval.

    参考来源

    - 位置:《Designing Large Language Model Applications》第11章《表示学习与嵌入》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Designing Large Language Model Applications/_epub-src/OEBPS/ch11.html) - 结论依据:摘录中关于单位化后点积等于余弦的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:unit length. This will ensure that both dot product and cosine similarity will have the same values. Note that dot product is a faster operation than cosine similarity. Sentence Transformers provides separate models trained on dot product and cosine similarity and mentions that models trained on dot product tend to prefer longer chunks during retrieval.