嵌入模型(Embedding)
1. 核心概念
A. Embedding向量维度:向量的长度,也就是模型输出的维度;
B. 最大Token数:输出文本的最大长度。
2. 分类
A. 稀疏Embedding:擅长关键词匹配,适用于需要精确匹配的场景;
B. 稠密Embedding:擅长语义理解,适用于需要捕捉语义相似度的场景;
C. 混合Embedding:结合稀疏Embedding和稠密Embedding的优势,以实现更全面的检索效果。
3. 常见问题
A. 问题:在huggingface网站上下载模型报错:OSError: We couldn‘t connect to ‘https://huggingface.co‘ to load this file
解决办法:找到环境中的constants.py文件:conda路径/env/环境名称/Lib/site-packages/huggingface_hub/constants.py
修改HUGGINGFACE_CO_URL_HOME和_HF_DEFAULT_ENDPOINT值为https://hf-mirror.com

                    
                
                
            
        
浙公网安备 33010602011771号