Methods and apparatus for accelerating vector retrieval in artificial intelligence workloads

Quantizing vectors from FP32 to INT8 format and employing a two-stage search process addresses memory bandwidth issues in IVFFlat, enhancing CPU performance and maintaining accuracy in vector retrieval for AI workloads.

WO2025179471A1PCT designated stage Publication Date: 2025-09-04INTEL CORP +3

Patent Information

Application Number
PCT/CN2024/078930
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-28
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

Existing vector retrieval methods in artificial intelligence workloads, such as Inverted File Flat (IVFFlat), face increased system latency and memory bandwidth issues as knowledge base or candidate item databases grow, reducing the efficiency of Large Language Model-based recommendation systems.

Method used

Quantizing database vectors from single-precision floating-point format (FP32) to 8-bit signed integer (INT8) format and using a two-stage search process to maintain accuracy while reducing memory bandwidth, employing a first stage for quantization and a second stage for refinement using FP32 vectors.

Benefits of technology

Improves central processing unit performance by threefold without accuracy loss, reducing memory bandwidth consumption by 75% and maintaining high accuracy in vector retrieval processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024078930_04092025_PF_FP_ABST
    Figure CN2024078930_04092025_PF_FP_ABST
Patent Text Reader

Abstract

An apparatus includes interface circuitry, machine readable instructions, and programmable circuitry to at least one of execute or instantiate the machine readable instructions to quantize an input vector having a first precision to generate a quantized vector having a second precision that is lower than the first precision, index the quantized vector using vector clustering, and perform a vector search query for an input query using the quantized vector, the vector search utilizing enhanced heap sorting.
Need to check novelty before this filing date? Find Prior Art

Description

METHODS AND APPARATUS FOR ACCELERATING VECTOR RETRIEVAL IN ARTIFICIAL INTELLIGENCE WORKLOADS

[0001] FIELD OF THE DISCLOSURE

[0002] This disclosure relates generally to software processing, and, more particularly, to methods and apparatus for accelerating vector retrieval in artificial intelligence (AI) workloads.BACKGROUND

[0003] Processing AI workloads may involve vector retrieval to accelerate the processing. For example, Large Language Models (LLMs) use mathematical representations of phrases that capture semantic meanings as a vector of numerical values, also referred to as embeddings. For example, phrases with similar meanings include similar vector representations, such that distances between respective vectors is minimized. Vector retrieval methods such as Retrieval Augmented Generation (RAG) may be used to retrieve relevant information in its knowledge base.BRIEF DESCRIPTION OF THE DRAWINGS

[0004] FIG. 1A is an example of a vector retrieval and ranking process used in recommender systems.

[0005] FIG. 1B is an example of a retrieval augmented generator used in Large Language Models (LLMs) to enhance factualness of a model output.

[0006] FIG. 2A illustrates offline database generation using example vector retrieval initiator circuitry.

[0007] FIG. 2B illustrates Inverted File Flat (IVFFlat) indexing using the vector retrieval initiator circuitry of FIG. 2A.

[0008] FIG. 3 illustrates an example indexing file generated during IVFFlat indexing.

[0009] FIG. 4A illustrates an example offline vector database quantization using three points in a two-dimensional space.

[0010] FIG. 4B illustrates an example online vector search based on an input query point following the offline vector database quantization of FIG. 4A.

[0011] FIG. 5 illustrates example results generated using various datasets, algorithm  parameters, and recall values across the different datasets and algorithm parameters, including results associated with the optimized IVFFlat disclosed herein.

[0012] FIG. 6 illustrates example benchmark results associated with a first commonly used dataset (SIFT1M) to determine a decrease in memory bandwidth.

[0013] FIG. 7 illustrates example benchmark results associated with a first commonly used dataset (GIST1M) to determine a decrease in memory bandwidth.

[0014] FIG. 8 is a block diagram representative of the vector retrieval initiator circuitry that may be implemented for retrieving vectors in artificial intelligence workloads.

[0015] FIG. 9 is a flowchart representative of example machine-readable instructions and / or example operations that may be executed, instantiated, and / or performed by example programmable circuitry to implement the example vector retrieval initiator circuitry of FIG. 2A.

[0016] FIG. 10 is a flowchart representative of example machine-readable instructions and / or example operations that may be executed, instantiated, and / or performed by example programmable circuitry to implement the example retrieval initiator circuitry of FIG. 2A to perform IVFFlat indexing using input vectors, quantized vectors, and error vectors.

[0017] FIG. 11 is a flowchart representative of example machine-readable instructions and / or example operations that may be executed, instantiated, and / or performed by example programmable circuitry to implement the example retrieval initiator circuitry of FIG. 2A to perform an online vector search query based on an input point.

[0018] FIG. 12 is a flowchart representative of example machine-readable instructions and / or example operations that may be executed, instantiated, and / or performed by example programmable circuitry to implement the example retrieval initiator circuitry of FIG. 2A to perform enhanced heap sorting to obtain final nearest neighbors of an input query point.

[0019] FIG. 13 is a block diagram of an example processing platform including programmable circuitry structured to execute, instantiate, and / or perform the example machine readable instructions and / or perform the example operations of FIGS. 9-12 to implement the vector retrieval initiator circuitry of FIG. 8.

[0020] FIG. 14 is a block diagram of an example implementation of the programmable circuitry of FIG. 8.

[0021] FIG. 15 is a block diagram of another example implementation of the programmable circuitry of FIG. 8.

[0022] FIG. 16 is a block diagram of an example software / firmware / instructions distribution platform (e.g., one or more servers) to distribute software, instructions, and / or firmware (e.g., corresponding to the example machine readable instructions of FIGS. 9-12) to client devices associated with end users and / or consumers (e.g., for license, sale, and / or use) , retailers (e.g., for sale, re-sale, license, and / or sub-license) , and / or original equipment manufacturers (OEMs) (e.g., for inclusion in products to be distributed to, for example, retailers and / or to other end users such as direct buy customers) .

[0023] In general, the same reference numbers will be used throughout the drawing (s) and accompanying written description to refer to the same or like parts. The figures are not necessarily to scale.DETAILED DESCRIPTION

[0024] Large Language Models (LLMs) , such as OpenAI CodexTM or ChatGPTTM, represent deep learning algorithms that can be used to recognize, summarize, predict, and / or generate content using large datasets. Use of LLMs permits artificial intelligence (AI) -based models to generate human-like content. Vector retrieval is a key component in current AI workloads and is used in LLMs to enhance the factualness of deep learning (DL) and / or machine learning (ML) model outputs. LLM-based recommendation systems are used for providing personalized suggestions to users (e.g., on content platforms, electronic commerce sites, etc. ) . Such recommendations systems use vector retrieval during filtering to reduce candidate items for use in a DL / ML model for further ordering and generation of a final recommendation of items to the users. For example, vector retrieval is widely deployed in many LLM-based applications known as Retrieval Augmented Generation (RAG) , which is used for enhancing the accuracy and reliability of generative AI-based models. In the context of RAG, similarity searches involve the finding and retrieval of relevant data points that are similar to a given query vector. For example, vector indexing methods are used to efficiently store, organize, and / or retrieve high-dimensional data points and / or vectors in a database.

[0025] Inverted File Flat (IVFFlat) is a widely used vector retrieval method for approximating nearest neighbor searches. IVFFlat involves applying k-means clustering to vectors to identify cluster centroids. Vectors are subsequently assigned to their nearest centroids by calculating the distance between the vector and each centroid, thereby mapping each point in space to the closest centroid based on proximity. Distinct regions surrounding  each centroid represent a cluster of vectors that include similar characteristics or are close in semantic meaning. Subsequent search operations enable the retrieval of approximate nearest neighbors, given that vectors within the same region share similarities to each other. IVFFlat involves the use of an inverted file index to partition datasets into multiple lists. When the knowledge base or candidate item database size increases, vector retrieval associated with IVFFlat increases system latency and contributes to memory bandwidth, thereby reducing efficiency of the LLM-based RAG and / or recommendation system application.

[0026] Methods and apparatus disclosed herein accelerate vector retrieval in artificial intelligence workloads associated with LLM-based system applications. In examples disclosed herein, improvement in central processing unit performance increases threefold without accuracy loss. In examples disclosed herein, database vectors are quantized from single-precision floating-point format (FP32) to an 8-bit signed integer (INT8) format save up to 75%of memory bandwidth. The search process is further accelerated using a search algorithm that maintains the same level of accuracy as the single-precision floating-point format (FP32) . As such, methods and apparatus disclosed herein allow an IVFFlat algorithm to be used with only a quarter of theoretical memory bandwidth being utilized, while maintaining a high level of accuracy. In examples disclosed herein, database vectors are quantized and used to calculate distances with input vectors while performing a query search based on an input query point, decreasing memory bandwidth consumption as compared to the use of floating-point vectors. For example, quantized vector distances provide a tight lower-bound estimation of the original distances, while a minimized portion of floating-point distances are determined to refine the quantized distances and identify top-K neighbors from each probed cluster. In examples disclosed herein, a first stage is used to quantize each input vector using offline vector database quantization and a second stage is used to search the INT8 vectors and refine the results using FP32 vectors as needed for optimized system performance and accuracy.

[0027] FIG. 1A is an example of a vector retrieval and ranking process 100 used in recommendation systems. In the example of FIG. 1A, the retrieval and ranking process 100 includes user-based query input 105 of indexed in-memory (in-mem) vectors 110, which are used in vector retrieval 115 based on vector identifiers (e.g., nearest vector IDs) . The retrieved vectors are ranked (e.g., using a deep neural network (DNN) ) based on input of an in-memory ranking model 125, yielding a set of recommended results 130. For example, in LLM-based  applications, vector retrieval 115 is used to enhance factualness of LLM model input while keeping the LLM’s output updated. In examples disclosed herein, vector retrieval 115 is performed using an IVFFlat algorithm, which serves as an index for approximate nearest neighbor (ANN) searches. The IVFFlat algorithm splits data into buckets (e.g., a quantization-based index) to accelerate the vector similarities search.

