本次更新重点是嵌入(Embedding)模型。
引入新的嵌入模型(embedding models)
-
BGE-M3:来自BAAI的大型嵌入模型,因其在多功能性、多语言性和多粒度方面的灵活性而著名。
-
BGE-Large:一个以英语为训练语言的大型嵌入模型。
-
Paraphrase-Multilingual:一个多语言嵌入模型,训练于50多种语言的平行数据上。
新嵌入API支持批处理:
Ollama现在支持新的API接口 /api/embed 用于生成嵌入:
curl http://localhost:11434/api/embed -d '{"model": "all-minilm","input": ["Why is the sky blue?", "Why is the grass green?"]}'
此API接口支持的新功能:
-
批量处理:一次请求生成多个文档的嵌入
-
标准化嵌入:嵌入现在被标准化,提高相似性结果
-
截断:新增加的截断参数,设置为false时会报错
-
统计指标:响应中包含 load_duration、total_duration 和 prompt_eval_count 指标
其他变更内容:
-
修复了Windows上初始下载速度缓慢的问题
-
NUMA支持将由Ollama自动检测,以提高性能
-
修复了/api/embed有时返回嵌入结果顺序错误的问题


