Elasticsearch引入BBQ新量化方法,大幅提升向量資料儲存與查詢效能
支付動態 · 2024-11-13

Elasticsearch 8.16採用了新的量化技術Better Binary Quantization(BBQ),以非對稱量化方式大幅加快查詢速度,並降低高維度資料的記憶體需求,甚至可節省記憶體達到95%

Elastic在最新版本Elasticsearch 8.16應用了一種稱為Better Binary Quantization(BBQ)的量化技術,該技術能夠大幅最佳化向量資料的儲存和處理方式。具有BBQ功能的Elasticsearch,將有助於降低高維度資料的記憶體需求,並提升查詢和索引效率。

越來越多企業應用嵌入模型,因此對向量資料的處理需求不斷增加,而模型產生的大量浮點數float32資料,對儲存空間和處理效能造成極大的挑戰,這是因為在數百甚至是數千個維度的情境下,浮點數運算會消耗非常大量的記憶體和運算資源。

Elasticsearch之前已經引入int8量化技術來減輕這個問題,而這次新增的BBQ能夠突破傳統二進位量化技術的侷限。BBQ是以新加坡南洋理工大學所提出的RaBitQ技術作為基礎,經過Elastic進一步改良,使得浮點數資料可以縮減成二進位表示,進一步減少約95%的記憶體使用量,還同時保持高品質查詢準確度。

相較於傳統的乘積量化(Product Quantization)BBQ在索引及查詢的效率更為快速。根據Elastic官方的測試,BBQ索引速度可以提升達20到30倍,查詢速度則增快為2至5倍,而且精確度沒有明顯的下降。

之所以BBQ能夠如此高效能,是因為採用了非對稱量化方法,研究人員解釋,這種量化方式在文件向量,也就是由文件內容轉換而成的向量,與查詢向量採用不同精度處理。文件向量被量化至位元層級,以最大程度壓縮儲存空間,而查詢向量則保持較高的精度,例如int4。如此非對稱設計使得查詢向量在搜尋過程中能夠以更高的準確度比對文件向量,達到較佳的搜尋結果。

這種設計不僅能夠減少儲存空間的需求,還能利用快速的位元運算提升查詢速度,實現低成本高效搜尋,適用於需要處理大量向量資料的應用場景。

在效能測試上,Elastic使用了E5-small、CohereV3以及CohereV2資料集,驗證BBQ在記憶體需求和查詢效率上的優勢。在CohereV3測試中,BBQ僅需3倍過採樣(Oversampling)即可達到90%的召回率(Recall),顯示其在高維度資料處理上具有潛力。

在更大規模的測試中,Elastic表示,BBQ可在單一64 GB記憶體的節點上,儲存並查詢高達1.38億個1024維度的浮點數向量,而記憶體僅需19 GB,這對於需要儲存大量向量資料的企業特別有用。

Popular articles
GGC Awards 2026 Shines in Colombo: Honoring Leaders and Innovators in the iGaming Industry
HUIDU Focus
UK MPs reopen 2025 gambling inquiry as reform stalls
Regulation
SBC Summit Canada to Make Player Safety a Key Pillar of 2026 Agenda
Marketing
Super PAC Raises $48 Million: Sports Betting Forces Ramp Up Political Push
Regulation
Institutional Academy that exceeded expectations marked the opening of GAT CDMX
Online Game
GAT Expo Puerto Rico Will Pulse with the New Era of Gaming in the Caribbean
Marketing
Full House at GAT Expo Cartagena 2026 Academic Agenda
Online Game
1spin4win releases unique slot Don Catleone Hold and Win featuring gangster cats
Online Game
Are you ready to maximize your earnings? Try ProPush.me Constructor!
Marketing
Vietnam's tightening online gaming policy creates new market opportunities
Southeast Asia
Indiana online casino bill stalls in House committee
Regulation
Across 6 Cities: HUIDU Invites You to 8 World Cup Parties Redefining High-Value Social Networking
HUIDU Focus
GAT CDMX 2025 Institutional Academy: Leaders and Experts Analyze the Present and Future of the Gaming Industry in Mexico and Lat
Sports Game
JILI Partners with Cricket Legend AB de Villiers (ABD) to Launch Exclusive Branded Game Series 100% 11
Sports Game
PropellerAds Shared a New iGaming Case Study: 97,674 Installs and 12,701 Deposits in 3 Months
Marketing
Home
Game
Cooperation
Find
My