[0028] FIG. 1B is an example of an algorithm 150 for use of a Retrieval Augmented Generator (RAG) in Large Language Models (LLMs) to enhance factualness of a model output. Vector retrieval is widely deployed in RAG-based LLM applications. For example, input queries (e.g., user-based query input 105) via a prompt 155 are sent to a retriever 160 (e.g., to perform vector retrieval 115) and used to obtain relevant information in a knowledge base 165. The resulting output and query (e.g., retrieval augmented prompt) feed together into an LLM generator 170 (e.g., to obtain final recommendation results (e.g., output 180) , as shown in connection with FIG. 1B. In the example of FIG. 1B, the LLM generator 170 (e.g., RAG) receives input from an LLM 175. RAG is implemented by creating a set of vector embeddings (e.g., mathematical representations of data that capture the meaning of an object) that encode semantic information about the dataset, where the vector index serves as a data structure that permits fast and accurate searches and retrieval of vector embeddings from a large dataset of objects. For example, a vector is provided as input and a vector index returns other vectors that are similar to the input or query vector. As such, large datasets of vectors can be searched very quickly using ANN-based searches. However, additional efficiency and accuracy can be introduced into the vector retrieval process, as described in connection with the methods and apparatus disclosed herein.

[0029] FIG. 2A illustrates offline database generation 200 using example vector retrieval initiator circuitry 201. In examples disclosed herein, an offline database refers to a database that is stored locally, allowing the database to be used without any connection to a server. However, the database generation can also be performed online and is not limited to offline generation. In examples disclosed herein, the vector retrieval initiator circuitry 201 performs offline vector database generation and vector quantization using input vectors, determines distance (s) using quantized vectors and input vectors, and performs IVFFlat indexing using the input vectors, the quantized vectors, and error vectors, as described in connection with FIGS. 8-9. In examples disclosed herein, the vector retrieval initiator circuitry 201 further performs an online vector search query based on an input query point. In  examples disclosed herein, an online vector search query corresponds to a query performed via a connection to the server. However, the vector search query can also be performed offline and is not limited to an online query. In the example of FIG. 2A, the vector retrieval initiator circuitry 201 receives input vector (s) (yi) 205 and performs vector quantization 210 using the input vector (s) 205 to obtain quantized vector (s) (zi) 215. The vector retrieval initiator circuitry 201 performs a distance computation 220 using the input vector (s) (yi) 205 and quantized vector (s) (zi) 215, yielding error vector (s) (ei) 225. The resulting input vector (s) (yi) 205, quantized vector (s) (zi) 215, and error vector (s) (ei) 225 are used as inputs for IVFFlat indexing 230, as described in connection with FIG. 9. The IVFFlat indexing 230 yields a vector database 235 with the indexed vectors, as described in more detail in connection with FIG. 10.

[0030] FIG. 2B illustrates Inverted File Flat (IVFFlat) indexing 230 using the vector retrieval initiator circuitry 201 of FIG. 2A. In the example of FIG. 2B, the IVFFlat indexing 230 receives example generated vectors Y 235 (e.g., input vector (s) (yi) 205, quantized vector (s) (zi) 215, and error vector (s) (ei) 225) . The IVFFlat indexing 230 performs vector clustering 240 to identify cluster centroids and perform cluster identification 245, as described in connection with FIG. 10. For example, the IVFFlat indexing 230 matches vector (s) with clusters by comparing each input vector 205 with each identified centroid. The IVFFlat indexing 230 subsequently performs IVFFlat index generation 250 using the identified clusters by appending the quantized vector 215 and error vector 225 to each input vector 205, as further described in connection with FIG. 10. Once the retrieval initiator circuitry 201 performs IVFFlat-based index generation, the vector retrieval initiator circuitry 201 proceeds to initiate an online query search 255 based on an input point (x) , as described in more detail in connection with FIG. 11.

[0031] FIG. 3 illustrates an example indexing file 300 generated during IVFFlat indexing 230 as performed using the vector retrieval initiator circuitry 201 of FIG. 2A. In the example of FIG. 3, the vector retrieval initiator circuitry 201 generates the indexing file 300 that includes centroid identification (e.g., centroid 1, centroid 2, etc. ) as designated using an example centroid 305 and centroid 320. The centroids 305, 320 include matches between quantized vector (s) (zi) 215 (e.g., quantized vector (s) 310, 325) and error vector (s) (ei) 225 (e.g., error vector (s) 315, 330) . For example, IVFFlat indexing 230 involves identifying a number of centroids (e.g., centroid 1, centroid 2, etc. ) and finding clusters around those  centroids, as described in more detail in connection with FIG. 10.

[0032] FIG. 4A illustrates an example offline vector database quantization 400 using three points in a two-dimensional space. In examples disclosed herein, vector retrieval is a K Nearest Neighbors (KNN) problem, which can be described based on an assumption that there are N points where Y= {y1, y2, …, yN} in a d-dimensional space. In a KNN problem, the nearest K points from Y are found based on a given point x. In one example, a brute-force search (e.g., pure Flat) can be used to illustrate the KNN problem: To find the K nearest neighbors of x, the distance from x to each yi, noted as di=L (x, yi) , is calculated. Because each dimension of each yi is a 32-bit float number (FP32) , a total of 4×d×N bytes are accessed to calculate d1, d2, d3, …dN. For example, a KNN-based algorithm can be used for classification and regression tasks, such that the KNN algorithm stores the entire training dataset as a reference during training and calculates distanced between the input data points and all the training examples based on a chosen distance metric (e.g., a Euclidean distance) . The KNN algorithm identifies the K nearest neighbors to the input data points based on their distances.

[0033] In the example of FIG. 4A, the vector retrieval initiator circuitry 201 performs offline vector database quantization 400, as described in connection with FIGS. 9-10. In the example of FIG. 4A, the vector retrieval initiator circuitry 201 quantizes all input vectors (yi) 205 of FIG. 2A in a vector base. For example, for each element of yi, the vector retrieval initiator circuitry 201 quantizes the vector base to an 8-bit signed integer (INT8) and generates a quantized vector (zi) (e.g., quantized vector 215 of FIG. 2A) in accordance with Equation 1, which defines the quantized vector (zi) 215 as follows based on shift and scale parameters:

[0034] In the example of FIG. 4A, distances from the input vector (yi) 205 to the quantized vector (zi) 215 are identified as the error vector (ei) 225 (e.g., error vector 225 of FIG. 2A) , with an assumption that there are three points in a two-dimensional space. In the example of FIG. 4A, the three points are identified as points 405, 410, 415, where each error vector identifies the distance between the input vector and the quantized vector (e.g., error vector e1 identifies the distance between input vector y1 and quantized vector z1) . In the example of FIG. 4A, the size of each zi is 1×d bytes, and each error vector ei is a floating-point scalar. After quantization,  d×N+4×N bytes of extra memory are used to store Z and E. Since the quantization is performed offline, this does not affect online search latency.

[0035] FIG. 4B illustrates an example online vector search 450 based on an input query point following the offline vector database quantization 400 of FIG. 4A. For example, the vector retrieval initiator circuitry 201 determines distances from an input query point x (e.g., input query point 455) to quantized vector zi, noted as bi=L (x, zi) , when the query point x is given. In examples disclosed herein, the vector retrieval initiator circuitry 201 subtracts the error vector ei from bi to obtain Li, which can be represented as Li= bi-ei. When calculating bi, the vector retrieval initiator circuitry 201 loads INT8 encoded zi from dynamic random access memory (DRAM) and converts to a 32-bit float number (FP32) in the register for further computation using FP32. As a result, the vector retrieval initiator circuitry 201 obtains L1, L2, …, LN. As shown in connection with FIG. 4B, Li is the lower bound of distance di. Since bi is the distance from query point x to quantized vector zi, while ei is the distance from the quantized vector zi to the input vector yi, then L (x, yi) +L (yi, zi) ≥ L (x, zi) , which corresponds to di≥bi-ei=Li (e.g., based on triangle inequality) . In examples disclosed herein, the vector retrieval initiator circuitry 201 identifies the distance di using L1, L2, …, LN. For example, if Li is much larger than Lj, then the distance di has a high probability of being larger than the distance dj. As such, to identify a K-based minimal distance di, the vector retrieval initiator circuitry 201 identifies a K approximate intermediate minimal Li, and then proceeds to refine the K approximate intermediate minimal Li to obtain the exact KNN from the Li, as needed. In the example of FIG. 4B, the identified distances di are determined using the points 405, 410, 415 of FIG. 4A, where distances 455, 460, 465 (e.g., b1, b2, b3) identify distances from the input query point x (e.g., input query point 455) to quantized vectors z1, z2, and z3 and distances 470, 475, 480 (e.g., d1, d2, d3) identify distances from the input query point x (e.g., input query point 455) to input vectors y1, y2, and y3.

[0036] In examples disclosed herein, the vector retrieval initiator circuitry 201 loads the K approximate intermediate minimal Li and the corresponding index i into an array (e.g., such as array A = [ (1, L1) , (2, L2) , … (N, LN) ] ) , and proceeds to sort A ascendingly by Li to obtain S. For example, when S = [ (14, 21.5) , (31, 25.2) , (16, 33, 7) , ... ] , the distance from x to y14 is at least 21.5, the distance from x to y31 is at least 25.2, and the distance from x to y16 is at least 33.7. In examples disclosed herein, the vector retrieval initiator circuitry 201 initializes a maximum heap, identified herein as topK. The maximum capacity of topK is K,  which indicates that the maximum capacity will only remain at most K tuples (e.g., where a tuple corresponds to an ordered sequence of values) with minimal values, no matter how many tuples are inserted. In examples disclosed herein, the vector retrieval initiator circuitry 201 sets a threshold of T to the topK heap. For example, the threshold T corresponds to positive infinity (e.g., +∞) if less than K tuples are inserted. Subsequently, the threshold T is set as the maximum value in the heap, such that it is impossible to insert a tuple (i, Li) into topK if the tuple’s Li is greater than or equal to the threshold T (e.g., Li≥T) , which assists with filtering out the input vectors yi from the exact distance computing step.

[0037] Once the vector retrieval initiator circuitry 201 identifies the variables S and topK, the vector retrieval initiator circuitry 201 executes a loop to obtain the exact KNN value, as shown in the example code below:

[0038] 1 topK. T = infinity

[0039] 2 for each (i, Li) in S:

[0040] 3 if Li >= topK. T:

[0041] 4 break

[0042] 5 distance = dist (x, y [i] )

[0043] 6 topK. insert ( [i, distance] )

[0044] 7 topK. T = max (topK)

[0045] For example, the loop is used to check each tuple one by one (index, lower_bound) in S and calculate the exact distance from x to yindex (e.g., at line 5) , subsequently inserting this new tuple into the maximum heap (topK) (e.g., at lines 6-7) . If the vector retrieval initiator circuitry 201 determines that the lower bound is greater than or equal to the threshold T (e.g., at line 3) , the vector retrieval initiator circuitry 201 completes the loop (e.g., at line 4) . In the example code above, S is an array of (i, Li) sorted by Li (at line 2) . For example, the lower bound associated with S at tuple j is greater than or equal to the lower bound associated with S at tuple i (e.g., Sj. lower_bound >= Si. lower_bound) if and only if the tuple j is greater than or equal to the tuple i (e.g., j >= i) . In examples disclosed herein, if the i-th tuple meets Si. lower_bound >= topK. T, then any following j-th tuple (j > i) also meets Sj. lower_bound >= topK. T, and the tuple need not be considered. In examples disclosed herein, experimental data shows that the vector retrieval initiator circuitry 201 completes the loop after approximately 4K to 8K tuples. As such, the entire procedure accesses at most d×N+4×N+4×d× 8×K bytes, which is far less compared to use of a vanilla-based IVFFlat algorithm (e.g., when K is less than N in a majority of cases) .

[0046] FIG. 5 illustrates example results 500 generated using various datasets 505,  algorithm parameters 510, and recall values 515 across the different datasets and algorithm parameters, including results associated with the optimized IVFFlat disclosed herein. In the example of FIG. 5, the datasets 505 include a Generalized Search Tree (GiST) 960 Euclidean dataset, a Sift-Invariant Feature Transform (SIFT) 128 Euclidean dataset, and a Fashion Mnist 784 Euclidean dataset. In the example of FIG. 5, the recall values 515 are presented and compared between results obtained using an IVFFlat algorithm and the optimized IVFFlat algorithm presented herein. In particular, the optimized IVFFlat algorithm’s top-10 recall is benchmarked with the vanilla IVFFlat algorithm across different datasets and algorithm parameters to see whether the final recall values meet the theoretical analysis values. In the examples disclosed herein, the benchmark cases are picked from a benchmarking environment for approximate nearest neighbor algorithm searches (e.g., ANNBenchmark) . Across six algorithm parameter configurations, the same recall at top-10 is obtained when using the vanilla IVFFlat algorithm and the optimized IVFFlat algorithm disclosed herein. However, the bottleneck of known IVFFlat algorithms (e.g., such as the vanilla IVFFlat algorithm) is memory bandwidth. The optimized IVFFlat algorithm disclosed herein uses quantization to quantize the database vectors from FP32 to INT8 (e.g., as described in connection with FIGS. 4A-4B) to save 75%of the memory bandwidth, as described in more detail in connection with FIG. 6. As such, using methods and apparatus disclosed herein, an IVFFlat algorithm can be run with only a quarter of theoretical memory bandwidth occupation while maintaining the same level of accuracy (e.g., same level of accuracy as the vanilla IVFFlat algorithm) .

[0047] FIG. 6 illustrates example first benchmark results 600 associated with a first commonly used dataset (SIFT1M) to determine a decrease in memory bandwidth. For example, SIFT1M (e.g., a Sift-Invariant Feature Transform) is a commonly used dataset with 1 million vectors (N) , each vector including 128 dimensions (d) . To identify the nearest K (e.g., K = 100 neighbors) , the original algorithm accesses 512 million (M) bytes (e.g., as determined using 4*d*N = 4*128*1M = 512 M bytes) , while the optimized algorithm accesses 132.4 M bytes (e.g., as determined using 1*d*N + 4*N + 4*d*8*K = 1*128*1M + 4*1M + 4*128*8*100 ≈ 132.4 M bytes) , resulting in a memory bandwidth decrease of 74%. In the example of FIG. 6, the optimized IVFFlat algorithm disclosed herein is implemented and the performance is benchmarked on one socket of Platinum 8268 CPU @ 2.90GHz. The first benchmark results 600 include an example change in total throughput 605  (e.g., measured by queries per second) with increasing example thread number 610. For example, given that the CPU used to generate the first benchmark results 600 included 24 physical cores and 48 hyper threads on one socket, the searching thread number increased from 1 to 48.

[0048] A total of six data curves 615 are shown in connection with the first benchmark results 600, corresponding to (1) three graphical throughput results associated with the vanilla IVFFlat algorithm (e.g., implementing Streaming SIMD Extensions (e.g., SSE4) and Advanced Vector Extensions (e.g., AVX2 and AVX512) ) and (2) three graphical throughput results associated with the optimized IVFFlat algorithm disclosed herein (e.g., implementing SSE4, AVX2 and AVX512) . In the example of FIG. 6, the SIFT1M dataset is used as a benchmark (e.g., incorporating 1M vectors of 128 dimensions each) .

[0049] FIG. 7 illustrates example second benchmark results 700 associated with a second commonly used dataset (GIST1M) to determine a decrease in memory bandwidth. In the example of FIG. 7, the GIST1M benchmark dataset includes 1M vectors of 960 dimensions each. As in the example of FIG. 7, the graphical throughput results include a change in total throughput 605 with respect to the increasing thread number 610 for a total of the six data curves 615. For both the first benchmark results 600 and the second benchmark results 700, the vanilla IVFFlat algorithm includes total throughput 605 that grows slowly with respect to the thread number 610 and becomes quickly saturated, with limited improvement when using a more advanced SIMD-based instruction set. On the other hand, the optimized IVFFlat algorithm used herein results in a throughput that grows rapidly with an increase in the thread number 610, achieving up to 3.5 times better performance when compared with the vanilla IVFFlat algorithm. Likewise, introduction of more advanced SIMD-based instruction improves the performance of the optimized IVFFlat algorithm. Accordingly, the optimized IVFFlat algorithm has better scaling effects compared to the vanilla IVFFlat algorithm and takes full advantage of many core processor-based and advanced SIMD instruction sets (e.g., such as AVX512) .

[0050] FIG. 8 is a block diagram 800 of an example implementation of the vector retrieval initiator circuitry 201 of FIG. 2A. The vector retrieval initiator circuitry 201 of FIG. 2A may be instantiated (e.g., creating an instance of, bring into being for any length of time, materialize, implement, etc. ) by programmable circuitry such as a Central Processing Unit (CPU) executing first instructions. Additionally or alternatively, the vector retrieval initiator  circuitry 201 of FIG. 2A may be instantiated (e.g., creating an instance of, bring into being for any length of time, materialize, implement, etc. ) by (i) an Application Specific Integrated Circuit (ASIC) and / or (ii) a Field Programmable Gate Array (FPGA) structured and / or configured in response to execution of second instructions to perform operations corresponding to the first instructions. It should be understood that some or all of the circuitry of FIG. 8 may, thus, be instantiated at the same or different times. Some or all of the circuitry of FIG. 8 may be instantiated, for example, in one or more threads executing concurrently on hardware and / or in series on hardware. Moreover, in some examples, some or all of the circuitry of FIG. 8 may be implemented by microprocessor circuitry executing instructions and / or FPGA circuitry performing operations to implement one or more virtual machines and / or containers.

[0051] In the example of FIG. 8, the vector retrieval initiator circuitry 201 of FIG. 2A includes example quantization generator circuitry 802, example distance identifier circuitry 804, example indexer circuitry 806, example vector search initiator circuitry 808, example cluster identifier circuitry 810, example tuple identifier circuitry 812, example heap sorting generator circuitry 814, and / or example data storage 816. In the example of FIG. 8, the quantization generator circuitry 802, the distance identifier circuitry 804, the indexer circuitry 806, the vector search initiator circuitry 808, the cluster identifier circuitry 810, the tuple identifier circuitry 812, and / or the heap sorting generator circuitry 814 are in communication via an example bus 820.

[0052] The quantization generator circuitry 802 performs vector quantization using input vectors (yi) . For example, the quantization generator circuitry 802 performs offline vector database quantization as described in connection with FIG. 4A. In examples disclosed herein, the quantization generator circuitry 802 quantizes all input vectors (yi) in a vector base. For example, for each element of yi, the quantization generator circuitry 802 quantizes the vector base to an 8-bit signed integer (INT8) , resulting in the generation of a quantized vector (zi) (e.g., quantized vector 215 of FIG. 2A) , as described in connection with Equation 1. In particular, INT8-based quantization uses INT8 integers instead of floating-point numbers, thereby reducing both memory and computing requirements.

[0053] The distance identifier circuitry 804 identifies distances between vectors using quantized vectors (zi) (e.g., generated using quantization generator circuitry 802) and input vectors (yi) . For example, the distance identifier circuitry 804 identifies distances from the  input vector (yi) to the quantized vector (zi) as the error vector (ei) (e.g., error vector 225 of FIG. 2A) , as described in connection with FIG. 4A. In some examples, the distance identifier circuitry 804 calculates a distance between an input query point (x) and each quantized vector (zi) of a nearest probe-based cluster, as described in connection with FIG. 11. For example, vectors are assigned to their nearest centroids by calculating the distance between the vector and each centroid, thereby mapping each point in space to the closest centroid based on proximity. In examples disclosed herein, quantized vector distances provide a tight lower-bound estimation of the original distances, while a minimized portion of floating-point distances are determined to refine the quantized distances and identify top-K neighbors from each probed cluster. In some examples, the distance identifier circuitry 804 also determines a distance from the input query point (x) to an index (yindex) , as described in connection with FIG. 12.

[0054] The indexer circuitry 806 performs IVFFlat indexing using input vectors (yi) , quantized vectors (zi) , and / or error vectors (ei) . For example, the indexer circuitry 806 performs vector clustering, matches vectors with clusters, and generates an IVFFlat indexing file, as described in connection with FIG. 10. In examples disclosed herein, the indexer circuitry 806 identifies a number of centroids (e.g., centroid 1, centroid 2, etc. ) and finds corresponding clusters around those centroids. For example, the indexer circuitry 806 generates an indexing file 300 (e.g., indexing file 300 of FIG. 3) that includes centroid identification (e.g., centroid 1, centroid 2, etc. ) . The centroids include matches between quantized vector (s) (zi) and error vector (s) (ei) , as previously shown and described in connection with FIG. 3.

[0055] The vector search initiator circuitry 808 performs online vector search queries based on an input query point (x) . For example, the vector search initiator circuitry 808 identifies nearest probe-based clusters from a cluster list, identifies differences between distances associated with the query point and each quantized vector, and sorts the identified distances, as described in connection with FIG. 11. For example, the vector search initiator circuitry 808 loads K approximate intermediate minimal Li and the corresponding index i into an array. Subsequently, the vector search initiator circuitry 808 performs a loop to obtain an exact K Nearest Neighbors (KNN) value, as shown and described in connection with FIG. 4B.

[0056] The cluster identifier circuitry 810 identifies vector clustering. For example, the cluster identifier circuitry 810 identifies cluster centroids, where each centroid is  surrounded by regions that represent a cluster of vectors (e.g., vectors that exhibit similar characteristics or are close in semantic meaning, etc. ) . For example, the cluster identifier circuitry 810 divides vectors in a high-dimensional space into clusters based on implicit clustering properties, resulting in each cluster having a centroid, as described in connection with FIG. 10.

[0057] The tuple identifier circuitry 812 identifies tuples in arrays and / or sequences. For example, the tuple identifier circuitry 812 identifies an ordered sequence of values. In some examples, the tuple identifier circuitry 812 identifies tuples one by one in an array and / or inserts new tuple (s) into a maximum heap (topK) during heap sorting, as described in connection with FIG. 4A. In some examples, the tuple identifier circuitry 812 identifies lower bounds associated with the array S (e.g., an array of (i, Li) sorted by Li) at an ith tuple or a jth tuple.

[0058] The heap sorting generator circuitry 814 performs enhanced heap sorting to obtain final nearest neighbors of an input query point (x) . For example, the heap sorting generator circuitry 814 processes elements of an array by creating a minimum heap or a maximum heap using the elements of the array. In some examples, the heap sorting generator circuitry 814 creates a heap by adjusting the elements of the array and proceeds to remove root element (s) of the heap repeatedly by shifting the elements to the end of the array, prior to storing the heap structure with the remaining elements.

[0059] The data storage 816 can be used to store any information associated with the quantization generator circuitry 802, the distance identifier circuitry 804, the indexer circuitry 806, the vector search initiator circuitry 808, the cluster identifier circuitry 810, the tuple identifier circuitry 812, and / or the heap sorting generator circuitry 814. The example data storage 816 of the illustrated example of FIG. 8 can be implemented by any memory, storage device and / or storage disc for storing data such as flash memory, magnetic media, optical media, etc. Furthermore, the data stored in the example data storage 816 can be in any data format such as binary data, comma delimited data, tab delimited data, structured query language (SQL) structures, image data, etc.

[0060] In some examples, the apparatus includes means for performing quantization. For example, the means for performing quantization may be implemented by quantization generator circuitry 802. In some examples, the quantization generator circuitry 802 may be instantiated by programmable circuitry such as the example programmable circuitry 1312 of  FIG. 13. For instance, the quantization generator circuitry 802 may be instantiated by the example microprocessor 1400 of FIG. 14 executing machine executable instructions such as those implemented by at least block 915 of FIG. 9. In some examples, the quantization generator circuitry 802 may be instantiated by hardware logic circuitry, which may be implemented by an ASIC, XPU, or the FPGA circuitry 1500 of FIG. 15 structured to perform operations corresponding to the machine readable instructions. Additionally or alternatively, the quantization generator circuitry 802 may be instantiated by any other combination of hardware, software, and / or firmware. For example, the quantization generator circuitry 802 may be implemented by at least one or more hardware circuits (e.g., processor circuitry, discrete and / or integrated analog and / or digital circuitry, an FPGA, an ASIC, an XPU, a comparator, an operational-amplifier (op-amp) , a logic circuit, etc. ) structured to execute some or all of the machine readable instructions and / or to perform some or all of the operations corresponding to the machine readable instructions without executing software or firmware, but other structures are likewise appropriate.

[0061] In some examples, the apparatus includes means for identifying a distance. For example, the means for identifying a distance may be implemented by distance identifier circuitry 804. In some examples, the distance identifier circuitry 804 may be instantiated by programmable circuitry such as the example programmable circuitry 1312 of FIG. 13. For instance, the distance identifier circuitry 804 may be instantiated by the example microprocessor 1400 of FIG. 14 executing machine executable instructions such as those implemented by at least block 920 of FIG. 9. In some examples, the distance identifier circuitry 804 may be instantiated by hardware logic circuitry, which may be implemented by an ASIC, XPU, or the FPGA circuitry 1500 of FIG. 15 structured to perform operations corresponding to the machine readable instructions. Additionally or alternatively, the distance identifier circuitry 804 may be instantiated by any other combination of hardware, software, and / or firmware. For example, the distance identifier circuitry 804 may be implemented by at least one or more hardware circuits (e.g., processor circuitry, discrete and / or integrated analog and / or digital circuitry, an FPGA, an ASIC, an XPU, a comparator, an operational-amplifier (op-amp) , a logic circuit, etc. ) structured to execute some or all of the machine readable instructions and / or to perform some or all of the operations corresponding to the machine readable instructions without executing software or firmware, but other structures are likewise appropriate.

[0062] In some examples, the apparatus includes means for indexing. For example, the means for indexing may be implemented by indexer circuitry 806. In some examples, the indexer circuitry 806 may be instantiated by programmable circuitry such as the example programmable circuitry 1312 of FIG. 13. For instance, the indexer circuitry 806 may be instantiated by the example microprocessor 1400 of FIG. 14 executing machine executable instructions such as those implemented by at least block 925 of FIG. 9. In some examples, the indexer circuitry 806 may be instantiated by hardware logic circuitry, which may be implemented by an ASIC, XPU, or the FPGA circuitry 1500 of FIG. 15 structured to perform operations corresponding to the machine readable instructions. Additionally or alternatively, the indexer circuitry 806 may be instantiated by any other combination of hardware, software, and / or firmware. For example, the indexer circuitry 806 may be implemented by at least one or more hardware circuits (e.g., processor circuitry, discrete and / or integrated analog and / or digital circuitry, an FPGA, an ASIC, an XPU, a comparator, an operational-amplifier (op-amp) , a logic circuit, etc. ) structured to execute some or all of the machine readable instructions and / or to perform some or all of the operations corresponding to the machine readable instructions without executing software or firmware, but other structures are likewise appropriate.

[0063] In some examples, the apparatus includes means for initiating a vector search. For example, the means for initiating a vector search may be implemented by vector search initiator circuitry 808. In some examples, the vector search initiator circuitry 808 may be instantiated by programmable circuitry such as the example programmable circuitry 1312 of FIG. 13. For instance, the vector search initiator circuitry 808 may be instantiated by the example microprocessor 1400 of FIG. 14 executing machine executable instructions such as those implemented by at least block 935 of FIG. 9. In some examples, the vector search initiator circuitry 808 may be instantiated by hardware logic circuitry, which may be implemented by an ASIC, XPU, or the FPGA circuitry 1500 of FIG. 15 structured to perform operations corresponding to the machine readable instructions. Additionally or alternatively, the vector search initiator circuitry 808 may be instantiated by any other combination of hardware, software, and / or firmware. For example, the vector search initiator circuitry 808 may be implemented by at least one or more hardware circuits (e.g., processor circuitry, discrete and / or integrated analog and / or digital circuitry, an FPGA, an ASIC, an XPU, a comparator, an operational-amplifier (op-amp) , a logic circuit, etc. ) structured to execute  some or all of the machine readable instructions and / or to perform some or all of the operations corresponding to the machine readable instructions without executing software or firmware, but other structures are likewise appropriate.

[0064] In some examples, the apparatus includes means for performing cluster identification. For example, the means for performing cluster identification may be implemented by cluster identifier circuitry 810. In some examples, the cluster identifier circuitry 810 may be instantiated by programmable circuitry such as the example programmable circuitry 1312 of FIG. 13. For instance, the cluster identifier circuitry 810 may be instantiated by the example microprocessor 1400 of FIG. 14 executing machine executable instructions such as those implemented by at least block 1015 of FIG. 10. In some examples, the cluster identifier circuitry 810 may be instantiated by hardware logic circuitry, which may be implemented by an ASIC, XPU, or the FPGA circuitry 1500 of FIG. 15 structured to perform operations corresponding to the machine readable instructions. Additionally or alternatively, the cluster identifier circuitry 810 may be instantiated by any other combination of hardware, software, and / or firmware. For example, the cluster identifier circuitry 810 may be implemented by at least one or more hardware circuits (e.g., processor circuitry, discrete and / or integrated analog and / or digital circuitry, an FPGA, an ASIC, an XPU, a comparator, an operational-amplifier (op-amp) , a logic circuit, etc. ) structured to execute some or all of the machine readable instructions and / or to perform some or all of the operations corresponding to the machine readable instructions without executing software or firmware, but other structures are likewise appropriate.

[0065] In some examples, the apparatus includes identifying a tuple. For example, the means for identifying a tuple may be implemented by tuple identifier circuitry 812. In some examples, the tuple identifier circuitry 812 may be instantiated by programmable circuitry such as the example programmable circuitry 1312 of FIG. 13. For instance, the tuple identifier circuitry 812 may be instantiated by the example microprocessor 1400 of FIG. 14 executing machine executable instructions such as those implemented by at least block 1205 of FIG. 12. In some examples, the tuple identifier circuitry 812 may be instantiated by hardware logic circuitry, which may be implemented by an ASIC, XPU, or the FPGA circuitry 1500 of FIG. 15 structured to perform operations corresponding to the machine readable instructions. Additionally or alternatively, the tuple identifier circuitry 812 may be instantiated by any other combination of hardware, software, and / or firmware. For example, the tuple identifier  circuitry 812 may be implemented by at least one or more hardware circuits (e.g., processor circuitry, discrete and / or integrated analog and / or digital circuitry, an FPGA, an ASIC, an XPU, a comparator, an operational-amplifier (op-amp) , a logic circuit, etc. ) structured to execute some or all of the machine readable instructions and / or to perform some or all of the operations corresponding to the machine readable instructions without executing software or firmware, but other structures are likewise appropriate.

[0066] In some examples, the apparatus includes generating a heap sorting. For example, the means for generating a heap sorting may be implemented by heap sorting generator circuitry 814. In some examples, the heap sorting generator circuitry 814 may be instantiated by programmable circuitry such as the example programmable circuitry 1312 of FIG. 13. For instance, the heap sorting generator circuitry 814 may be instantiated by the example microprocessor 1400 of FIG. 14 executing machine executable instructions such as those implemented by at least block 1125 of FIG. 11. In some examples, the heap sorting generator circuitry 814 may be instantiated by hardware logic circuitry, which may be implemented by an ASIC, XPU, or the FPGA circuitry 1500 of FIG. 15 structured to perform operations corresponding to the machine readable instructions. Additionally or alternatively, the heap sorting generator circuitry 814 may be instantiated by any other combination of hardware, software, and / or firmware. For example, the heap sorting generator circuitry 814 may be implemented by at least one or more hardware circuits (e.g., processor circuitry, discrete and / or integrated analog and / or digital circuitry, an FPGA, an ASIC, an XPU, a comparator, an operational-amplifier (op-amp) , a logic circuit, etc. ) structured to execute some or all of the machine readable instructions and / or to perform some or all of the operations corresponding to the machine readable instructions without executing software or firmware, but other structures are likewise appropriate.

[0067] While an example manner of implementing the vector retrieval initiator circuitry 201 of FIG. 2A is illustrated in FIG. 8, one or more of the elements, processes and / or devices illustrated in FIG. 8 may be combined, divided, re-arranged, omitted, eliminated and / or implemented in any other way. Further, the example quantization generator circuitry 802, the example distance identifier circuitry 804, the example indexer circuitry 806, the example vector search initiator circuitry 808, the example cluster identifier circuitry 810, the example tuple identifier circuitry 812, the example heap sorting generator circuitry 814, and / or, more generally, the example vector retrieval initiator circuitry 201 of FIG. 2A may be  implemented by hardware, software, firmware and / or any combination of hardware, software and / or firmware. Thus, for example, any of the example quantization generator circuitry 802, the example distance identifier circuitry 804, the example indexer circuitry 806, the example vector search initiator circuitry 808, the example cluster identifier circuitry 810, the example tuple identifier circuitry 812, the example heap sorting generator circuitry 814, and / or, more generally, the example vector retrieval initiator circuitry 201 of FIG. 2A could be implemented by programmable circuitry in combination with machine readable instructions (e.g., firmware or software) , processor circuitry, analog circuit (s) , digital circuit (s) , logic circuit (s) , programmable processor (s) , programmable microcontroller (s) , graphics processing unit (s) (GPU (s) ) , digital signal processor (s) (DSP (s) , ASIC (s) ) , programmable logic device (s) (PLD (s) ) , and / or field programmable logic device (s) (FPLD (s) ) such as FPGAs. Further still, the vector retrieval initiator circuitry 201 of FIG. 2A may include one or more elements, processes, and / or devices in addition to, or instead of, those illustrated in FIG. 8, and / or may include more than one of any or all of the illustrated elements, processes and devices.

[0068] Flowcharts representative of example machine readable instructions, which may be executed by programmable circuitry to implement and / or instantiate the vector retrieval initiator circuitry 201 of FIG. 2A and / or representative of example operations which may be performed by programmable circuitry to implement and / or instantiate the vector retrieval initiator circuitry 201 of FIG. 2A, are shown in FIGS. 9-12. The machine readable instructions may be one or more executable programs or portion (s) of one or more executable programs for execution by programmable circuitry, such as the programmable circuitry 1312 shown in the example processor platform 1300 discussed below in connection with FIG. 13 and / or may be one or more function (s) or portion (s) of functions to be performed by the example programmable circuitry (e.g., an FPGA) discussed below in connection with FIGS. 14 and / or 15. In some examples, the machine readable instructions cause an operation, a task, etc., to be carried out and / or performed in an automated manner in the real world. As used herein, “automated” means without human involvement.

[0069] The program may be embodied in instructions (e.g., software and / or firmware) stored on one or more non-transitory computer readable and / or machine readable storage medium such as cache memory, a magnetic-storage device or disk (e.g., a floppy disk, a Hard Disk Drive (HDD) , etc. ) , an optical-storage device or disk (e.g., a Blu-ray disk, a Compact Disk (CD) , a Digital Versatile Disk (DVD) , etc. ) , a Redundant Array of Independent Disks  (RAID) , a register, ROM, a solid-state drive (SSD) , SSD memory, non-volatile memory (e.g., electrically erasable programmable read-only memory (EEPROM) , flash memory, etc. ) , volatile memory (e.g., Random Access Memory (RAM) of any type, etc. ) , and / or any other storage device or storage disk. The instructions of the non-transitory computer readable and / or machine readable medium may program and / or be executed by programmable circuitry located in one or more hardware devices, but the entire program and / or parts thereof could alternatively be executed and / or instantiated by one or more hardware devices other than the programmable circuitry and / or embodied in dedicated hardware. The machine readable instructions may be distributed across multiple hardware devices and / or executed by two or more hardware devices (e.g., a server and a client hardware device) . For example, the client hardware device may be implemented by an endpoint client hardware device (e.g., a hardware device associated with a human and / or machine user) or an intermediate client hardware device gateway (e.g., a radio access network (RAN) ) that may facilitate communication between a server and an endpoint client hardware device. Similarly, the non-transitory computer readable storage medium may include one or more mediums. Further, although the example program is described with reference to the flowcharts illustrated in FIGS. 9-12, many other methods of implementing the example vector retrieval initiator circuitry 201 of FIG. 2A may alternatively be used. For example, the order of execution of the blocks of the flowchart (s) may be changed, and / or some of the blocks described may be changed, eliminated, or combined. Additionally or alternatively, any or all of the blocks of the flow chart may be implemented by one or more hardware circuits (e.g., processor circuitry, discrete and / or integrated analog and / or digital circuitry, an FPGA, an ASIC, a comparator, an operational-amplifier (op-amp) , a logic circuit, etc. ) structured to perform the corresponding operation without executing software or firmware. The programmable circuitry may be distributed in different network locations and / or local to one or more hardware devices (e.g., a single-core processor (e.g., a single core CPU) , a multi-core processor (e.g., a multi-core CPU, an XPU, etc. ) ) . For example, the programmable circuitry may be a CPU and / or an FPGA located in the same package (e.g., the same integrated circuit (IC) package or in two or more separate housings) , one or more processors in a single machine, multiple processors distributed across multiple servers of a server rack, multiple processors distributed across one or more server racks, etc., and / or any combination (s) thereof.

[0070] The machine readable instructions described herein may be stored in one or  more of a compressed format, an encrypted format, a fragmented format, a compiled format, an executable format, a packaged format, etc. Machine readable instructions as described herein may be stored as data (e.g., computer-readable data, machine-readable data, one or more bits (e.g., one or more computer-readable bits, one or more machine-readable bits, etc. ) , a bitstream (e.g., a computer-readable bitstream, a machine-readable bitstream, etc. ) , etc. ) or a data structure (e.g., as portion (s) of instructions, code, representations of code, etc. ) that may be utilized to create, manufacture, and / or produce machine executable instructions. For example, the machine readable instructions may be fragmented and stored on one or more storage devices, disks and / or computing devices (e.g., servers) located at the same or different locations of a network or collection of networks (e.g., in the cloud, in edge devices, etc. ) . The machine readable instructions may require one or more of installation, modification, adaptation, updating, combining, supplementing, configuring, decryption, decompression, unpacking, distribution, reassignment, compilation, etc., in order to make them directly readable, interpretable, and / or executable by a computing device and / or other machine. For example, the machine readable instructions may be stored in multiple parts, which are individually compressed, encrypted, and / or stored on separate computing devices, wherein the parts when decrypted, decompressed, and / or combined form a set of computer-executable and / or machine executable instructions that implement one or more functions and / or operations that may together form a program such as that described herein.

[0071] In another example, the machine readable instructions may be stored in a state in which they may be read by programmable circuitry, but require addition of a library (e.g., a dynamic link library (DLL) ) , a software development kit (SDK) , an application programming interface (API) , etc., in order to execute the machine-readable instructions on a particular computing device or other device. In another example, the machine readable instructions may need to be configured (e.g., settings stored, data input, network addresses recorded, etc. ) before the machine readable instructions and / or the corresponding program (s) can be executed in whole or in part. Thus, machine readable, computer readable and / or machine readable media, as used herein, may include instructions and / or program (s) regardless of the particular format or state of the machine readable instructions and / or program (s) .

[0072] The machine readable instructions described herein can be represented by any past, present, or future instruction language, scripting language, programming language, etc. For example, the machine readable instructions may be represented using any of the following  languages: C, C++, Java, C#, Perl, Python, JavaScript, HyperText Markup Language (HTML) , Structured Query Language (SQL) , Swift, etc.

[0073] As mentioned above, the example operations of FIGS. 3-4 may be implemented using executable instructions (e.g., computer readable and / or machine readable instructions) stored on one or more non-transitory computer readable and / or machine readable media. As used herein, the terms non-transitory computer readable medium, non-transitory computer readable storage medium, non-transitory machine readable medium, and / or non-transitory machine readable storage medium are expressly defined to include any type of computer readable storage device and / or storage disk and to exclude propagating signals and to exclude transmission media. Examples of such non-transitory computer readable medium, non-transitory computer readable storage medium, non-transitory machine readable medium, and / or non-transitory machine readable storage medium include optical storage devices, magnetic storage devices, an HDD, a flash memory, a read-only memory (ROM) , a CD, a DVD, a cache, a RAM of any type, a register, and / or any other storage device or storage disk in which information is stored for any duration (e.g., for extended time periods, permanently, for brief instances, for temporarily buffering, and / or for caching of the information) . As used herein, the terms “non-transitory computer readable storage device” and “non-transitory machine readable storage device” are defined to include any physical (mechanical, magnetic and / or electrical) hardware to retain information for a time period, but to exclude propagating signals and to exclude transmission media. Examples of non-transitory computer readable storage devices and / or non-transitory machine readable storage devices include random access memory of any type, read only memory of any type, solid state memory, flash memory, optical discs, magnetic disks, disk drives, and / or redundant array of independent disks (RAID) systems. As used herein, the term “device” refers to physical structure such as mechanical and / or electrical equipment, hardware, and / or circuitry that may or may not be configured by computer readable instructions, machine readable instructions, etc., and / or manufactured to execute computer-readable instructions, machine-readable instructions, etc.

[0074] “Including” and “comprising” (and all forms and tenses thereof) are used herein to be open ended terms. Thus, whenever a claim employs any form of “include” or “comprise” (e.g., comprises, includes, comprising, including, having, etc. ) as a preamble or within a claim recitation of any kind, it is to be understood that additional elements, terms, etc., may be present without falling outside the scope of the corresponding claim or recitation.  As used herein, when the phrase “at least” is used as the transition term in, for example, a preamble of a claim, it is open-ended in the same manner as the term “comprising” and “including” are open ended. The term “and / or” when used, for example, in a form such as A, B, and / or C refers to any combination or subset of A, B, C such as (1) A alone, (2) B alone, (3) C alone, (4) A with B, (5) A with C, (6) B with C, or (7) A with B and with C. As used herein in the context of describing structures, components, items, objects and / or things, the phrase “at least one of A and B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. Similarly, as used herein in the context of describing structures, components, items, objects and / or things, the phrase “at least one of A or B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. As used herein in the context of describing the performance or execution of processes, instructions, actions, and / or activities, the phrase “at least one of A and B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. Similarly, as used herein in the context of describing the performance or execution of processes, instructions, actions, and / or activities, the phrase “at least one of A or B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B.

[0075] As used herein, singular references (e.g., “a” , “an” , “first” , “second” , etc. ) do not exclude a plurality. The term “a” or “an” object, as used herein, refers to one or more of that object. The terms “a” (or “an” ) , “one or more” , and “at least one” are used interchangeably herein. Furthermore, although individually listed, a plurality of means, elements, or actions may be implemented by, e.g., the same entity or object. Additionally, although individual features may be included in different examples or claims, these may possibly be combined, and the inclusion in different examples or claims does not imply that a combination of features is not feasible and / or advantageous.

[0076] FIG. 9 is a flowchart representative of example machine readable instructions and / or example operations 900 that may be executed, instantiated, and / or performed by programmable circuitry to implement the example vector retrieval initiator circuitry 201 of FIG. 2A. The machine readable instructions and / or the operations 900 of FIG. 9 begin at block 905, at which the quantization generator circuitry 802 initiates offline vector database generation. In examples disclosed herein, a first stage is used to quantize each input vector  using offline vector database quantization and a second stage is used to search the INT8 vectors and refine the results using FP32 vectors as needed for optimized system performance and accuracy. The quantization generator circuitry 802 receives input vector (s) (yi) , at block 910, and performs vector quantization using the input vector (s) (yi) , at block 915. For example, the quantization generator circuitry 802 quantizes all input vectors (yi) in a vector base. For example, the quantization generator circuitry 802 quantizes the vector base to an 8-bit signed integer (INT8) , resulting in the generation of a quantized vector (zi) . The distance identifier circuitry 804 determines distances between the resulting quantized vector (s) (zi) and the original input vector (s) (yi) , at block 920. For example, the distance identifier circuitry 804 identifies a distance from the input vector (yi) to the quantized vector (zi) as an error vector (ei) , as described in more detail in connection with FIG. 4A. The indexer circuitry 806 subsequently performs IVFFlat indexing using the input vector (s) (yi) , the quantized vector (s) (zi) , and the error vector (s) (ei) , at block 925. As described in more detail in connection with FIG. 10, the indexer circuitry 806 generates IVFFlat indexing by appending quantized vector (s) (zi) and error vector (s) (ei) to each input vector (yi) . Subsequently, the indexer circuitry 806 stores the resulting output vectors in a vector database, at block 930. The vector search initiator circuitry 808 proceeds to perform an online vector search query based on an input query point (x) , at block 935. For example, as described in more detail in connection with FIG. 12, the vector search initiator circuitry 808 searches the INT8 vectors and refines the results using FP32 vectors for optimized system performance.

[0077] FIG. 10 is a flowchart representative of example machine readable instructions and / or example operations 925 that may be executed, instantiated, and / or performed by programmable circuitry to implement the example vector retrieval initiator circuitry 201 of FIG. 2A. The machine readable instructions and / or the operations 925 of FIG. 10 begin at block 1005, at which the indexer circuitry 806 receives the input vector (s) (yi) , the quantized vector (s) (zi) , and the error vector (s) (ei) . The cluster identifier circuitry 810 performs vector clustering using the vector-based information, at block 1010. For example, the cluster identifier circuitry 810 identifies cluster centroids, such that each centroid is surrounded by regions that represent a cluster of vectors, at block 1015. The indexer circuitry 806 proceeds to match vector (s) with the generated clusters by comparing each input vector (yi) with each centroid, at block 1020. For example, the indexer circuitry 806 identifies a number of centroids (e.g., centroid 1, centroid 2, etc. ) and corresponding clusters around those centroids,  matching these clusters with the vector (s) . The indexer circuitry 806 generates IVFFlat indexing by appending the quantized vector (zi) and error vector (ei) to each input vector (yi) , at block 1025. Based on the IVFFlat indexing, the indexer circuitry 806 generates an indexing file, at block 1030. As shown in connection with FIG. 3, the indexing file includes centroid identification (e.g., centroid 1, centroid 2, etc. ) with matching quantized vector (s) (zi) and error vector (s) (ei) .

[0078] FIG. 11 is a flowchart representative of example machine readable instructions and / or example operations 935 that may be executed, instantiated, and / or performed by programmable circuitry to implement the example vector retrieval initiator circuitry 201 of FIG. 2A. The machine readable instructions and / or the operations 935 of FIG. 9 begin at block 1105, at which the vector search initiator circuitry 808 identifies nearest probe-based clusters (nprobe) from a cluster list (nlist) by determining Euclidean distances between an inquiry point and each centroid. For example, when searching for K nearest vectors, the search space is narrowed to only a subset of lists associated with the generated IVFFlat indexing file. Therefore, the effectiveness of the indexing file depends on the number and / or size of the lists and the number of lists that need to be examined when performing a search based on an input query point (x) (e.g., using probes) . The distance identifier circuitry 804 calculates a distance (bi) between the input query point (x) and each quantized vector (zi) of the nearest probe-based clusters (nprobe) , at block 1110. For example, as described in connection with FIG. 4B, the distance identifier circuitry 804 identifies the distance (bi) , where bi=L (x, zi) . When determining bi, the distance identifier circuitry 804 loads the INT8 encoded zi and converts the quantized vector to a 32-bit float number (FP32) . The vector search initiator circuitry 808 identifies a difference (e.g., Li= bi-ei) between each distance (bi) and an associated error vector (ei) , at block 1115. The vector search initiator circuitry 808 proceeds to sort the identified distances (Li) ascendingly using the format (i, Li) , at block 1120. The heap sorting generator circuitry 814 uses the sorted distances for performing enhanced heap sorting to obtain final nearest neighbors (K) of the input query point (x) , at block 1125, as described in more detail in connection with FIG. 12. The vector search initiator circuitry 808 outputs the retrieved vector based on the results of the enhanced heap sorting, at block 1130.

[0079] FIG. 12 is a flowchart representative of example machine readable instructions and / or example operations 1125 that may be executed, instantiated, and / or performed by  programmable circuitry to implement the example vector retrieval initiator circuitry 201 of FIG. 2A. The machine readable instructions and / or the operations 1125 of FIG. 12 begin at block 1205, at which the tuple identifier circuitry 812 identifies tuple (s) in arrays (S) sorted using the distances (Li) , at block 1205. The tuple identifier circuitry 812 identifies the first tuple in the sequence, at block 1210. Using the first identified tuple, the heap sorting generator circuitry 814 determines whether a lower bound is greater than or equal to a threshold (T) associated with a maximum heap (e.g., identified as topK) , at block 1215. For example, as described in connection with FIG. 4B, the heap sorting generator circuitry 814 checks each tuple one by one (e.g., using index, lower_bound) in the array S. If the heap sorting generator circuitry 814 determines that the lower bound is greater than or equal to the threshold T for a given tuple, the heap sorting generator circuitry 814 completes the loop. If the heap sorting generator circuitry 814 determines that the lower bound is less than the threshold T, the distance identifier circuitry 804 calculates the exact distance from the input query point (x) to the index (yindex) , at block 1220. The heap sorting generator circuitry 814 subsequently inserts a new tuple into the maximum heap (topK) , at block 1225. The heap sorting generator circuitry 814 determines whether additional tuple (s) are present in the sequence (e.g., using the array S) and proceeds to repeat the identification of the subsequent tuple to determine the lower bound values until the threshold is met, at block 1230.

[0080] FIG. 13 is a block diagram of an example programmable circuitry platform 1300 structured to execute and / or instantiate the example machine-readable instructions and / or the example operations of FIGS. 9-12 to implement the example vector retrieval initiator circuitry 201 of FIG. 2A. The programmable circuitry platform 1300 can be, for example, a server, a personal computer, a workstation, a self-learning machine (e.g., a neural network) , a mobile device (e.g., a cell phone, a smart phone, a tablet such as an iPadTM) , a personal digital assistant (PDA) , an Internet appliance, a DVD player, a CD player, a digital video recorder, a Blu-ray player, a gaming console, a personal video recorder, a set top box, a headset (e.g., an augmented reality (AR) headset, a virtual reality (VR) headset, etc. ) or other wearable device, or any other type of computing and / or electronic device.

[0081] The programmable circuitry platform 1300 of the illustrated example includes programmable circuitry 1312. The programmable circuitry 1312 of the illustrated example is hardware. For example, the programmable circuitry 1312 can be implemented by one or more integrated circuits, logic circuits, FPGAs microprocessors, CPUs, GPUs, DSPs, and / or  microcontrollers from any desired family or manufacturer. The programmable circuitry 1312 may be implemented by one or more semiconductor based (e.g., silicon based) devices. In this example, the processor circuitry 1312 implements the quantization generator circuitry 802, the distance identifier circuitry 804, the indexer circuitry 806, the vector search initiator circuitry 808, the cluster identifier circuitry 810, the tuple identifier circuitry 812, and the heap sorting generator circuitry 814.

[0082] The programmable circuitry 1312 of the illustrated example includes a local memory 1313 (e.g., a cache, registers, etc. ) . The programmable circuitry 1312 of the illustrated example is in communication with a main memory including a volatile memory 1314 and a non-volatile memory 1316 by a bus 1318. The volatile memory 1314 may be implemented by Synchronous Dynamic Random Access Memory (SDRAM) , Dynamic Random Access Memory (DRAM) ,  Dynamic Random Access Memory and / or any other type of RAM device. The non-volatile memory 1316 may be implemented by flash memory and / or any other desired type of memory device. Access to the main memory 1314, 1316 of the illustrated example is controlled by a memory controller 1317. In some examples, the memory controller 1317 may be implemented by one or more integrated circuits, logic circuits, microcontrollers from any desired family or manufacturer, or any other type of circuitry to manage the flow of data going to and from the main memory 1314, 1316.

[0083] The programmable circuitry platform 1300 of the illustrated example also includes interface circuitry 1320. The interface circuitry 1320 may be implemented by hardware in accordance with any type of interface standard, such as an Ethernet interface, a universal serial bus (USB) interface, a interface, a near field communication (NFC) interface, a Peripheral Component Interconnect (PCI) interface, and / or a Peripheral Component Interconnect Express (PCIe) interface.

[0084] In the illustrated example, one or more input devices 1322 are connected to the interface circuitry 1320. The input device (s) 1322 permit (s) a user (e.g., a human user, a machine user, etc. ) to enter data and / or commands into the programmable circuitry 1312. The input device (s) 1322 can be implemented by, for example, an audio sensor, a microphone, a camera (still or video) , a keyboard, a button, a mouse, a touchscreen, a track-pad, a trackball, an isopoint device, and / or a voice recognition system.

[0085] One or more output devices 1324 are also connected to the interface circuitry  1320 of the illustrated example. The output devices 1324 can be implemented, for example, by display devices (e.g., a light emitting diode (LED) , an organic light emitting diode (OLED) , a liquid crystal display (LCD) , a cathode ray tube (CRT) display, an in-place switching (IPS) display, a touchscreen, etc. ) , a tactile output device, a printer, and / or speaker. The interface circuitry 1320 of the illustrated example, thus, typically includes a graphics driver card, a graphics driver chip, and / or graphics processor circuitry such as a GPU.

[0086] The interface circuitry 1320 of the illustrated example also includes a communication device such as a transmitter, a receiver, a transceiver, a modem, a residential gateway, a wireless access point, and / or a network interface to facilitate exchange of data with external machines (e.g., computing devices of any kind) by a network 1326. The communication can be by, for example, an Ethernet connection, a digital subscriber line (DSL) connection, a telephone line connection, a coaxial cable system, a satellite system, a line-of-site wireless system, a cellular telephone system, an optical connection, etc.

[0087] The programmable circuitry platform 1300 of the illustrated example also includes one or more mass storage devices 1328 to store software and / or data. Examples of such mass storage devices 1328 include magnetic storage devices (e.g., floppy disk, drives, HDDs, etc. ) , optical storage devices (e.g., Blu-ray disks, CDs, DVDs, etc. ) , RAID systems, and / or solid-state storage discs or devices such as flash memory devices and / or SSDs.

[0088] The machine executable instructions 1332, which may be implemented by the machine readable instructions of FIGS. 9, 10, 11 and / or 12, may be stored in the mass storage device 1438, in the volatile memory 1314, in the non-volatile memory 1316, and / or on at least one non-transitory computer readable storage medium such as a CD or DVD which may be removable.

[0089] FIG. 14 is a block diagram of an example implementation of the programmable circuitry 1312 of FIG. 13. In this example, the programmable circuitry 1312 of FIG. 13 is implemented by a microprocessor 1400. For example, the microprocessor 1400 may be a general purpose microprocessor (e.g., general purpose microprocessor circuitry) . The microprocessor 1400 executes some or all of the machine readable instructions of the flowchart of FIGS. 9-12 to effectively instantiate the circuitry of FIG. 8 logic circuits to perform the operations corresponding to those machine readable instructions. In some such examples, the circuitry of FIG. 8 is instantiated by the hardware circuits of the microprocessor 1400 in combination with the instructions. For example, the microprocessor 1400 may  implement multi-core hardware circuitry such as a CPU, a DSP, a GPU, an XPU, etc. Although it may include any number of example cores 1402 (e.g., 1 core) , the microprocessor 1400 of this example is a multi-core semiconductor device including N cores. The cores 1402 of the microprocessor 1400 may operate independently or may cooperate to execute machine readable instructions. For example, machine code corresponding to a firmware program, an embedded software program, or a software program may be executed by one of the cores 1402 or may be executed by multiple ones of the cores 1402 at the same or different times. In some examples, the machine code corresponding to the firmware program, the embedded software program, or the software program is split into threads and executed in parallel by two or more of the cores 1402. The software program may correspond to a portion or all of the machine readable instructions and / or operations represented by the flowcharts of FIGS. 9-12.

[0090] The cores 1402 may communicate by a first example bus 1404. In some examples, the first bus 1404 may implement a communication bus to effectuate communication associated with one (s) of the cores 1402. For example, the first bus 1404 may implement at least one of an Inter-Integrated Circuit (I2C) bus, a Serial Peripheral Interface (SPI) bus, a PCI bus, or a PCIe bus. Additionally or alternatively, the first bus 1404 may implement any other type of computing or electrical bus. The cores 1402 may obtain data, instructions, and / or signals from one or more external devices by example interface circuitry 1406. The cores 1402 may output data, instructions, and / or signals to the one or more external devices by the interface circuitry 1406. Although the cores 1402 of this example include example local memory 1420 (e.g., Level 1 (L1) cache that may be split into an L1 data cache and an L1 instruction cache) , the microprocessor 1400 also includes example shared memory 1410 that may be shared by the cores (e.g., Level 2 (L2_cache) ) for high-speed access to data and / or instructions. Data and / or instructions may be transferred (e.g., shared) by writing to and / or reading from the shared memory 1410. The local memory 1420 of each of the cores 1402 and the shared memory 1410 may be part of a hierarchy of storage devices including multiple levels of cache memory and the main memory (e.g., the main memory 1414, 1416 of FIG. 14) . Typically, higher levels of memory in the hierarchy exhibit lower access time and have smaller storage capacity than lower levels of memory. Changes in the various levels of the cache hierarchy are managed (e.g., coordinated) by a cache coherency policy.

[0091] Each core 1402 may be referred to as a CPU, DSP, GPU, etc., or any other  type of hardware circuitry. Each core 1402 includes control unit circuitry 1414, arithmetic and logic (AL) circuitry (sometimes referred to as an ALU) 1416, a plurality of registers 1418, the L1 cache 1420, and a second example bus 1422. Other structures may be present. For example, each core 1402 may include vector unit circuitry, single instruction multiple data (SIMD) unit circuitry, load / store unit (LSU) circuitry, branch / jump unit circuitry, floating-point unit (FPU) circuitry, etc. The control unit circuitry 1414 includes semiconductor-based circuits structured to control (e.g., coordinate) data movement within the corresponding core 1402. The AL circuitry 1416 includes semiconductor-based circuits structured to perform one or more mathematic and / or logic operations on the data within the corresponding core 1402. The AL circuitry 1416 of some examples performs integer-based operations. In other examples, the AL circuitry 1416 also performs floating-point operations. In yet other examples, the AL circuitry 1416 may include first AL circuitry that performs integer-based operations and second AL circuitry that performs floating point operations. In some examples, the AL circuitry 1416 may be referred to as an Arithmetic Logic Unit (ALU) .

[0092] The registers 1418 are semiconductor-based structures to store data and / or instructions such as results of one or more of the operations performed by the AL circuitry 1416 of the corresponding core 1402. For example, the registers 1418 may include vector register (s) , SIMD register (s) , general purpose register (s) , flag register (s) , segment register (s) , machine specific register (s) , instruction pointer register (s) , control register (s) , debug register (s) , memory management register (s) , machine check register (s) , etc. The registers 1418 may be arranged in a bank as shown in FIG. 14. Alternatively, the registers 1418 may be organized in any other arrangement, format, or structure including distributed throughout the core 1402 to shorten access time. The second bus 1422 may be implemented by at least one of an I2C bus, a SPI bus, a PCI bus, or a PCIe bus.

[0093] Each core 1402 and / or, more generally, the microprocessor 1400 may include additional and / or alternate structures to those shown and described above. For example, one or more clock circuits, one or more power supplies, one or more power gates, one or more cache home agents (CHAs) , one or more converged / common mesh stops (CMSs) , one or more shifters (e.g., barrel shifter (s) ) and / or other circuitry may be present. The microprocessor 1400 is a semiconductor device fabricated to include many transistors interconnected to implement the structures described above in one or more integrated circuits (ICs) contained in one or more packages.

[0094] The microprocessor 1400 may include and / or cooperate with one or more accelerators (e.g., acceleration circuitry, hardware accelerators, etc. ) . In some examples, accelerators are implemented by logic circuitry to perform certain tasks more quickly and / or efficiently than can be done by a general-purpose processor. Examples of accelerators include ASICs and FPGAs such as those discussed herein. A GPU, DSP and / or other programmable device can also be an accelerator. Accelerators may be on-board the microprocessor 1400, in the same chip package as the microprocessor 1400 and / or in one or more separate packages from the microprocessor 1400.

[0095] FIG. 15 is a block diagram of another example implementation of the programmable circuitry of FIG. 13. In this example, the programmable circuitry 1312 is implemented by FPGA circuitry 1500. For example, the FPGA circuitry 1500 may be implemented by an FPGA. The FPGA circuitry 1500 can be used, for example, to perform operations that could otherwise be performed by the example microprocessor 1400 of FIG. 14 executing corresponding machine readable instructions. However, once configured, the FPGA circuitry 1500 instantiates the operations and / or functions corresponding to the machine readable instructions in hardware and, thus, can often execute the operations / functions faster than they could be performed by a general-purpose microprocessor executing the corresponding software.

[0096] More specifically, in contrast to the microprocessor 1400 of FIG. 14 described above (which is a general purpose device that may be programmed to execute some or all of the machine readable instructions represented by the flowcharts of FIGS. 9-12 but whose interconnections and logic circuitry are fixed once fabricated) , the FPGA circuitry 1500 of the example of FIG. 15 includes interconnections and logic circuitry that may be configured, structured, programmed, and / or interconnected in different ways after fabrication to instantiate, for example, some or all of the operations / functions corresponding to the machine readable instructions represented by the flowcharts of FIGS. 9-12. In particular, the FPGA 1500 may be thought of as an array of logic gates, interconnections, and switches. The switches can be programmed to change how the logic gates are interconnected by the interconnections, effectively forming one or more dedicated logic circuits (unless and until the FPGA circuitry 1500 is reprogrammed) . The configured logic circuits enable the logic gates to cooperate in different ways to perform different operations on data received by input circuitry. Those operations may correspond to some or all of the instructions (e.g., the  software and / or firmware) represented by the flowcharts of FIGS. 9-12. As such, the FPGA circuitry 1500 may be configured and / or structured to effectively instantiate some or all of the operations / functions corresponding to the machine readable instructions of the flowcharts of FIGS. 9-12 as dedicated logic circuits to perform the operations / functions corresponding to those software instructions in a dedicated manner analogous to an ASIC. Therefore, the FPGA circuitry 1500 may perform the operations / functions corresponding to the some or all of the machine readable instructions of FIGS. 9-12 faster than the general-purpose microprocessor can execute the same.

[0097] In the example of FIG. 15, the FPGA circuitry 1500 is configured and / or structured in response to being programmed (and / or reprogrammed one or more times) based on a binary file. In some examples, the binary file may be compiled and / or generated based on instructions in a hardware description language (HDL) such as Lucid, Very High Speed Integrated Circuits (VHSIC) Hardware Description Language (VHDL) , or Verilog. For example, a user (e.g., a human user, a machine user, etc. ) may write code or a program corresponding to one or more operations / functions in an HDL; the code / program may be translated into a low-level language as needed; and the code / program (e.g., the code / program in the low-level language) may be converted (e.g., by a compiler, a software application, etc. ) into the binary file. In some examples, the FPGA circuitry 1500 of FIG. 15 may access and / or load the binary file to cause the FPGA circuitry 1500 of FIG. 15 to be configured and / or structured to perform the one or more operations / functions. For example, the binary file may be implemented by a bit stream (e.g., one or more computer-readable bits, one or more machine-readable bits, etc. ) , data (e.g., computer-readable data, machine-readable data, etc. ) , and / or machine-readable instructions accessible to the FPGA circuitry 1500 of FIG. 15 to cause configuration and / or structuring of the FPGA circuitry 1500 of FIG. 15, or portion (s) thereof.

[0098] In some examples, the binary file is compiled, generated, transformed, and / or otherwise output from a uniform software platform utilized to program FPGAs. For example, the uniform software platform may translate first instructions (e.g., code or a program) that correspond to one or more operations / functions in a high-level language (e.g., C, C++, Python, etc. ) into second instructions that correspond to the one or more operations / functions in an HDL. In some such examples, the binary file is compiled, generated, and / or otherwise output from the uniform software platform based on the second instructions. In some examples, the  FPGA circuitry 1500 of FIG. 15 may access and / or load the binary file to cause the FPGA circuitry 1500 of FIG. 15 to be configured and / or structured to perform the one or more operations / functions. For example, the binary file may be implemented by a bit stream (e.g., one or more computer-readable bits, one or more machine-readable bits, etc. ) , data (e.g., computer-readable data, machine-readable data, etc. ) , and / or machine-readable instructions accessible to the FPGA circuitry 1500 of FIG. 15 to cause configuration and / or structuring of the FPGA circuitry 1500 of FIG. 15, or portion (s) thereof.

[0099] The FPGA circuitry 1500 of FIG. 15, includes example input / output (I / O) circuitry 1502 to obtain and / or output data to / from example configuration circuitry 1504 and / or external hardware 1506. For example, the configuration circuitry 1504 may be implemented by interface circuitry that may obtain a binary file, which may be implemented by a bit stream, data, and / or machine-readable instructions, to configure the FPGA circuitry 1500, or portion (s) thereof. In some such examples, the configuration circuitry 1504 may obtain the binary file from a user, a machine (e.g., hardware circuitry (e.g., programmable or dedicated circuitry) that may implement an Artificial Intelligence / Machine Learning (AI / ML) model to generate the binary file) , etc., and / or any combination (s) thereof) . In some examples, the external hardware 1506 may be implemented by external hardware circuitry. For example, the external hardware 1506 may be implemented by the microprocessor 1400 of FIG. 14.

