全部產品
Search
文件中心

OpenSearch:CAGRA配置

更新時間:Mar 22, 2025

本文介紹CAGRA演算法Build參數與Search參數配置。

CAGRA索引build參數

參數值

類型

預設值

說明

proxima.cagra.index.graph_degree

int

64

查詢階段近鄰圖中節點的鄰邊數量,越大則召回率越好,但效能會相應下降。

proxima.cagra.index.intermediate_graph_degree

int

128

建圖階段構建的近鄰圖中節點的鄰邊數量,查詢階段會被裁剪至 proxima.cagra.index.graph_degree,值不小於 proxima.cagra.index.graph_degree,一般不大於1.5倍 proxima.cagra.index.graph_degree。

proxima.cagra.index.mode.fp16

int

0

是否開啟fp16量化,建議設定為1(開啟),基本不影響召回率。

CAGRA索引search參數

參數值

類型

預設值

說明

proxima.cagra.search.use_batchable_searcher

int

0

相較於逐個執行使用者發送的查詢請求,將這些請求打包為一批執行通常能獲得更高的執行效率。將此選項設定為1(開啟)時,系統將自動將短時間內同時到達的請求合并為一批執行,從而提升效能。

proxima.cagra.search.use_gpu_built_index

int

0

是否使用來自CPU構建的圖,目前僅支援設定為0(是)。

proxima.cagra.search.itopk_size

int

64

與演算法迭代時的候選集大小相關,需要為32的倍數,必須大於等於需要的topK值(若需返回top100,則該值必須大於等於100)。越大則召回率越好,但效能會相應下降。