[0100] The FPGA circuitry 1500 also includes an array of example logic gate circuitry 1508, a plurality of example configurable interconnections 1510, and example storage circuitry 1512. The logic gate circuitry 1508 and the configurable interconnections 1510 are configurable to instantiate one or more operations / functions that may correspond to at least some of the machine readable instructions of FIGS. 9-12 and / or other desired operations. The logic gate circuitry 1508 shown in FIG. 15 is fabricated in blocks or groups. Each block includes semiconductor-based electrical structures that may be configured into logic circuits. In some examples, the electrical structures include logic gates (e.g., And gates, Or gates, Nor gates, etc. ) that provide basic building blocks for logic circuits. Electrically controllable switches (e.g., transistors) are present within each of the logic gate circuitry 1508 to enable configuration of the electrical structures and / or the logic gates to form circuits to perform desired operations / functions. The logic gate circuitry 1508 may include other electrical structures such as look-up tables (LUTs) , registers (e.g., flip-flops or latches) , multiplexers, etc.

[0101] The configurable interconnections 1510 of the illustrated example are conductive pathways, traces, vias, or the like that may include electrically controllable switches (e.g., transistors) whose state can be changed by programming (e.g., using an HDL instruction language) to activate or deactivate one or more connections between one or more of the logic gate circuitry 1508 to program desired logic circuits.

[0102] The storage circuitry 1512 of the illustrated example is structured to store result (s) of the one or more of the operations performed by corresponding logic gates. The storage circuitry 1512 may be implemented by registers or the like. In the illustrated example, the storage circuitry 1512 is distributed amongst the logic gate circuitry 1508 to facilitate access and increase execution speed.

[0103] The example FPGA circuitry 1500 of FIG. 15 also includes example dedicated operations circuitry 1514. In this example, the dedicated operations circuitry 1514 includes special purpose circuitry 1516 that may be invoked to implement commonly used functions to avoid the need to program those functions in the field. Examples of such special purpose circuitry 1516 include memory (e.g., DRAM) controller circuitry, PCIe controller circuitry, clock circuitry, transceiver circuitry, memory, and multiplier-accumulator circuitry. Other types of special purpose circuitry may be present. In some examples, the FPGA circuitry 1500 may also include example general purpose programmable circuitry 1518 such as an example CPU 1520 and / or an example DSP 1522. Other general purpose programmable circuitry 1518 may additionally or alternatively be present such as a GPU, an XPU, etc., that can be programmed to perform other operations.

[0104] Although FIGS. 14 and 15 illustrate two example implementations of the programmable circuitry 1312 of FIG. 13, many other approaches are contemplated. For example, FPGA circuitry may include an on-board CPU, such as one or more of the example CPU 1520 of FIG. 15. Therefore, the programmable circuitry 1312 of FIG. 13 may additionally be implemented by combining at least the example microprocessor 1400 of FIG. 14 and the example FPGA circuitry 1500 of FIG. 15. In some such hybrid examples, one or more cores 1502 of FIG. 15 may execute a first portion of the machine readable instructions represented by the flowchart (s) of FIGS. 9-12 to perform first operation (s)  / function (s) , the FPGA circuitry 1500 of FIG. 15 may be configured and / or structured to perform second operation (s)  / function (s) corresponding to a second portion of the machine readable instructions represented by the flowcharts of FIG. 9-12, and / or an ASIC may be configured  and / or structured to perform third operation (s)  / function (s) corresponding to a third portion of the machine readable instructions represented by the flowcharts of FIGS. 9-12.

[0105] It should be understood that some or all of the circuitry of FIG. 8 may, thus, be instantiated at the same or different times. For example, same and / or different portion (s) of the microprocessor 1400 of FIG. 14 may be programmed to execute portion (s) of machine-readable instructions at the same and / or different times. In some examples, same and / or different portion (s) of the FPGA circuitry 1500 of FIG. 15 may be configured and / or structured to perform operations / functions corresponding to portion (s) of machine-readable instructions at the same and / or different times.

[0106] In some examples, some or all of the circuitry of FIG. 8 may be instantiated, for example, in one or more threads executing concurrently and / or in series. For example, the microprocessor 1400 of FIG. 14 may execute machine readable instructions in one or more threads executing concurrently and / or in series. In some examples, the FPGA circuitry 1500 of FIG. 15 may be configured and / or structured to carry out operations / functions concurrently and / or in series. Moreover, in some examples, some or all of the circuitry of FIG. 2 may be implemented within one or more virtual machines and / or containers executing on the microprocessor 1400 of FIG. 14.

[0107] In some examples, the programmable circuitry 1312 of FIGS. 13 may be in one or more packages. For example, the microprocessor 1400 of FIG. 14 and / or the FPGA circuitry 1500 of FIG. 15 may be in one or more packages. In some examples, an XPU may be implemented by the programmable circuitry 1312 of FIG. 13 which may be in one or more packages. For example, the XPU may include a CPU (e.g., the microprocessor 1400 of FIG. 14, the CPU 1520 of FIG. 15, etc. ) in one package, a DSP (e.g., the DSP 1522 of FIG. 15) in another package, a GPU in yet another package, and an FPGA (e.g., the FPGA circuitry 1500 of FIG. 15) in still yet another package.

[0108] A block diagram illustrating an example software distribution platform 1605 to distribute software such as the example machine readable instructions 1332 of FIG. 13 to other hardware devices (e.g., hardware devices owned and / or operated by third parties from the owner and / or operator of the software distribution platform) is illustrated in FIG. 16. The example software distribution platform 1605 may be implemented by any computer server, data facility, cloud service, etc., capable of storing and transmitting software to other computing devices. The third parties may be customers of the entity owning and / or operating  the software distribution platform 1605. For example, the entity that owns and / or operates the software distribution platform 1605 may be a developer, a seller, and / or a licensor of software such as the example machine readable instructions 1332 of FIG. 13. The third parties may be consumers, users, retailers, OEMs, etc., who purchase and / or license the software for use and / or re-sale and / or sub-licensing. In the illustrated example, the software distribution platform 1605 includes one or more servers and one or more storage devices. The storage devices store the machine readable instructions 1332, which may correspond to the example machine readable instructions of FIGS. 9-12, as described above. The one or more servers of the example software distribution platform 1605 are in communication with an example network 1610, which may correspond to any one or more of the Internet and / or any of the example networks described above. In some examples, the one or more servers are responsive to requests to transmit the software to a requesting party as part of a commercial transaction. Payment for the delivery, sale, and / or license of the software may be handled by the one or more servers of the software distribution platform and / or by a third party payment entity. The servers enable purchasers and / or licensors to download the machine readable instructions 1332 from the software distribution platform 1605. For example, the software, which may correspond to the example machine readable instructions of FIG. 9-12, may be downloaded to the example programmable circuitry platform 1200, which is to execute the machine readable instructions 1232 to implement the vector retrieval initiator circuitry 201. In some examples, one or more servers of the software distribution platform 1605 periodically offer, transmit, and / or force updates to the software (e.g., the example machine readable instructions 1232 of FIG. 12) to ensure improvements, patches, updates, etc., are distributed and applied to the software at the end user devices. Although referred to as software above, the distributed “software” could alternatively be firmware.

[0109] “Including” and “comprising” (and all forms and tenses thereof) are used herein to be open ended terms. Thus, whenever a claim employs any form of “include” or “comprise” (e.g., comprises, includes, comprising, including, having, etc. ) as a preamble or within a claim recitation of any kind, it is to be understood that additional elements, terms, etc., may be present without falling outside the scope of the corresponding claim or recitation. As used herein, when the phrase “at least” is used as the transition term in, for example, a preamble of a claim, it is open-ended in the same manner as the term “comprising” and “including” are open ended. The term “and / or” when used, for example, in a form such as A,  B, and / or C refers to any combination or subset of A, B, C such as (1) A alone, (2) B alone, (3) C alone, (4) A with B, (5) A with C, (6) B with C, or (7) A with B and with C. As used herein in the context of describing structures, components, items, objects and / or things, the phrase “at least one of A and B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. Similarly, as used herein in the context of describing structures, components, items, objects and / or things, the phrase “at least one of A or B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. As used herein in the context of describing the performance or execution of processes, instructions, actions, activities, etc., the phrase “at least one of A and B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B. Similarly, as used herein in the context of describing the performance or execution of processes, instructions, actions, activities, etc., the phrase “at least one of A or B” is intended to refer to implementations including any of (1) at least one A, (2) at least one B, or (3) at least one A and at least one B.

[0110] As used herein, singular references (e.g., “a” , “an” , “first” , “second” , etc. ) do not exclude a plurality. The term “a” or “an” object, as used herein, refers to one or more of that object. The terms “a” (or “an” ) , “one or more” , and “at least one” are used interchangeably herein. Furthermore, although individually listed, a plurality of means, elements, or actions may be implemented by, e.g., the same entity or object. Additionally, although individual features may be included in different examples or claims, these may possibly be combined, and the inclusion in different examples or claims does not imply that a combination of features is not feasible and / or advantageous.

[0111] As used herein, the phrase “in communication, ” including variations thereof, encompasses direct communication and / or indirect communication through one or more intermediary components, and does not require direct physical (e.g., wired) communication and / or constant communication, but rather additionally includes selective communication at periodic intervals, scheduled intervals, aperiodic intervals, and / or one-time events.

[0112] As used herein, “programmable circuitry” is defined to include (i) one or more special purpose electrical circuits (e.g., an application specific circuit (ASIC) ) structured to perform specific operation (s) and including one or more semiconductor-based  logic devices (e.g., electrical hardware implemented by one or more transistors) , and / or (ii) one or more general purpose semiconductor-based electrical circuits programmable with instructions to perform specific functions (s) and / or operation (s) and including one or more semiconductor-based logic devices (e.g., electrical hardware implemented by one or more transistors) . Examples of programmable circuitry include programmable microprocessors such as Central Processor Units (CPUs) that may execute first instructions to perform one or more operations and / or functions, Field Programmable Gate Arrays (FPGAs) that may be programmed with second instructions to cause configuration and / or structuring of the FPGAs to instantiate one or more operations and / or functions corresponding to the first instructions, Graphics Processor Units (GPUs) that may execute first instructions to perform one or more operations and / or functions, Digital Signal Processors (DSPs) that may execute first instructions to perform one or more operations and / or functions, XPUs, Network Processing Units (NPUs) one or more microcontrollers that may execute first instructions to perform one or more operations and / or functions and / or integrated circuits such as Application Specific Integrated Circuits (ASICs) . For example, an XPU may be implemented by a heterogeneous computing system including multiple types of programmable circuitry (e.g., one or more FPGAs, one or more CPUs, one or more GPUs, one or more NPUs, one or more DSPs, etc., and / or any combination (s) thereof) , and orchestration technology (e.g., application programming interface (s) (API (s) ) that may assign computing task (s) to whichever one (s) of the multiple types of programmable circuitry is / are suited and available to perform the computing task (s) .

[0113] As used herein integrated circuit / circuitry is defined as one or more semiconductor packages containing one or more circuit elements such as transistors, capacitors, inductors, resistors, current paths, diodes, etc. For example an integrated circuit may be implemented as one or more of an ASIC, an FPGA, a chip, a microchip, programmable circuitry, a semiconductor substrate coupling multiple circuit elements, a system on chip (SoC) , etc.

[0114] From the foregoing, it will be appreciated that example systems, methods, apparatus, and articles of manufacture disclosed herein accelerate vector retrieval in artificial intelligence workloads associated with LLM-based system applications. In examples disclosed herein, database vectors are quantized from single-precision floating-point format (FP32) to an 8-bit signed integer (INT8) format save up to 75%of memory bandwidth.  Methods and apparatus disclosed herein allow an IVFFlat algorithm to be used with only a quarter of theoretical memory bandwidth occupation while maintaining a high level of accuracy. For example, database vectors are quantized and used to calculate distances with input vectors while performing a query search based on an input query point, decreasing memory bandwidth consumption as compared to the use of floating-point vectors. For example, a first stage is used to quantize each input vector using offline vector database quantization and a second stage is used to search the INT8 vectors and refine the results using FP32 vectors as needed for optimized system performance and accuracy. Disclosed systems, methods, apparatus, and articles of manufacture are accordingly directed to one or more improvement (s) in the operation of a machine such as a computer or other electronic and / or mechanical device.

[0115] Example methods, apparatus, systems, and articles of manufacture for accelerating vector retrieval in artificial intelligence workloads are disclosed herein. Further examples and combinations thereof include the following:

[0116] Example 1 includes an apparatus, comprising interface circuitry, machine readable instructions, and programmable circuitry to at least one of execute or instantiate the machine readable instructions to quantize an input vector having a first precision to generate a quantized vector having a second precision that is lower than the first precision, index the quantized vector using vector clustering, and perform a vector search query for an input query using the quantized vector, the vector search utilizing enhanced heap sorting.

[0117] Example 2 includes the apparatus of example 1, wherein the programmable circuitry is to generate an indexing file including one or more cluster centroids and the quantized vector associated with at least one of the cluster centroids.

[0118] Example 3 includes the apparatus of example 2, wherein the programmable circuitry is to perform the vector search for the input query by identifying nearest probe-based clusters based on Euclidean distances between the input query and the cluster centroids, the distances having the first precision.

[0119] Example 4 includes the apparatus of example 1, wherein the first precision is a thirty-two bit floating point (FP32) and the second precision is an eight-bit integer (INT8) .

[0120] Example 5 includes the apparatus of example 1, wherein the  programmable circuitry is to perform the enhanced heap sorting by determining final nearest neighbors of the input query.

[0121] Example 6 includes the apparatus of example 1, wherein the programmable circuitry is to select a tuple having a lower bound that meets a threshold.

[0122] Example 7 includes the apparatus of example 6, wherein the threshold is met when the lower bound of the tuple is greater than or equal to the threshold associated with a maximum heap.

[0123] Example 8 includes a method comprising quantizing an input vector having a first precision to generate a quantized vector having a second precision that is lower than the first precision, indexing, by at least one processor circuit programmed by at least one instruction, the quantized vector using vector clustering, and performing, by one or more of the at least one processor circuit, a vector search query for an input query using the quantized vector, the vector search utilizing enhanced heap sorting.

[0124] Example 9 includes the method of example 8, further including generating an indexing file including one or more cluster centroids and the quantized vector associated with at least one of the cluster centroids.

[0125] Example 10 includes the method of example 9, further including performing the vector search for the input query by identifying nearest probe-based clusters based on Euclidean distances between the input query and the cluster centroids, the distances having the first precision.

[0126] Example 11 includes the method of example 8, wherein the first precision is a thirty-two bit floating point (FP32) and the second precision is an eight-bit integer (INT8) .

[0127] Example 12 includes the method of example 8, further including performing the enhanced heap sorting by determining final nearest neighbors of the input query.

[0128] Example 13 includes the method of example 8, further including selecting a tuple having a lower bound that meets a threshold.

[0129] Example 14 includes the method of example 13, wherein the threshold is met when the lower bound of the tuple is greater than or equal to the threshold associated with a maximum heap.

[0130] Example 15 includes a non-transitory machine readable storage  medium comprising instructions to cause programmable circuitry to at least quantize an input vector having a first precision to generate a quantized vector having a second precision that is lower than the first precision, index the quantized vector using vector clustering, and perform a vector search query for an input query using the quantized vector, the vector search utilizing enhanced heap sorting.

[0131] Example 16 includes the non-transitory machine readable storage medium of example 15, wherein the programmable circuitry is to generate an indexing file including one or more cluster centroids and the quantized vector associated with at least one of the cluster centroids.

[0132] Example 17 includes the non-transitory machine readable storage medium as defined in example 16, wherein the programmable circuitry is to perform the vector search for the input query by identifying nearest probe-based clusters based on Euclidean distances between the input query and the cluster centroids, the distances having the first precision.

[0133] Example 18 includes the non-transitory machine readable storage medium as defined in example 15, wherein the first precision is a thirty-two bit floating point (FP32) and the second precision is an eight-bit integer (INT8) .

[0134] Example 19 includes the non-transitory machine readable storage medium as defined in example 15, wherein the programmable circuitry is to select a tuple having a lower bound that meets a threshold.

[0135] Example 20 includes the non-transitory machine readable storage medium as defined in example 19, wherein the threshold is met when the lower bound of the tuple is greater than or equal to the threshold associated with a maximum heap.

[0136] The following claims are hereby incorporated into this Detailed Description by this reference. Although certain example systems, methods, apparatus, and articles of manufacture have been disclosed herein, the scope of coverage of this patent is not limited thereto. On the contrary, this patent covers all systems, methods, apparatus, and articles of manufacture fairly falling within the scope of the claims of this patent.

Claims

1.An apparatus, comprising:interface circuitry;machine readable instructions; andprogrammable circuitry to at least one of execute or instantiate the machine readable instructions to:quantize an input vector having a first precision to generate a quantized vector having a second precision that is lower than the first precision;index the quantized vector using vector clustering; andperform a vector search query for an input query using the quantized vector, the vector search utilizing enhanced heap sorting.2.The apparatus of claim 1, wherein the programmable circuitry is to generate an indexing file including one or more cluster centroids and the quantized vector associated with at least one of the cluster centroids.3.The apparatus of claim 2, wherein the programmable circuitry is to perform the vector search for the input query by identifying nearest probe-based clusters based on Euclidean distances between the input query and the cluster centroids, the distances having the first precision.4.The apparatus of claim 1, wherein the first precision is a thirty-two bit floating point (FP32) and the second precision is an eight-bit integer (INT8) .5.The apparatus of claim 1, wherein the programmable circuitry is to perform the enhanced heap sorting by determining final nearest neighbors of the input query.6.The apparatus of claim 1, wherein the programmable circuitry is to select a tuple having a lower bound that meets a threshold.7.The apparatus of claim 6, wherein the threshold is met when the lower bound of the tuple is greater than or equal to the threshold associated with a maximum heap.8.A method comprising:quantizing an input vector having a first precision to generate a quantized vector having a second precision that is lower than the first precision;indexing, by at least one processor circuit programmed by at least one instruction, the quantized vector using vector clustering; andperforming, by one or more of the at least one processor circuit, a vector search query for an input query using the quantized vector, the vector search utilizing enhanced heap sorting.9.The method of claim 8, further including generating an indexing file including one or more cluster centroids and the quantized vector associated with at least one of the cluster centroids.10.The method of claim 9, further including performing the vector search for the input query by identifying nearest probe-based clusters based on Euclidean distances between the input query and the cluster centroids, the distances having the first precision.11.The method of claim 8, wherein the first precision is a thirty-two bit floating point (FP32) and the second precision is an eight-bit integer (INT8) .12.The method of claim 8, further including performing the enhanced heap sorting by determining final nearest neighbors of the input query.13.The method of claim 8, further including selecting a tuple having a lower bound that meets a threshold.14.The method of claim 13, wherein the threshold is met when the lower bound of the tuple is greater than or equal to the threshold associated with a maximum heap.15.A non-transitory machine readable storage medium comprising instructions to cause programmable circuitry to at least:quantize an input vector having a first precision to generate a quantized vector having a second precision that is lower than the first precision;index the quantized vector using vector clustering; andperform a vector search query for an input query using the quantized vector, the vector search utilizing enhanced heap sorting.16.The non-transitory machine readable storage medium of claim 15, wherein the programmable circuitry is to generate an indexing file including one or more cluster centroids and the quantized vector associated with at least one of the cluster centroids.17.The non-transitory machine readable storage medium as defined in claim 16, wherein the programmable circuitry is to perform the vector search for the input query by identifying nearest probe-based clusters based on Euclidean distances between the input query and the cluster centroids, the distances having the first precision.18.The non-transitory machine readable storage medium as defined in claim 15, wherein the first precision is a thirty-two bit floating point (FP32) and the second precision is an eight-bit integer (INT8) .19.The non-transitory machine readable storage medium as defined in claim 15, wherein the programmable circuitry is to select a tuple having a lower bound that meets a threshold.20.The non-transitory machine readable storage medium as defined in claim 19, wherein the threshold is met when the lower bound of the tuple is greater than or equal to the threshold associated with a maximum heap.

Citation Information

Patent Citations

  • Mixed vector quantization-based nearest neighbor search method

    CN107193938A

  • Vector matching method and device for text travel question-answering system and storage medium

    CN116204613A

  • Quantization-based fast inner product search

    US10255323B1

  • Method for encoding based on mixture of vector quantization and nearest neighbor search using thereof

    US20200226137A1

Cited By

  • Vector search using multiple types of embeddings

    US20260236537A1