Electronic system and method for embedded vector retrieval
The storage location of the document embedding vector is managed through the embedded management unit and the cache-consistent interconnected storage device, which solves the problem of large memory and improves storage efficiency and energy saving.
Patent Information
- Application Number
- CN202410364353.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-26
- Filing Date
- 2024-03-28
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, the amount of memory required to store and process document embedding vectors is too large, resulting in a significant increase in storage requirements and making it difficult to effectively reduce the usage of main memory.
The Embedding Management Unit (EMU) is used to manage the storage and location of document embedding vectors, and the cache-coherent interconnected storage device between the storage device and the local accelerator is used to dynamically store the document embedding vector in the most appropriate storage location to reduce main memory load.
By optimizing the storage location of document embedding vectors, the usage of main memory is reduced, the system storage requirements are reduced, and the efficiency and energy saving of the information retrieval system are improved.
Smart Images

Figure CN118733792A_ABST
Abstract
Description
Technical Field
[0001] The disclosure relates generally to memory and storage devices, and more particularly to reducing the amount of memory required for query processing. Background Art
[0002] The neural information retrieval system operates by preprocessing document information using a language model to generate document embedding vectors, which can be stored in main memory during query processing. Queries once received can be similarly encoded to produce query embedding vectors. The query embedding vectors can be compared to the document embedding vectors to determine which document embedding vectors are closest to the query embedding vector, which determines which documents to return to the host.
[0003] But embedding vectors can require a lot of memory to store. For example, a 3 gigabyte (GB) text document can generate about 150GB of document embedding vectors, depending on the language model. Multiply this space requirement by millions or billions of documents, and the amount of main memory required to store all document embedding vectors becomes a significant problem.
[0004] There remains a need to support information retrieval systems having reduced amounts of main memory. Summary of the invention
[0005] The disclosed embodiments include an embedding management unit (EMU). The EMU can track whether a document embedding vector is stored on a storage device, in a memory, or in a local memory of a local accelerator. The EMU can also manage moving document embedding vectors between storage devices, memory, and local memory of a local accelerator.
[0006] According to one aspect of the disclosure, a system is provided, comprising: a processor, the processor comprising a local memory; a memory connected to the processor; a cache coherent interconnect storage device connected to the processor; and an embedding management unit (EMU) configured to manage storage of document embedding vectors in the local memory, the memory, or the cache coherent interconnect storage device.
[0007] According to one aspect of the disclosure, a method is provided, the method comprising: identifying a query embedding vector at a processor; locating a document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of the processor using an embedding management unit (EMU); processing the query embedding vector and the document embedding vector to produce a result; and sending a document based at least in part on the result.
[0008] According to one aspect of the disclosure, an article is provided, the article comprising a non-transitory storage medium having instructions stored thereon, which, when executed by a machine, cause: identifying a query embedding vector at a processor; locating a document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of the processor using an embedding management unit (EMU); processing the query embedding vector and the document embedding vector to produce a result; and sending a document based at least in part on the result. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described below are examples of how the disclosed embodiments may be implemented and are not intended to limit the disclosed embodiments. The various embodiments disclosed may include elements not shown in a particular drawing and / or may omit elements shown in a particular drawing. The drawings are intended to provide illustration and may not be to scale.
[0010] Figure 1 A machine including a storage accelerator for performing a similarity search using document embedding vectors stored on a storage device according to a disclosed embodiment is shown.
[0011] Figure 2 Showing the embodiment according to the disclosure Figure 1 Details of the machine.
[0012] Figure 3 A method for generating a method for communicating with Figure 1 Local accelerator or Figure 1 The storage accelerator is used together with the document embedding vectors for document processing.
[0013] Figure 4 The embodiment disclosed in the present invention is shown by Figure 1 Use of storage accelerators Figure 3 Processing of queries based on document embedding vectors.
[0014] Figure 5A The disclosed embodiment includes Figure 1 storage device and Figure 1 A first example implementation of a computational storage unit of a storage accelerator.
[0015] Figure 5B The disclosed embodiment includes Figure 1 storage device and Figure 1 A second example implementation of a computational storage unit of a storage accelerator.
[0016] Figure 5C The disclosed embodiment includes Figure 1 storage device and Figure 1A third example implementation of a computational storage unit of a storage accelerator.
[0017] Figure 5D The disclosed embodiment includes Figure 1 storage device and Figure 1 A fourth example implementation of a computational storage unit of a storage accelerator.
[0018] Figure 6 Showing the embodiment according to the disclosure Figure 1 Details of the storage device.
[0019] Figure 7 Showing the embodiment according to the disclosure Figure 1 Memory, Figure 3 The document embedding vectors of are ejected to become Figure 3 To make room for additional document embedding vectors.
[0020] Figure 8 Showing management according to the disclosed embodiment Figure 3 The document embedding vector is Figure 1 storage device, Figure 1 Memory and Figure 1 The local accelerator is stored in an embedded management unit (EMU) in the local memory of the local accelerator.
[0021] Fig. 9 Showing the embodiment according to the disclosure Figure 8 local storage, Figure 1 Memory and Figure 1 The relationship between the storage devices.
[0022] Fig.10 The invention is shown in accordance with the disclosed embodiment. Figure 1 Storage accelerator usage Figure 3 The document embedding vector is used to Figure 4 A flowchart of an example process for processing a query.
[0023] Fig.11 According to the disclosed embodiment, a method for Figure 4 Query generation Figure 4 Flowchart of an example process for querying embedding vectors of .
[0024] Fig.12 The invention is shown in accordance with the disclosed embodiment. Figure 1 The storage accelerator returns the document as Figure 4 A flowchart of an example process for obtaining the results of a query.
[0025] Fig.13 Showing the embodiment according to the disclosure Figure 1 The local accelerator compares its results with Figure 1 A flowchart of an example process for combining results of a storage accelerator.
[0026] Fig.14 The invention is shown in accordance with the disclosed embodiment. Figure 1 The local accelerator copies the document embedding vector to Figure 1 A flowchart of an example process in a memory of FIG.
[0027] Fig.15 The invention is shown in accordance with the disclosed embodiment. Figure 8 EMU manages storage Figure 3 Flowchart of an example process for finding the location of document embedding vectors.
[0028] Fig.16 The invention is shown in accordance with the disclosed embodiment. Figure 1 Storage accelerator usage Figure 3 The document embedding vector is used to Figure 4 A flowchart of an example process for processing a query.
[0029] Fig.17 The invention is shown in accordance with the disclosed embodiment. Figure 1 The storage device returns the Figure 1 The processor requested Figure 3 A flowchart of an example process for the documentation.
[0030] Fig.18 The invention is shown in accordance with the disclosed embodiment. Figure 1 The storage device will Figure 3 The document embedding vector is returned to Figure 1 A flowchart of an example process for a processor of FIG.
[0031] Fig.19 The invention is shown in accordance with the disclosed embodiment. Figure 1 The local accelerator is based on Figure 8 EMU usage Figure 3 The document embedding vector is used to Figure 4 A flowchart of an example process for processing a query.
[0032] Fig. 20 The invention is shown in accordance with the disclosed embodiment. Figure 8 EMU Prefetch Figure 3 Flowchart of an example process for generating document embedding vectors. DETAILED DESCRIPTION
[0033] Reference will now be made in detail to the disclosed embodiments, examples of which are shown in the accompanying drawings. In the following detailed description, many specific details are set forth to achieve a thorough understanding of the disclosure. However, it should be understood that one of ordinary skill in the art may practice disclosure without these specific details. In other cases, known methods, processes, components, circuits, and networks have not been described in detail to avoid unnecessarily obscuring aspects of the embodiments.
[0034] It will be understood that although the terms first, second, etc. may be used to describe various elements herein, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, without departing from the scope of the disclosure, a first module may be referred to as a second module, and similarly, a second module may be referred to as a first module.
[0035] The terms used in the disclosed description are herein only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in the disclosed description and the appended claims, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. It will also be understood that the term "and / or" as used herein represents and includes any and all possible combinations of one or more of the relevant listed items. It will also be understood that when the terms "include" and / or "comprising" are used in this specification, it is indicated that there are stated features, wholes, steps, operations, elements and / or components, but it is not excluded that there are or add one or more other features, wholes, steps, operations, elements, components and / or their groups. The components and features of the accompanying drawings do not have to be drawn to scale.
[0036] Information retrieval systems can be an important part of business operations. Each document stored by the information retrieval system can be processed to generate a document embedding vector. These document embedding vectors can be generated in advance (that is, the documents can be pre-processed), which can reduce the burden on the host processor when processing queries. The document embedding vectors can then be stored in the main memory of the information retrieval system to speed up access to the document embedding vectors (which leads to faster identification and retrieval of related documents).
[0037] When an information retrieval system receives a query, the query may also be processed to generate a query embedding vector. Since the query is not known in advance, the query embedding vector may be generated in real time from the query as it is received. The query embedding vector may then be compared to the document embedding vector to determine which documents are closest to the query and should therefore be returned in response to the query.
[0038] There are various different ways to compare the query embedding vector to the document embedding vector. One method is to use the K-nearest neighbor (KNN) algorithm to identify the k documents whose embedding vectors are closest to the query embedding vector. Another method is to use matrix multiplication or dot product calculation to determine the similarity score between the query embedding vector and the document embedding vector.
[0039] But document embedding vectors are typically quite large. For example, a 3-gigabyte (GB) document, once processed, can produce a 150GB document embedding vector: a 50-fold increase in storage requirements. Multiply this space requirement by thousands or millions of documents, and the amount of main memory required to store document embedding vectors can become significant.
[0040] To help reduce main memory requirements, document embedding vectors can be compressed and can be processed in compressed form. But even with compression, the amount of main memory required to store document embedding vectors can still be significant.
[0041] Some disclosed embodiments may solve the problem by using a storage device, such as a solid state drive (SSD), to store some, most, or all of the document embedding vectors. The document embedding vectors may be transferred from the SSD to the main memory as needed, and the main memory is effectively used as a cache of the document embedding vectors. When a query is received, the system may determine whether the relevant document embedding vector is currently loaded in the main memory. If the relevant document embedding vector is currently loaded in the main memory, the query may be processed as usual based on the document embedding vector in the main memory using a host processor or accelerator (e.g., a graphics processing unit (GPU)) for processing queries. If the relevant document embedding vector is not currently loaded in the main memory, an accelerator coupled to the SSD may process the query based on the document embedding vector stored on the SSD. If the relevant document embedding vector is stored partially in the main memory and partially on the SSD, two paths may be used, after which the results are combined to rank the documents and retrieve the most relevant documents. Note that in such disclosed embodiments, there may be two different accelerators: one that accesses the document embedding vector from the main memory, and one that accesses the document embedding vector from the SSD. The two accelerators may also have their own local memory, and they may each use their own local memory when processing the query.
[0042] The accelerator in question may be implemented as part of a storage device, may be integrated into an SSD (but implemented as a separate element), or may be completely separate from the SSD but coupled to the SSD to access data stored on the SSD. For example, the accelerator may be implemented as a dedicated unit for performing query processing, or it may be a more general accelerator that is currently supporting query processing: for example, a computational storage unit.
[0043] Any desired caching algorithm may be used to manage which document embedding vectors are stored in main memory. For example, a least frequently used (LFU), least recently used (LRU), most recently used (MRU), or most frequently used (MFU) caching algorithm may be used to move document embedding vectors in and out of main memory. Note that since document embedding vectors should only change when the underlying document changes, removing a document embedding vector from main memory should not involve writing the document embedding vector back to the SSD: the document embedding vector may be stored on the SSD for persistent storage. In the event that a document embedding vector is stored in main memory but is not currently stored on the SSD, the document embedding vector may be copied from main memory to the SSD before being evicted from memory. Thus, the document embedding vector to be removed from main memory may simply be deleted, and a new document embedding vector may be loaded from the SSD into main memory.
[0044] In other disclosed embodiments, the cache coherent interconnect storage device may be a fast link that supports computing SSDs that support the CXL protocol. (CXL is a registered trademark of Compute Express Link Alliance, Inc. in the United States and other countries.) An SSD that supports the CXL protocol can be accessed as a block device or a byte device. That is, the SSD can appear as both a standard storage device and an extension of main memory. In some disclosed embodiments, data can be read from or written to such an SSD using both storage device commands and memory commands.
[0045] In such disclosed embodiments, there may be only one accelerator for processing queries, which may have its own local memory (i.e., accelerator memory) for processing queries. (Note that since the SSD can be viewed as an extension of the main memory, the accelerator can be effectively combined with both the main memory and the SSD.) Between the accelerator memory, the main memory, and the SSD, there is an effective multi-level cache for document embedding vectors. An embedding management unit (EMU) can be used to track where a particular document embedding vector is currently stored. When the query embedding vector is to be compared to the document embedding vector, the relevant document embedding vectors can be identified, and the EMU can be used to determine whether those document embedding vectors (i.e., the relevant document embedding vectors) are currently loaded into the accelerator memory. If the relevant document embedding vector is not currently loaded into the accelerator memory, the EMU can transfer the relevant document embedding vector to the accelerator memory so that the accelerator can process the query in the most efficient way possible.
[0046] If transferring some document embedding vectors to accelerator memory requires first evicting some other document embedding vectors, then those evicted document embedding vectors can be transferred to main memory. Similarly, if transferring document embedding vectors to main memory requires evicting other document embedding vectors, then those document embedding vectors can be "transferred" to the SSD. (Again, since document embedding vectors should not change unless the underlying document changes, document embedding vectors should always be stored on the SSD, and therefore document embedding vectors should not need to be written back to the SSD.)
[0047] The EMU can also perform pre-fetching of document embedding vectors that are expected to be used in the near future. Such document embedding vectors can be pre-fetched from the SSD into the main memory to accelerate their transfer to the accelerator memory when they are expected to be needed.
[0048] Figure 1 A machine including a storage accelerator for performing a similarity search using document embedding vectors stored on a storage device according to a disclosed embodiment is shown. Figure 1 In the present invention, a machine 105, which may be referred to as a host or system, may include a processor 110, a memory 115, and a storage device 120. The processor 110 may be any kind of processor. The processor 110 may also be referred to as a host processor. (For ease of illustration, the processor 110 is shown external to the machine along with other components discussed below: the disclosed embodiments may include these components within the machine.) Although Figure 1 A single processor 110 is shown, but the machine 105 may include any number of processors, each of which may be a single-core processor or a multi-core processor, each of which may implement a reduced instruction set computer (RISC) architecture or a complex instruction set computer (CISC) architecture (as well as other possibilities), and which may be mixed in any desired combination.
[0049] The processor 110 may be coupled to a memory 115. The memory 115 may be any kind of memory, such as a dynamic random access memory (DRAM), a static random access memory (SRAM), a permanent random access memory (PRAM), a ferroelectric random access memory (FRAM), or a non-volatile random access memory (NVRAM) (such as a magnetoresistive random access memory (MRAM), flash memory, etc.). The memory 115 may be a volatile memory or a non-volatile memory as desired. The memory 115 may also be any desired combination of different memory types and may be managed by a memory controller 125. The memory 115 may be used to store what may be referred to as “short-term” data: that is, data that is not expected to be stored for a long time. Examples of short-term data may include temporary files, data being used locally by an application (which may have been copied from other storage locations), and the like.
[0050] The processor 110 and the memory 115 may also support an operating system under which various applications may be running. These applications may issue requests (which may also be referred to as commands) to read data from or write data to any of the memories 115 .
[0051] Storage device 120 may be used to store what may be referred to as “long-term” data: that is, data that is desired to be stored for a longer period of time, or data that does not need to be stored in memory 115. Storage device 120 may be accessed using device driver 130. Although Figure 1 One storage device 120 is shown, but any number (one or more) of storage devices may be present in machine 105 .
[0052] The disclosed embodiments may include any desired mechanism for communicating with the storage device 120. For example, the storage device 120 may be connected to one or more buses (such as a Peripheral Component Interconnect Express (PCIe) bus), or the storage device 120 may include an Ethernet interface or some other network interface. Other potential interfaces and / or protocols to the storage device 120 may include Non-Volatile Memory Express (NVMe), NVMe over a Network (NVMe-oF), Remote Direct Memory Access (RDMA), Transmission Control Protocol / Internet Protocol (TCP / IP), Universal Flash Storage (UFS), Embedded Multimedia Card (eMMC), InfiniBand, Serial Attached Small Computer System Interface (SCSI) (SAS), Internet SCSI (iSCSI), Serial AT Attachment (SATA), and cache coherent interconnect protocols (such as the Compute Express Link (CXL) protocol) (among other possibilities).
[0053] Although Figure 1The generic term "storage device" is used, but the disclosed embodiments may include any storage device format that may benefit from the use of a computational storage unit, examples of which may include hard disk drives and solid-state drives (SSDs). Any reference to "SSD" below should be understood to include such other embodiments disclosed.
[0054] For the purposes of this document, a distinction is made between memory 115 and storage 120. This distinction can be understood as being based on the type of commands that are typically used to access data from a component. For example, memory 115 is typically accessed using a load command or a store command, while storage 120 is typically accessed using a read command and a write command. Memory 115 is also typically accessed by an operating system, while storage 120 is typically accessed by a file system. (As discussed below, cache coherent interconnect storage devices are intended to be classified as storage devices despite the fact that they can be accessed using load commands and store commands as well as read commands and write commands.)
[0055] Alternatively, the distinction between memory 115 and storage 120 may be understood as being based on the persistence of data in a component. Memory 115 generally does not guarantee the persistence of data in the absence of power being provided to the component, whereas storage 120 may guarantee that data will persist even in the absence of power being provided. If such a distinction is made between memory 115 and storage 120, memory 115 may not include a non-volatile storage form, or a non-volatile storage form may erase data when power is restored (so that the non-volatile storage form appears empty just as a volatile storage form would appear when power is restored).
[0056] Alternatively, the distinction may be understood as being based on the speed of access to data stored by the respective components, with faster components being considered memory 115 and slower components being considered storage 120. However, using speed to distinguish between memory 115 and storage 120 is not ideal, and although a solid state drive (SSD) is generally faster than a hard disk drive, it would still be considered storage 120 rather than memory 115.
[0057] The machine 105 may also include accelerators such as a local accelerator 135 and a storage accelerator 140. The local accelerator 135 may use data stored in the memory 115 to perform processing of the query, while the storage accelerator 140 may use data stored on the storage device 120 to perform similar functions. Figure 3 to Figure 4 The operation of the local accelerator 135 and the storage accelerator 140 is discussed further.
[0058] The labels "local accelerator" and "storage accelerator" are used only to distinguish whether the accelerator in question operates in conjunction with memory 115 or storage 120. In practice, the functions performed by accelerators 135 and 140 may be similar or even identical in part or in whole. Any reference to "accelerator" without the qualifiers "local" or "storage" may be understood to apply to accelerator 135 or 140, or may be uniquely identified from the context.
[0059] In addition, although Figure 1 The local accelerator 135 is shown as being separate from the processor 110, but in some disclosed embodiments, the processor 110 may perform the functions attributed to the local accelerator 135. In other words, the accelerator 135 and the processor 110 may be the same component.
[0060] Figure 2 Showing the embodiment according to the disclosure Figure 1 Details of the machine. Figure 2 In the embodiment of the present invention, the machine 105 generally includes one or more processors 110, which may include a memory controller 125 and a clock 205, which may be used to coordinate the operation of the components of the machine. The processor 110 may also be coupled to a memory 115, which may include, by way of example, a random access memory (RAM), a read-only memory (ROM), or other state preservation medium. The processor 110 may also be coupled to a storage device 120 and a network connector 210, which may be, for example, an Ethernet connector or a wireless connector. The processor 110 may also be connected to a bus 215, to which a user interface 220 and an input / output (I / O) interface port that may be managed using an I / O engine 225, as well as other components, may be attached.
[0061] Figure 3 A method for generating a method for communicating with Figure 1 Local accelerator 135 or Figure 1 The storage accelerator 140 is used together with the document embedding vector for document processing. Figure 3 In the example of FIG. 3 , a document 305 may be processed using a neural language model 310 to generate a document embedding vector (DEV) 315. The document 305 may be in any desired form: for example, a text document, an image, other data, a database, etc. The document 305 may be stored in any desired manner: for example, as an entry in a database or as a separate file. In general, the document 305 may be stored in a storage device (such as, Figure 1 The neural language model 310 may be any desired neural language model without limitation.
[0062] The document embedding vector 315 can be considered as an n-dimensional vector, where n can be as small or large as desired (e.g., n can be a positive integer). That is, the document embedding vector 315 can be described as a vector comprising n coordinates: for example, in, can represent the document embedding vector 315, and dev 1 、dev 2 、dev 3 ……dev n may represent n coordinates corresponding to a document embedding vector 315. Each document may have its own document embedding vector, which may be generated using any desired model, such as a neural language model 310. This mapping from documents 305 to document embedding vectors 315 (via the neural language model 310) may in fact form a representation of each document 305 that may be mathematically compared to other documents 305. Thus, no matter how similar or different two documents 305 may appear to a user, their corresponding document embedding vectors 315 may provide a mechanism for mathematically comparing how similar or different the two documents 305 actually are: the more similar two documents 305 are, the closer their document embedding vectors 315 should be. For example, the distance Dist between two document embedding vectors 315 may be calculated. For example, if represents a document embedding vector 315 of a document 305, and If the document embedding vector 315 represents another document 305, the distance between the two document embedding vectors 315 can be calculated. For example, the Euclidean distance between the two document embedding vectors 315 can be calculated as Or the taxi distance between two document embedding vectors 315 can be calculated as Dist = |dev 21 -dev 11 |+|dev 22 -dev 12 |+|dev 23 -dev 13 |+…+|dev 2n -dev 1n |. Other distance functions may also be used. Thus, depending on how well the neural language model 310 operates to generate document embedding vectors 315 from the documents 305, an accurate comparison between the document embedding vectors 315 may be performed.
[0063] Once generated, document embedding vector 315 may be stored on storage device 120. Note that storing document embedding vector 315 on storage device 120 does not mean that the document embedding vector may not be stored anywhere else. For example, document embedding vector 315 may also be stored in Figure 1115 for use by the local accelerator 135. However, because the storage device 120 can provide persistent storage (and Figure 1 The memory 115 may be volatile, and if power is interrupted, the document embedding vector 315 may be lost), so storing the document embedding vector 315 on the storage device 120 may avoid the need to regenerate the document embedding vector 315 (which may take a significant amount of time).
[0064] Notice, Figure 3 The processing described in the above may be performed as preprocessing. That is, the neural language model 310 may be performed as Figure 1 The document 305 is processed to generate a document embedding vector 315 before the machine 105 is ready to receive a query. Since the document embedding vector 315 can be expected to remain unchanged unless the document 305 itself changes, the document embedding vector 315 can be substantially fixed. If new documents 305 are added to the system, the neural language model 310 can generate new document embedding vectors 315 for those new documents 305, and the new document embedding vectors 315 can be added to the corpus of document embedding vectors 315. Therefore, instead of generating document embedding vectors 315 on demand, document embedding vectors 315 can be generated in advance and available when needed.
[0065] However, document embedding vectors 315 may be typically larger than documents 305 (possibly much larger). For example, a 3-gigabyte (GB) text document may result in a 150-GB document embedding vector. Therefore, depending on the number of documents 305, all document embedding vectors 315 may be stored in Figure 1 The amount of space required in the memory 115 of the memory 115 can be large. Since there is generally an inverse relationship between the speed of a memory component and its cost (the faster the memory component, the more expensive the memory component per memory cell), providing Figure 1 Having enough memory 115 to store all document embedding vectors 315 may incur significant overhead.
[0066] although Figure 1 The memory 115 can access data faster, but the storage device 120 is usually more efficient per storage unit than Figure 1 The memory 115 is cheaper. Therefore, it is desirable to use Figure 1 The memory 115 and the storage device 120 are used to store the document embedding vector 315: for example, the most frequently or more frequently accessed document embedding vector 315 is stored in Figure 1 The document embedding vectors 315 that are less frequently accessed may be stored in the memory 115 , while the document embedding vectors 315 that are less frequently accessed may be stored on the storage device 120 .
[0067] In some disclosed embodiments, the document embedding vectors 315 (or a subset of the document embedding vectors 315) may be preloaded into Figure 1 The subset of document embedding vectors 315 may be selected in any desired manner: for example, based on which document embedding vectors 315 were most frequently used in some previous queries. In other disclosed embodiments, no document embedding vectors 315 may be preloaded into memory 115. Figure 1 115, and based on the subsequent submission to Figure 1 The query of machine 105 is to complete "select which document embedding vectors to add to Figure 1 Memory 115".
[0068] Figure 4 The following is shown according to the disclosed embodiment. Figure 1 The storage accelerator 140 uses Figure 3 The query processing of the document embedding vector 315 is performed. Figure 4 middle, Figure 1 The local accelerator 135 of the system may receive a query 405. The query 405 may be any type of query: for example, a text query, a binary query, or a structured query language (SQL) query, among other possibilities. The query 405 may be received from a machine or host. The machine or host may be Figure 1 The machine 105 may be a host machine or another machine connected to the machine 105 in some manner: for example, through a network such as a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), or a World Wide Web such as the Internet.
[0069] The query 405 may be processed by the neural language model 310 to generate a query embedding vector (QEV) 410. Note that since the query 405 may be a query from a user or an application, the exact content of the query 405 may not be known until the query 405 is received. Therefore, the neural language model 310 may operate in real time to process the query 405 and generate the query embedding vector 410.
[0070] As mentioned above Figure 3 As discussed, Figure 3 The document embedding vectors 315 of 410 are compared to each other to determine how similar they are. Figure 3 The document embedding vector 315 of is in the same n-dimensional space, so the query embedding vector 410 can be similarly compared to Figure 3 The document embedding vector 315 is compared with the query embedding vector 410. This comparison can identify the closest Figure 3 305: That is, the document that best matches the query 405 Figure 3 Document 305.
[0071] But considering that there may be Figure 3There are thousands of documents 305, so the query embedding vector 410 is combined with Figure 3 Comparing all document embedding vectors 315 may require a large number of comparisons. To reduce the number of comparisons required, Figure 3 The document embedding vectors 315 of can be grouped into clusters. These clusters can be defined in any desired way: for example, Figure 3 All document embedding vectors 315 within a certain maximum distance from the "center" vector can be grouped into clusters (other clusters are defined similarly). The query embedding vector 410 can then be compared to the "center" vector of each cluster to determine which cluster contains the document embedding vector 315 corresponding to the query embedding vector 410. According to an embodiment, these "center" vectors can be stored in Figure 1 Memory 115 or Figure 1 The document embedding vector 315 corresponding to the query embedding vector 410 may be stored in the storage device 120 (or transferred / evicted between the two as needed). A K-nearest neighbor search 415 may be performed to determine which cluster should contain the document embedding vector 315 corresponding to the query embedding vector 410. However, the disclosed embodiments may use other methods to determine which cluster the document embedding vector 315 corresponding to the query embedding vector 410 should belong to.
[0072] Once the cluster containing the document embedding vector 315 corresponding to the query embedding vector 410 has been determined, the list 420 of document embedding vectors belonging to the cluster (i.e., the list of document embedding vectors to be retrieved) can be determined. Then, as shown in block 425, Figure 1 The processor 110 (or, depending on the implementation, Figure 1 The local accelerator 135 of the embodiment may determine the query embedding vector 410 to be compared with. Figure 3 The document embedding vector 315 is stored in Figure 1 The memory 115 is still Figure 1 in the storage device 120. If Figure 3 The document embedding vector 315 is stored in Figure 1 In the memory 115, Figure 3 The local accelerator 135 can embed the query vector 410 with Figure 3 The document embedding vector 315 is compared to perform a similarity search 430. The similarity search 430 can be, for example, as described above with reference to Figure 3 Alternatively, the similarity search 430 may involve a matrix multiplication or dot product calculation involving the query embedding vector 410 and Figure 3 document embedding vector 315. Regardless of the form that the similarity search 430 may take, Figure 1 The local accelerator 135 can then produce the result 435.
[0073] As an example, cosine similarity can be used to determine how similar two vectors are. Since the cosine of an angle can range from -1 (cosine of 180°) to 1 (cosine of 0°), a value of 1 (or a value close to 1) can indicate that the two vectors are similar, a value of -1 (or a value close to -1) can indicate that the two vectors are opposite to each other, and a value of 0 (or a value close to 0) can indicate that the two vectors are orthogonal. For example, the formula To calculate the vector and The cosine similarity of C It can represent cosine similarity.
[0074] if Figure 3 The document embedding vector 315 is not stored in Figure 1 In the memory 115, Figure 1 The local accelerator 135 can provide the query embedding vector 410 to Figure 1 The storage accelerator 140. Then, Figure 1 The storage accelerator 140 can use the storage Figure 1 The storage device 120 Figure 3 The document embedding vector 315 is used to perform a similarity search 440. The similarity search 440 can be similar to the similarity search 430. Figure 1 The storage accelerator 140 may generate a result 445 .
[0075] Although in some cases, Figure 3 The relevant document embedding vector 315 may only be stored in Figure 1 or Figure 1 storage device 120, but it is expected that Figure 3 Some relevant document embedding vectors 315 may be stored in Figure 1 115, and some may be stored on the storage device 120. In this case, Figure 1 The local accelerator 135 can store Figure 1 The memory 115 Figure 3 The relevant document embedding vector 315 is processed, and Figure 1 The storage accelerator 140 can store Figure 1 The storage device 120 Figure 3 The related document embedding vector 315 is processed to produce results 435 and 445 respectively based on the same query embedding vector 410.
[0076] As shown in document retrieval 450, once results 435 and / or 445 have been obtained, Figure 1 The local accelerator 135 and / or Figure 1If the storage accelerator 140 generates the result 435 and / or 445, the result 435 and / or 445 can be used to retrieve the appropriate document. Figure 3 All relevant document embedding vectors 315 are Figure 1 In the memory 115, Figure 1 The storage accelerator 140 may not generate the result 445, and the document retrieval 450 may be performed based only on the result 435 (as shown by line 455). Figure 3 All relevant document embedding vectors 315 are in Figure 1 On the storage device 120, Figure 1 The local accelerator 135 may not produce result 435, and document retrieval 450 may be performed based only on result 445 (as shown by line 460). However, if the relevant document embedding vector is stored in Figure 1 The memory 115 and Figure 1 In the storage device 120, Figure 1 Local accelerator 135 and Figure 1 The storage accelerators 140 of each may generate results 435 and 445, respectively. In this case, as shown in block 465, the results 435 and 445 may be combined and sorted. By combining and sorting the results 435 and 445, it is possible to identify from both the results 435 and 445 Figure 3 The most relevant documents 305 are used for document retrieval 450 .
[0077] In some disclosed embodiments, Figure 1 The storage accelerator 140 may be replaced by a computational storage unit. A computational storage unit may be considered a more general concept than an accelerator (although in some embodiments, a computational storage unit may be used in conjunction with a computational storage unit). Figure 1 The accelerator 140 provides the same functionality). FIG. 5A to FIG. 5D Various implementations of computational storage units are shown.
[0078] FIG. 5A to FIG. 5D Showing the implementation according to the disclosed embodiment Figure 1 An example implementation of a computational storage unit of the accelerator 140. Figure 5A , a storage device 505 and a computing device 510-1 are shown. The storage device 505 may include a controller 515 and a storage device 520-1, and may be reachable through a host protocol interface such as a host interface 525. The host interface 525 may be used to manage the storage device 505 and control both I / O of the storage device 505. Examples of the host interface 525 may include a queue pair for submission and completion, but other host interfaces 525 using any native host protocol supported by the storage device 505 are also possible.
[0079] The computing device 510-1 may be paired with the storage device 505. The computing device 510-1 may include any number (one or more) of processors 530, which may provide one or more services 535-1 and 535-2. For greater clarity, each processor 530 may provide any number (one or more) of services 535-1 and 535-2 (although the disclosed embodiments may include a computing device 510-1 that includes exactly two services 535-1 and 535-2). Each processor 530 may be a single-core processor or a multi-core processor. The computing device 510-1 may be reachable via a host protocol interface (such as a host interface 540), which may be used to manage the computing device 510-1 and / or control the I / O of the computing device 510-1. As with the host interface 525, the host interface 540 may include a queue pair for submission and completion, but other host interfaces 540 using any native host protocol supported by the computing device 510-1 are also feasible. Examples of such host protocols may include Ethernet, RDMA, TCP / IP, InfiniBand, iSCSI, PCIe, SAS, and SATA (among other possibilities). In addition, host interface 540 may support Figure 1 Other components of the system 105 (e.g., a NIC (if the NIC is not connected to Figure 1 local accelerator 135)) or operates as a NIC and communicates with local and / or remote network / cloud components.
[0080] One or more processors 530 may be considered near-storage processing: that is, Figure 1 Because one or more processors 530 are closer to the storage device 505, one or more processors 530 may be able to process more efficiently than the storage device 505. Figure 1 The processor 110 of the computing device 510-1 can execute commands on the data stored in the storage device 505 faster. One or more processors 530 may have an associated memory 545, which can be used for local execution of commands on the data stored in the storage device 505. The memory 545 can be accessed from devices other than the computing device 510-1 via direct memory access (DMA). The memory 545 may include memory devices related to the computing device 510-1. Figure 1 Memory 115 similar to local memory, on-chip memory (which can be compared to such as Figure 1 Memory 115 may be faster but may be more expensive to produce) or both. As shown by the dashed line, memory 545 may be omitted.
[0081] The computing device 510-1 may also include a DMA 550. The DMA 550 may be a circuit that enables the storage device 505 to execute DMA commands in a memory external to the storage device 505. For example, the DMA 550 may enable the storage device 505 to Figure 1 The memory 115 or the memory in the computing device 510-1 reads data or writes data to the memory 115 or the memory in the computing device 510-1. Figure 1 As shown by the representation of DMA 550 using dashed lines, DMA 550 may be omitted.
[0082] Although Figure 5A Storage device 505 and computing device 510-1 are shown as being accessible separately via fabric 555, but disclosed embodiments may also include serial connections or (eg, Figure 1 Shared Figure 1 The storage device 505 and the computing device 510-1 of the local accelerator 135 of the network 555 are connected to each other. That is, commands for both the storage device 505 and the computing device 510-1 can be received at the same physical connection to the network 555, and can pass through one device to reach the other device. For example, if the computing device 510-1 is located between the storage device 505 and the network 555, the computing device 510-1 can receive commands for both the computing device 510-1 and the storage device 505: the computing device 510-1 can process the commands for the computing device 510-1, and can pass the commands for the storage device 505. Similarly, if the storage device 505 is located between the computing device 510-1 and the network 555, the storage device 505 can receive commands for both the storage device 505 and the computing device 510-1: the storage device 505 can process the commands for the storage device 505 and can pass the commands for the computing device 510-1 to the computing device 510-1.
[0083] Services 535-1 and 535-2 may provide a plurality of different functions that may be performed on data stored in storage device 505. For example, services 535-1 and 535-2 may provide predefined functions (such as matrix multiplication, dot product calculations, encryption, decryption, compression and / or decompression of data, erasure coding and / or application of regular expressions). Alternatively, services 535-1 and 535-2 may provide more general functions (such as data search functions and / or SQL (Structured Query Language) functions). Services 535-1 and 535-2 may also support running dedicated code. That is, applications using services 535-1 and 535-2 may provide custom code to be executed using data on storage device 505. Services 535-1 and 535-2 may also be any combination of these functions. Table 1 lists some examples of services that may be provided by one or more processors 530.
[0084] Table 1: Service Types
[0085]
[0086]
[0087] One or more processors 530 (and, indeed, computing device 510-1) may be implemented in any desired manner. Example implementations may include a local processor (such as a central processing unit (CPU) or some other processor (such as a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on a chip (SoC)), a graphics processing unit (GPU), a general purpose GPU (GPGPU), a data processing unit (DPU), a neural processing unit (NPU), a network interface card (NIC), or a tensor processing unit (TPU) (among other possibilities)). If computing device 510-1 includes more than one processor 530, each processor may be implemented as described above. For example, computing device 510-1 may have one each of a CPU, a TPU, and an FPGA, or computing device 510-1 may have two FPGAs, or computing device 510-1 may have two CPUs and one ASIC, etc.
[0088] Depending on the desired interpretation, computing device 510 - 1 or one or more processors 530 may be considered a computational storage unit.
[0089] Some disclosed embodiments may include other mechanisms for communicating with storage device 505 and / or computing device 510-1. For example, storage device 505 and / or computing device 510-1 may include a network interface 560 that may support communication with other devices using Ethernet, RDMA, TCP / IP, InfiniBand, SAS, iSCSI, or SATA (among other possibilities). Network interface 560 may provide an additional interface for communicating with storage device 505 and / or computing device 510-1. Although Figure 5A Network interface 560 is shown as providing communications to computing device 510-1, but the disclosed embodiments may also include a network interface to storage device 505. Furthermore, in some disclosed embodiments, such other interfaces may be used in place of host interfaces 525 and / or 540 (in which case host interfaces 525 and / or 540 may be omitted). FIG. 5B to FIG. 5D Other variations shown in may also include such an interface.
[0090] Although Figure 5A Storage device 505 and computing device 510-1 are shown as separate devices, but Figure 5B, the storage device 505 and the computing device 510-1 may be combined. Thus, the computing device 510-2 may include a controller 515, a storage device 520-1, one or more processors 530 providing services 535-1 and 535-2, a memory 545, and / or a DMA 550. Figure 5A The storage device 505 of the computing device 510-1 can receive management commands and I / O commands via the host interface 540 and / or the network interface 560. Even though the computing device 510-2 is shown as including both a storage device and one or more processors 530, Figure 5B Still, it may also be considered to include storage devices associated with computing storage units.
[0091] exist Figure 5C In yet another variation shown in FIG. 5 , a computing device 510-3 is shown. The computing device 510-3 may include a controller 515 and a storage device 520-1, as well as one or more processors 530, a memory 545, and / or a DMA 550 that provide services 535-1 and 535-2. However, even though the computing device 510-3 may be considered a single component including the controller 515, the storage device 520-1, one or more processors 530 (and also considered a storage device associated with a computing storage unit), a memory 545, and / or a DMA 550, it is not the same as Figure 5B Unlike the embodiment shown in , the controller 515 and the one or more processors 530 may each include their own host interfaces 525 and 540, and / or network interfaces 560 (again, the host interfaces 525 and 540, and / or the network interfaces 560 may be used for management and / or I / O). By including the host interface 525, the controller 515 can provide transparent access to the storage device 520-1 (rather than requiring all communications to be conducted through the one or more processors 530).
[0092] Additionally, one or more processors 530 may have access 565 to storage device 520-1. Thus, instead of routing access requests through controller 515, one or more processors 530 may be able to access data directly from storage device 520-1 using access 565.
[0093] exist Figure 5C , both the controller 515 and the access 565 are shown with dashed lines to indicate that they are optional elements and may be omitted depending on the implementation.
[0094] at last, Figure 5D Another embodiment is shown. Figure 5D may include Figure 5CA similar controller 515, memory 545, DMA 550, and access 565 are shown for computing device 510-4. In addition, computing device 510-4 may include an array of one or more storage devices (eg, storage elements) 520-1 through 520-4. Figure 5D Four storage elements are shown, but the disclosed embodiments may include any number (one or more) of storage elements. In addition, the independent storage elements may be other storage devices (such as, FIG. 5A to FIG. 5D ).
[0095] Because the computing device 510-4 may include more than one storage element 520-1 to 520-4, the computing device 510-4 may include an array controller 570. The array controller 570 may manage how data is stored on the storage elements 520-1 to 520-4 and how data is retrieved from the storage elements 520-1 to 520-4. For example, if the storage elements 520-1 to 520-4 are implemented as some level of redundant array of independent disks (RAID), the array controller 570 may be a RAID controller. If the storage elements 520-1 to 520-4 are implemented using some form of erasure coding, the array controller 570 may be an erasure coding controller.
[0096] Although the above discussion focuses on Figure 1 The storage device 120 and Figure 1 Implementation of the storage accelerator 140, but Figure 1 The local accelerator 135 may be implemented with Figure 1 The implementation of the storage accelerator 140 is similar. Therefore, Figure 1 The local accelerator 135 can be implemented using a CPU, FPGA, ASIC, SoC, GPU, GPGPU, DPU, NPU, TPU or NIC as needed.
[0097] Figure 6 Showing the embodiment according to the disclosure Figure 1 Details of the storage device 120. Figure 6 In the embodiment of the storage device 120, the embodiment is shown as being directed to a solid state drive (SSD), but the disclosed embodiments may include other embodiments (such as a hard disk drive). Figure 6 In the embodiment, the storage device 120 may include a host interface layer (HIL) 605, a controller 610, and various flash memory chips 615-1 to 615-8 (also referred to as "flash memory devices"), and the various flash memory chips 615-1 to 615-8 may be organized into various channels 620-1 to 620-4. The host interface layer 605 may manage the storage device 120 and other components (such as, Figure 1Host interface layer 605 may also manage communications with devices that are remote from storage device 120: that is, devices that are not considered Figure 1 A device that is part of the local accelerator 135 of the storage device 120 but communicates with the storage device 120, for example, via one or more network connections. These communications may include read requests for reading data from the storage device 120, write requests for writing data to the storage device 120, and delete requests for deleting data from the storage device 120.
[0098] The host interface layer 605 may manage interfaces through only a single port, or the host interface layer 605 may manage interfaces through multiple ports. Alternatively, the storage device 120 may include multiple ports, each of which may have a separate host interface layer 605 for managing interfaces through that port. Embodiments of the inventive concept may also mix possibilities (e.g., an SSD with three ports may have one host interface layer for managing one port and a second host interface layer for managing the other two ports). The host interface layer 605 may communicate with other components through a connection 625, which may be, for example, a PCIe connection, an M.2 connection, a U.2 connection, a SCSI connection, or a SATA connection (among other possibilities).
[0099] The controller 610 may use the flash controller 630 to manage read operations and write operations to the flash chips 615-1 to 615-8, garbage collection operations, and other operations. The controller (e.g., SSD controller) 610 may also include a flash translation layer 635, a storage accelerator 140, and / or a memory 640. The flash translation layer 635 may manage a logical block address (LBA) (e.g., a memory address represented by a flash memory chip 615-1 to 615-8). Figure 1 The flash translation layer 635 does not need to notify the storage device 120 when data is moved from one block to another within the storage device 120. Figure 1 The processor 110 of FIG.
[0100] The storage accelerator 140 can be used with Figure 1 1, but is implemented within the controller 610 rather than external to the storage device 120. As shown by the representation of the storage accelerator 140 using dashed lines, the storage accelerator 140 (eg, when implemented external to the storage device 120) may be omitted.
[0101] The memory 640 may be a local memory (such as DRAM) used by the controller (eg, storage controller) 610. The memory 640 may be a volatile memory or a non-volatile memory. The memory 640 may also be accessed from a device other than the storage device 120 (eg, Figure 1 Memory 640 may also be used to store data for access using a memory protocol in storage device 120 that allows such access. For example, a cache coherent interconnect storage device may allow the storage device to be accessed as if it were a Figure 1 The following reference is made to the expansion of the memory 115. Figure 8 Cache coherent interconnect storage devices are discussed further. As shown using dashed line representation of memory 640, memory 640 may be omitted.
[0102] Although Figure 6 The storage device 120 is shown as including eight flash memory chips 615-1 to 615-8 organized into four channels 620-1 to 620-4, but embodiments of the inventive concept may support any number of flash memory chips organized into any number of channels. Figure 6 The structure of an SSD is shown, but other storage devices (e.g., hard disk drives) may use the same Figure 6 The structure shown in FIG. 1 is implemented with a different structure to manage reading and writing data, but has similar potential benefits.
[0103] Although Figure 6 The storage device 120 is shown as just a storage device, but the disclosed embodiments may include other components within the storage device 120. For example, the storage device 120 may have a Figure 1 processor 110 (or attached to Figure 1 The computing storage unit of the storage device 120 itself used by other devices of the local accelerator 135).
[0104] As mentioned above Figure 4 As discussed, Figure 1 The storage accelerator 140 may be based on Figure 4 The query embedding vector 410 is stored in Figure 1 The storage device 120 Figure 3 The document embedding vector 315 is used to perform Figure 4 Similarity search 440. Because Figure 4 The query 405 involves the storage in Figure 1 The storage device 120 Figure 3 Some documents have embedding vectors of 315, so it is expected Figure 4 The upcoming query 405 can also be used to store Figure 1 The storage device 120 Figure 3 Some of the same document embedding vectors 315 are reasonable. Figure 1 The storage accelerator 140 may be capable of Figure 4 Such additional queries 405 are processed, but "based on the stored Figure 1 The memory 115 Figure 3 The document embedding vector 315 is operated Figure 1 The local accelerator 1405" may be able to be more efficient than the "based on the storage Figure 1 The storage device 120 Figure 3 The document embedding vector of 315 Figure 1 Storage Accelerator 140" for faster Figure 4 Therefore, in order to improve the performance, Figure 3 Those document embedding vectors 315 from Figure 1 The storage device 120 is migrated to Figure 1 The memory 115 may be worthwhile.
[0105] Figure 7 Showing the embodiment according to the disclosure Figure 1 Memory 115, Figure 3 The document embedding vector 315 of is ejected to be Figure 3 To make room for the additional document embedding vector 315. Figure 7 , memory 115 is shown as including 16 document embedding vectors 315-1 through 315-16. For purposes of this example, memory 115 may be considered completely full, but disclosed embodiments may fill memory 115 with more or less than 16 document embedding vectors 315. Furthermore, as discussed below, memory 115 may not be full: that is, memory 115 may have room for additional document embedding vectors 315.
[0106] Figure 1 The processor 110 (or Figure 1 The local accelerator 135 of the embodiment has selected the document embedding vector 315-17 to be loaded into the memory 115. For example, the document embedding vector 315-17 may be a document embedding vector for responding to Figure 4 The document embedding vectors 315-17 of one (or more) recent queries 405 may be selected using any desired strategy to be loaded into memory 115: for example, the document embedding vectors 315-17 may be selected using a most recently used (MRU) selection strategy or a most frequently used (MFU) selection strategy. Because memory 115 is currently full, Figure 1 The processor 110 (or Figure 1The local accelerator 135 of the memory 115 may select a document embedding vector (such as document embedding vector 315-7) for eviction from memory 115. By evicting document embedding vector 315-7 from memory 115, space may be created to store document embedding vector 315-17 in memory 115, after which document embedding vector 315-17 may be loaded into memory 115 (where document embedding vector 315-7 was once stored).
[0107] In some disclosed embodiments, it may be expected that document embedding vector 315 remains unchanged (because the underlying document may be expected to remain unchanged). Therefore, when document embedding vector 315-7 is evicted from memory 115, document embedding vector 315-7 may be deleted upon eviction. However, in disclosed embodiments where document embedding vector 315 is changeable, evicting document embedding vector 315-7 from memory 115 may involve writing the updated document embedding vector 315-7 to memory 115. Figure 1 The storage device 120 (so that the updated document embedding vector is not lost).
[0108] As mentioned above, the above Figure 7 The description assumes that memory 115 is full, and that evicting document embedding vector 315-7 from memory 115 is necessary to make room for loading document embedding vector 315-17. However, if memory 115 is not full—that is, memory 115 has room for document embedding vector 315-17 without evicting document embedding vector 315-7 or any other document embedding vector 315 from memory 115—then document embedding vector 315-17 may be loaded into memory 115 without first evicting the currently stored document embedding vector 315.
[0109] The above disclosed embodiments are all operated based on the following principle: if Figure 3 The document embedding vector 315 is stored in Figure 1 On the storage device 120, Figure 1 The storage accelerator 140 can be used for Figure 4 The query embedding vector 410 and Figure 3 However, there are some methods that can be used to avoid Figure 1 Other methods of storing the accelerator 140 are required. Figure 8 Some such embodiments disclosed are shown.
[0110] Figure 8 Showing management according to the disclosed embodiment Figure 3 The document embedding vector 315 is Figure 1 The storage device 120, Figure 1 The memory 115 and Figure 1The local accelerator is stored in the local memory of the embedded management unit (EMU). Figure 8 In the embedded management unit (EMU) 805, the Figure 3 Where each document embedding vector 315 is stored and can be moved as needed Figure 3 The document embedding vector 315. Since the local accelerator 135 can be responsible for Figure 4 The query embedding vector 410 and Figure 3 All processing of the document embedding vector 315, so Figure 1 The storage accelerator 140 may be omitted.
[0111] The local accelerator 135 may include a local memory 810. The local memory 810 may be a memory local to the local accelerator 135 and may be different from the memory 115. The local accelerator 135 may use the document embedding vector stored in the local memory 810 instead of the memory 115 to perform Figure 4 The query 405 is processed: However, in addition to changing the local accelerator 135 from where to access Figure 3 The local accelerator 135 is unchanged from the above description except for the document embedding vector 315. (In addition, whether or not described in this way, the disclosed embodiments described above may also have a local accelerator 135, which includes a local accelerator for Figure 4 The query 405 is processed in the local memory 810. )
[0112] Local storage 810, memory 115, and storage device 120 may be considered as storage devices that can store Figure 3 The hierarchy of the location of the document embedding vector 315. Because the local memory 810 is closest to the local accelerator 135 and can be the fastest memory type (e.g., SRAM or some form of cache memory), the local memory 810 can be accessed from it. Figure 3 The fastest place to find the document embedding vector 315 of . However, local memory 810 can also be the most expensive form of memory per cell, and thus may allow storage of Figure 3The minimum number of document embedding vectors 315. Memory 115 may be slower than local memory 810 (because memory 115 may be a slower memory type (such as DRAM), or because the latency to access memory 115 may be higher than the latency to access local memory 810), but may be faster than storage 120. Therefore, the per-unit cost of memory 115 may be less than the per-unit cost of local memory 810, and for the same cost, the capacity of memory 115 may be greater than the capacity of local memory 810. Finally, storage 120 may be the slowest type of storage device to access (e.g., an SSD or hard drive), but may have the lowest per-unit cost and therefore provide the largest total storage capacity. Fig. 9 As shown in , local memory 810, memory 115, and storage 120 may be considered as a pyramid.
[0113] Return to Figure 8 , it is desired to store in the fastest available form of storage (such as local storage 810) Figure 3 The document embedding vector 315. However, since the cost of storing the fastest form can be significant, for a given amount of capital, Figure 1 The total capacity of the machine 105 may be reduced (by using only the fastest, most expensive type of memory). Alternatively, Figure 1 The total capacity of the machine 105 can be increased by using only the cheapest, slowest form of storage, but Figure 1 The overall speed of query processing on machine 105 is at the expense of Figure 1 The overall speed of query processing by the machine 105 may be slowed down). A balance between the two approaches may be more cost-effective.
[0114] By including local memory 810, memory 115, and storage 120, it is possible to achieve an overall balance between cost, capacity, and speed. Figure 1 The local accelerator 135 can only access the local memory 810 Figure 3 The EMU 805 can be introduced to manage the document embedding vector 315 (because that is the fastest form of memory). Figure 3 The EMU 805 may move the document embedding vectors 315 between the local memory 810, the memory 115, and the storage device 120 as appropriate. To this end, the EMU 805 may communicate with the local memory 810, the memory 115, and the storage device 120 as shown.
[0115] EMU 805 Trackable Figure 3 The position of each document embedding vector 315. For example, EMU 805 may include Figure 3The EMU 805 may only track the identifiers of the document embedding vectors 315 stored in the local memory 810 or the memory 115. Figure 3 The document embedding vector 315 is not tracked in this way Figure 3 The positions of all document embedding vectors 315. Recall that Figure 3 The document embedding vector 315 may be stored on the storage device 120. Figure 3 The document embedding vector 315 of is changed, so even if it is copied to the local memory 810 or the memory 115, the document embedding vector 315 can be stored on the storage device. Figure 3 Each document embedding vector 315 may be stored on the storage device 120: Figure 3 If the document embedding vector 315 of is not indicated as being stored anywhere else (except for the storage device 120), then the EMU 805 may assume that Figure 3 The document embedding vector 315 of is only stored on the storage device 120. Therefore, the EMU 805 can only track the document embedding vector currently stored in the local memory 810 or the memory 115.
[0116] When you will use Figure 4 Similarity search 430 processing Figure 4 When querying embedding vector 410, EMU 805 may determine Figure 3 Where is the relevant document embedding vector 315 stored? If the relevant document embedding vector is not currently in the local memory 810, the EMU 805 may use Figure 3 The relevant document embedding vector 315 of is moved to the local memory 810. This may involve Figure 3 The document embedding vector 315 is copied from the storage device 120 to the local memory 810, or Figure 3 The document embedding vector 315 of is moved from the memory 115 to the local memory 810. If the local memory 810 is not currently used for the document embedded in the local memory 810, Figure 3 The document embedding vector space of 315 is Figure 3 The existing document embedding vector 315 of may be evicted from the local memory 810, thereby preparing the document embedding vector 315 to be loaded into the local memory 810. Figure 3 To make room for the new document embedding vector 315.
[0117] To evict from local storage 810 Figure 3 The document embedding vector 315 can be used to select Figure 7 The document embedding vector 315-7 is similarly selected Figure 3 The document embedding vector 315 is different in that instead of Figure 7 The document embedding vector 315-17 is added to the memory 115, but Figure 7 The document embedding vector 315-17 is added to the local memory 810 and is not discarded after being evicted from the local memory 810. Figure 7 Instead of the document embedding vector 315-7, Figure 7 The document embedding vector 315-7 of is flushed to the memory 115 (that is, Figure 7 The document embedding vector 315-7 may be stored in the memory 115 instead of being discarded). If the memory 115 is not used for flushing from the local memory 810 Figure 3 The document embedding vector 315 space can be performed with respect to Figure 7 A process similar to the one described above is performed to evict the memory 115 Figure 3 document embedding vector 315 (but in that case, the document embedding vector 315 is ejected from memory 115 Figure 3 The document embedding vector 315 may be discarded instead of being flushed back to the storage device 120).
[0118] In addition, EMU 805 can Figure 3 The document embedding vector 315 is pre-fetched from the storage device 120 into the memory 115. For example, the EMU 805 may analyze Figure 4 Recent queries 405 and answers for Figure 4 Those queries with 405 Figure 3 The relevant document embedding vector 315. Based on the Figure 4 Recent queries 405 Figure 3 The document embedding vector 315, EMU 805 can identify the expected Figure 4 The upcoming query 405 used Figure 3 For example, the EMU 805 may include a threshold percentage or a threshold number. Figure 4 Recent queries 405 Figure 3 The document embedding vector 315, EMU 805 can select a threshold percentage or a threshold number Figure 3 Such document embedding vector 315 is used for pre-fetching.
[0119] For prefetching Figure 3 Another method to generate the document embedding vector 315 of may be to use another retriever (such as a vocabulary retriever) that can quickly but not necessarily return accurate results. Such a retriever can be used to generate Figure 3 Document 305 (or Figure 3The candidate list of document embedding vectors 315) of Figure 3 The document embedding vector 315 of can be pre-fetched. Then, Figure 3 These pre-fetched document embedding vectors 315 may be available in memory 115 to be used with Figure 4 The query embedding vector 410 is compared with the query embedding vector 410 loaded from the storage device 120 Figure 3 This saves time compared to the document embedding vector 315.
[0120] By Figure 3 Those document embedding vectors 315 are pre-fetched from the storage device 120 to the memory 115, if in response to Figure 4 The future query 405 while using Figure 3 Those document embedding vectors 315, then faster Figure 3 It is feasible to move those document embedding vectors 315 to the local memory 810. In some disclosed embodiments, the EMU 805 may Figure 3 The document embedding vector 315 of Figure 3 The document embedding vector 315 space) instead of Figure 3 The document embedding vector 315 is pre-fetched into the memory 115.
[0121] when Figure 3 When the document embedding vector 315 is to be moved between the local memory 810, the memory 115 and the storage device 120, the EMU 805 may use any desired strategy to select Figure 3 Which document embedding vectors 315 of will be moved into or out of the corresponding component. In addition, EMU 805 can use different strategies to select which document embedding vectors 315 to move Figure 3 Which documents are embedded in the vector 315? For example, EMU 805 may use Figure 3 A strategy (e.g., a first strategy) for selecting which document embedding vectors 315 to move into local memory 810 Figure 3 another strategy (e.g., a second strategy) for selecting which document embedding vectors 315 to remove from local memory 810 Figure 3 The third strategy for selecting which document embedding vectors 315 to move into memory 115 and Figure 3 A fourth strategy for which document embedding vectors 315 to move out of memory 115. These strategies may include LFU strategy, LRU strategy, MFU strategy, and MRU strategy (among other possibilities).
[0122] In some disclosed embodiments, the local accelerator 135 may be configured to Figure 3The relevant document embedding vector 315 is stored in the local memory 810, and the EMU 805 ensures Figure 3 The document embedding vector 315 associated with is actually in the local memory 810. However, in other disclosed embodiments, the local accelerator 135 may access Figure 3 805, regardless of where they are stored. Figure 3 Where are the individual document embedding vectors 315 located to access from the local memory 810, the memory 115 and / or the storage device 120 Figure 3 The document embedding vector 315 of EMU 805 can still be moved between local memory 810, memory 115 and storage device 120 as appropriate. Figure 3 The document embedding vector 315 of Figure 3 If the most recently used document embedding vector 315 of is not already in the local memory 810, Figure 3 The most recently used document embedding vector 315 of Figure 3 The document embedding vector 315 is pre-fetched into the memory 115 and is evicted from the local memory 810 or the memory 115 Figure 3 The document embedding vector 315 is thus Figure 3 to make room for the new upcoming document embedding vector 315), but otherwise may not be responsible Figure 3 The migration of the document embedding vector 315 of . In addition, some disclosed embodiments may also use Figure 1 The storage accelerator 140 is used to accelerate the storage of data stored on the storage device 120. Figure 3 The document embedding vector of 315 Figure 4 The query 405 is handled.
[0123] In some disclosed embodiments, Figure 1 The storage device 120 may be a cache coherent interconnect storage device (eg, a cache coherent interconnect SSD). Figure 1 The storage device 120 may support Figure 1 In the disclosed embodiment, the CXL protocol for accessing data from the storage device 120 can still be used. Figure 1 The storage accelerator 140 of the cache coherent interconnect storage device. However, the cache coherent interconnect storage device can allow the data stored thereon to be accessed as if the cache coherent interconnect storage device were a memory. However, in order to understand how the cache coherent interconnect storage device operates, and in particular how the cache coherent interconnect SSD operates, it is important to understand how the SSD itself works.
[0124] There are flash memory chips such as Figure 6 There are two forms of non-volatile flash memory in the flash chip 615 of the SSD: NOR flash and NAND flash. Because of how NOR flash is implemented, NOR flash allows data to be written at the individual byte level or even the bit level, so the number of connections required is large, making it complicated to implement NOR flash. Therefore, most SSDs use NAND flash. NAND flash reduces the number of connections within the chip, making implementation potentially simpler. But because transistors (cells that store data) can be connected in series, data from more than one transistor can be written or read at a time. The typical arrangement is to write or read data in units called pages, which can include, for example, 4096 bytes or 8192 bytes of data. Therefore, in order to access a specific byte, the entire page can be read, and then the desired byte can be isolated.
[0125] In addition, the SSD may allow data to be written or read in blocks, but the SSD may not allow data to be rewritten. Therefore, in order to change the data in a page, the old data may be read into the Figure 6 The old data is appropriately updated in the memory 640 and then written to the new page on the SSD, with the old page marked as invalid for later collection.
[0126] To collect invalid pages, the SSD may erase the data on them. However, implementations of the SSD may only allow data to be erased in units called blocks, which may include a certain number of pages. For example, a block may include 128 pages or 256 pages. Therefore, the SSD may not erase a single page at a time: the SSD may erase all pages in a block. (Incidentally, although NOR flash memory may allow data to be read or written at the byte level or even the bit level, because erasing data may affect adjacent cells, erasing data in NOR flash memory is usually also done at the block level.)
[0127] Although the above discussion describes pages as having a particular size and blocks as having a particular number of pages, the disclosed embodiments may include pages of any desired size without limitation, and any number of pages per block without limitation.
[0128] Because SSDs and especially NAND flash memory may not allow access to data at the byte level (that is, writing data or reading data may not be done at a granularity below the page level), more processing is involved in accessing data at a larger granularity, moving data in and out Figure 6 The cache coherent interconnect SSD takes advantage of the cache coherent interconnect by supporting load commands and store commands similar to those used by memory 115. Figure 6 When a load command or a store command is received, the appropriate page may be loaded into Figure 6 640 (if not already present) and may be accessed from memory 115 substantially the same as the data is in memory 115 Figure 6 640 to access data. When it is time to Figure 6 When a page is evicted from memory 640, if the page has been updated (i.e., the page is marked as dirty), the page can be written to a new page on the SSD and the old page can be invalidated. (If the evicted page is clean—that is, the data has not been changed—then because the original page still exists on the SSD, the evicted page can simply be erased without worrying about data loss.) The SSD can use Figure 6 Any desired strategy for evicting pages from memory 640: for example, an LFU strategy or an LRU strategy (among other possibilities) may be used.
[0129] To support byte access to data on a cache coherent interconnect SSD, the SSD can provide Figure 1 The processor 110 (or Figure 1 A mapping between an address range specified by the SSD and the supported capacity of the SSD. For example, if the SSD has a capacity of 100 GB, then Figure 1 The processor 110 of FIG. 1 may provide a 100GB address range for use by the SSD. In this way, the cache coherent interconnect SSD may appear as an extension of memory 115. (Note that the cache coherent interconnect SSD may support two different methods for accessing the same data: one using load commands and store commands through a memory protocol, and one using read commands and write commands through a file system input / output protocol.
[0130] In addition to the cache coherent interconnect SSD being considered as an extension of memory 115, local memory 810 can also be considered as an extension of memory 115. Figure 8, the unified memory space 815 may include various portions for memory 115, cache coherent interconnect SSD 120, and local memory 810. For example, portion 820-1 may represent the portion of the unified memory space 815 allocated to memory 115, portion 820-2 may represent the portion of the unified memory space 815 allocated to cache coherent interconnect SSD 120, and portion 820-3 may represent the portion of the unified memory space 815 allocated to local memory 810. Portions 820-1 through 820-3 may have non-overlapping address ranges, such that given a particular address in the unified memory space 815, the portion 820 that includes the particular address may be uniquely identified. (Note that the disclosed embodiments may have a unified memory space 815 that includes other portions 820 allocated to other devices: the unified memory space 815 is not complete and limited to only these three portions for memory 115, cache coherent interconnect SSD 120, and local memory 810.)
[0131] By using unified memory space 815, EMU 805 may be able to determine Figure 3 Where is the specific document embedding vector 315 currently stored. For example, if Figure 3 The address of the document embedding vector 315 is in section 820-1, then Figure 3 The document embedding vector 315 of may be in the memory 115; if Figure 3 The address of the document embedding vector 315 is in section 820-2, then Figure 3 The document embedding vector 315 of may be in the storage device 120; and if Figure 3 The address of the document embedding vector 315 is in section 820-3, then Figure 3 The document embedding vector 315 may be in the local memory 810. The method may enable the EMU 805 to determine how Figure 3 where the specific document embedding vector 315 is located, and Figure 3 The document embedding vector 315 may need to be moved (e.g., moved to local memory 810)” is simplified.
[0132] Fig.10 The invention is shown in accordance with the disclosed embodiment. Figure 1 The storage accelerator 140 uses Figure 3 The document embedding vector 315 is used to Figure 4 A flowchart of an example process for processing query 405. Fig.10 In block 1005, Figure 1 The processor 110 may recognize Figure 4 The query embedding vector 410 of Figure 1The processor 110 may be Figure 1 Part or all of the local accelerator 135: Therefore, in Fig.10 or elsewhere Figure 1 References to the processor 110 may be understood as also or alternatively references to Figure 1 ) At block 1010, Figure 1 The processor 110 may determine that the Figure 4 Query 405 related Figure 3 The document embedding vector 315 is stored in Figure 1 On the storage device 120. At block 1015, Figure 1 The processor 110 may Figure 4 The query embedding vector 410 is sent to Figure 1 The storage accelerator 140. At block 1020, Figure 1 The processor 110 may be Figure 1 The storage accelerator 140 receives Figure 4 The result 445. Finally, at block 1025, Figure 1 The processor 110 may be based on Figure 1 Storage Accelerator 140 Figure 4 Results 445 sent Figure 3 Document 305.
[0133] Fig.11 According to the disclosed embodiment, a method for Figure 4 The query 405 generates Figure 4 Flowchart of an example process for finding a query embedding vector 410. Fig.11 In block 1105, Figure 1 The processor 110 may receive Figure 4 The query returned 405. Figure 4 The query 405 can be obtained by, for example, Figure 1 An application running on machine 105 or connected to Figure 1 The other host of the machine 105 sends. At block 1110, Figure 3 The neural language model 310 can be used to Figure 4 The query 405 generates Figure 4 The query embedding vector 410 of .
[0134] Fig.12 The invention is shown in accordance with the disclosed embodiment. Figure 1 The storage accelerator 140 returns the document 305 as Figure 4 A flowchart of an example process for obtaining the results of query 405. Fig.12 In block 1205, Figure 1 The processor 110 may be Figure 1The storage device 120 retrieves Figure 3 Document 305. For context, box 1205 may be in box 1020 (where Figure 1 The processor 110 from Figure 1 The storage accelerator 140 receives Figure 4 The result of 445) and box 1025 (where Figure 1 The processor 110 sends Figure 3 305) is executed between the documents.
[0135] Fig.13 The invention is shown in accordance with the disclosed embodiment. Figure 1 The local accelerator 135 combines the result of the local accelerator 135 with Figure 1 Flow chart of an example process for combining the results of the storage accelerator 140. Fig.13 In block 1305, Figure 1 The local accelerator 135 can be based on the local accelerator 135 Figure 4 The query embedding vector 410 and Figure 3 The document embedding vector 315 (e.g., the first DEV) is processed (that is, executed Figure 4 Similarity search 430) to generate Figure 4 Result 435. At block 1310, Figure 1 The local accelerator 135 can be used for Figure 4 The results 435 and 445 are combined and sorted to produce a combined result. The combined result can then be used to identify the document to be sent based on the result (combined result). For context, blocks 1305 and 1310 can be in block 1020 (where Figure 1 The processor 110 from Figure 1 The storage accelerator 140 receives Figure 4 The result of 445) and box 1025 (where Figure 1 The processor 110 sends Figure 3 305) is executed between the documents.
[0136] Fig.14 The invention is shown in accordance with the disclosed embodiment. Figure 1 The local accelerator 135 copies the document embedding vector 315 to Figure 1 A flowchart of an example process in the memory 115 of FIG. Fig.14 In block 1410, Figure 1 The local accelerator 135 may optionally be stored in Figure 1 The memory 115 Figure 3 The document embedding vector 315 of . Figure 1 The local accelerator 135 may use any desired selection strategy to select the Figure 1The memory 115 Figure 3 The document embedding vector 315 of . For example, the selection strategy can be an MFU selection strategy or an MRU selection strategy (among other possibilities). At block 1415, Figure 1 The local accelerator 135 may choose to Figure 1 115 of the memory is evicted Figure 3 The additional document embedding vector 315 (thus selected as in block 1410 for storage in Figure 1 The memory 115 Figure 3 to make room for the document embedding vector 315). Figure 1 The local accelerator 135 may use any desired eviction strategy to select the Figure 1 115 of the memory is evicted Figure 3 The document embedding vector 315 of . For example, the eviction strategy can be an LFU eviction strategy or an LRU eviction strategy (among other possibilities). At block 1420, Figure 1 The local accelerator 135 may be ejected from the Figure 1 115 of the memory is evicted Figure 3 The document embedding vector 315 of . Note that as shown by the dashed line 1425, blocks 1415 and 1420 may be omitted. Finally, at block 1430, Figure 1 The local accelerator 135 may be selected in block 1410 as the one to be copied to Figure 1 The memory 115 Figure 3 The document embedding vector 315 is copied to Figure 1 in the memory 115.
[0137] Although Fig.14 Focus on Figure 1 The local accelerator 135 will Figure 3 The document embedding vector 315 is obtained from Figure 1 The storage device 120 is loaded into Figure 1 Memory 115, but Fig.14 Also applies to Figure 8 The EMU 805 is used to Figure 3 The document embedding vector 315 is obtained from Figure 1 Memory 115 or Figure 1 The storage device 120 is loaded into Figure 8 810, or Figure 3 The document embedding vector 315 is obtained from Figure 1 The storage device 120 pre-fetches Figure 1 115. But to make this clear (especially when loading Figure 3 The document embedding vector 315 involves Figure 8 The local memory 810 and Figure 8 115 of the memory are both evicted Figure 3 In the case of another document embedding vector 315), Fig.15 Shows this situation.
[0138] Fig.15 The invention is shown in accordance with the disclosed embodiment. Figure 8 EMU 805 Management of Figure 3 A flowchart of an example process of where the document embedding vector 315 is stored. Fig.15 In block 1505, Figure 8 The EMU 805 can be optionally loaded into Figure 8 The local memory 810 Figure 3 The document embedding vector 315 of (e.g., the first DEV). Figure 8 The EMU 805 may use any desired selection strategy to select the Figure 8 The local memory 810 Figure 3 The document embedding vector 315 of . For example, the selection strategy can be an MFU selection strategy or an MRU selection strategy (among other possibilities). At block 1510, Figure 8 The EMU805 can be selected from Figure 8 The local memory 810 is evicted Figure 3 Another document embedding vector 315 (eg, a second DEV) of . Figure 8 The EMU 805 may use any desired eviction policy to select the Figure 8 The local memory 810 is evicted Figure 3 The document embedding vector 315 of . For example, the eviction strategy can be an LFU eviction strategy or an LRU eviction strategy (among other possibilities). At block 1515, Figure 8 The EMU 805 can be selected from Figure 1 115 of the memory is evicted Figure 3 Another document embedding vector 315 (e.g., another second DEV) of . Figure 8 The EMU 805 may use any desired eviction policy to select the Figure 1 115 of the memory is evicted Figure 3 The document embedding vector 315 of . For example, the eviction strategy can be an LFU eviction strategy or an LRU eviction strategy (among other possibilities). In addition, the eviction strategies used at blocks 1510 and 1515 can be the same eviction strategy, or they can be different eviction strategies.
[0139] At block 1520, as selected in block 1515, Figure 8 The EMU 805 is available from Figure 1Memory 115 is evicted (that is, deleted) Figure 3 At block 1525, as selected in block 1510, Figure 8 The EMU 805 can Figure 3 The document embedding vector 315 (e.g., the second DEV) is obtained from Figure 8 The local memory 810 of Figure 1 Finally, at block 1530, as selected in block 1505, Figure 8 The EMU805 can Figure 3 The document embedding vector 315 (e.g., first DEV) is copied to Figure 1 in the local memory 810.
[0140] if Figure 8 The local memory 810 has a Figure 3 The document embedding vector 315 (e.g., the first DEV) does not need to be Figure 8 Local storage 810 is evicted Figure 3 Another document embedding vector 315 (e.g., a second DEV) of . In this case, as shown by the dashed line 1535, blocks 1510, 1515, 1520, and 1525 may be omitted. Similarly, if Figure 1 The memory 115 has a function for storing the Figure 8 The local memory 810 is evicted Figure 3 If the space of the document embedding vector 315 (e.g., the second DEV) is occupied, then as indicated by the dotted line 1540, boxes 1515 and 1520 may be omitted.
[0141] Fig.16 The invention is shown in accordance with the disclosed embodiment. Figure 1 The storage accelerator 140 uses Figure 3 The document embedding vector 315 is used to Figure 4 A flowchart of an example process for processing query 405. Fig.16 In block 1605, Figure 1 The storage accelerator 140 can be obtained from Figure 1 The processor 110 receives Figure 4 The query embedding vector 410 of Figure 1 The storage accelerator 140 may be part or all of the computational storage unit: Fig.16 or elsewhere Figure 1 References to the storage accelerator 140 may be understood as also or alternatively references to the computational storage unit, and vice versa. ) At block 1610, Figure 1The storage accelerator 140 can be obtained from Figure 1 The storage device 120 accesses Figure 3 The document embedding vector 315 of . At block 1615, Figure 1 The storage accelerator 140 may be based on the storage accelerator 140 Figure 4 The query embedding vector 410 and Figure 3 The document embedding vector 315 is processed (that is, the Figure 4 Similarity search 440) to generate Figure 4 Result 445. At block 1620, Figure 1 The storage accelerator 140 can Figure 4 Results 445 returned to Figure 1 The processor 110 of FIG.
[0142] Fig.17 The invention is shown in accordance with the disclosed embodiment. Figure 1 The storage device 120 returns the Figure 1 The processor 110 requests Figure 3 A flowchart of an example process of document 305. Fig.17 In block 1705, Figure 1 The storage device 120 may receive Figure 3 Request for document 305. Available from, for example Figure 1 The processor 110 (or Figure 1 The local accelerator 135 of the device receives the request. At block 1710, Figure 1 The storage device 120 can access Figure 3 , and at block 1715, Figure 1 The storage device 120 may return in response to the request received at block 1705 Figure 3 Document 305.
[0143] Fig.18 The invention is shown in accordance with the disclosed embodiment. Figure 1 The storage device 120 will Figure 3 The document embedding vector 315 is returned to Figure 1 A flowchart of an example process of the processor 110. Fig.18 In block 1805, Figure 1 The storage device 120 may receive Figure 3 A request for a document embedding vector 315 of . This can be obtained from, for example Figure 1 The processor 110 (or Figure 1 The local accelerator 135 of the device receives the request. At block 1810, Figure 1 The storage device 120 can access Figure 3 The document embedding vector 315 of , and at block 1815, Figure 1The storage device 120 may return in response to the request received at block 1805 Figure 3 The document embedding vector 315 of .
[0144] Fig.19 The invention is shown in accordance with the disclosed embodiment. Figure 1 The local accelerator 135 is based on Figure 8 The EMU 805 uses Figure 3 The document embedding vector 315 is used to Figure 4 A flowchart of an example process for processing query 405. Fig.19 In block 1905, Figure 1 The processor 110 may recognize Figure 4 The query embedding vector 410 of Figure 1 The processor 110 may be Figure 1 Part or all of the local accelerator 135: Therefore, in Fig.19 or elsewhere Figure 1 References to the processor 110 may be understood as also or alternatively references to Figure 1 ) At block 1910, Figure 8 The EMU 805 can Figure 3 The document embedding vector 315 is located at Figure 8 Local storage 810, Figure 1 Memory 115 or Figure 1 In the storage device 120. At block 1915, Figure 1 The local accelerator 135 can be based on the local accelerator 135 Figure 4 The query embedding vector 410 and Figure 3 The document embedding vector 315 is processed (that is, the Figure 4 Similarity search 430) to generate Figure 4 The result 435. Finally, at block 1920, Figure 1 The processor 110 may be based on Figure 1 Local accelerator 135 Figure 4 Results 435 sent Figure 3 Document 305.
[0145] Fig. 20 The invention is shown in accordance with the disclosed embodiment. Figure 8 EMU 805 Prefetch Figure 3 A flowchart of an example process for generating document embedding vectors 315. Fig. 20 In block 2005, Figure 8 The EMU 805 can be optionally used to prefetch Figure 3 The document embedding vector 315 of . Figure 8 The EMU 805 can be based on Figure 1 The local accelerator 135 processes one or more previous queries to select Figure 3 The document embedding vector 315 of . Finally, at box 2010, Figure 8 The EMU 805 can Figure 3 The document embedding vector 315 is obtained from Figure 1 The storage device 120 pre-fetches Figure 1 in the memory 115.
[0146] exist Figures 10 to 20 In the drawings, some embodiments of the disclosure are shown. However, those skilled in the art will recognize that other embodiments of the disclosure are also feasible by changing the order of the boxes, by omitting boxes, or by including links not shown in the drawings. All such changes to the flow charts are considered to be disclosed embodiments, whether explicitly described or not.
[0147] Some disclosed embodiments may include a processor (or local accelerator) for processing queries based on document embedding vectors stored in main memory, and a storage accelerator for processing the same queries based on document embedding vectors stored on a storage device. By using a storage accelerator for processing queries using document embedding vectors stored on a storage device, the disclosed embodiments may provide a technical advantage of reduced main memory requirements (because not all document embedding vectors need to be stored in main memory), resulting in reduced capital expenditures. The disclosed embodiments may also provide a technical advantage in "selecting document embedding vectors to be loaded into main memory to speed up query processing as much as possible."
[0148] Some disclosed embodiments may also include an embedding management unit (EMU) that manages where document embedding vectors are stored. The EMU may load or flush document embedding vectors between a local memory, a main memory, and a storage device (which may not have an associated storage accelerator) of a local accelerator. The disclosed embodiments may provide a technical advantage in that document embedding vectors may be efficiently moved between a local memory, a main memory, and a storage device of a local accelerator to support the local accelerator to process queries using document embedding vectors.
[0149] Information retrieval (IR) systems can use highly trained neural models to encode documents (text, images, audio) into document embedding vectors. Depending on the size of the database (e.g., hundreds of gigabytes to terabytes), the size of the embedding vectors can be very large. As a specific example (and by no means limiting), the embedding vectors generated using ColBERT v1 for a 3GB text dataset are 152GB. These embedding vectors can be preloaded into CPU memory for efficient searching. Therefore, neural IR systems require very large system memory.
[0150] The disclosed embodiments support document embedding vectors that are not present in the system memory used for retrieval. After each retrieval, the embedding vectors can be cached on the system memory using an LFU replacement strategy. During cache hits, the embedding vectors are processed using traditional means in a GPU or other local accelerator. During cache misses, the required embedding vectors can be dynamically read from the SSD ad-hoc and processed in close proximity to the storage device in an FPGA-based computational storage drive (or by any processor in close proximity to the storage device).
[0151] During a partial hit in which some of the embedding vectors are stored in the SSD and some are cached in the system memory, the embedding vectors are processed in parallel in a distributed manner in the GPU and the CSD.
[0152] The disclosed embodiments may allow system memory to be reduced by 80% or more and still retrieve documents with similar latency.
[0153] Ad-Hoc CSD based retrieval and processing and a small DRAM cache can replace the large system memory required to run the IR model. The size of the DRAM cache can be increased or decreased to match the best server cost-performance ratio. Making the cache size larger can increase the average cache hit rate, which can improve the overall retrieval latency.
[0154] By keeping unused embedding vectors in the SSD instead of in the system memory (that is, by generating the embedding vectors offline and storing them in the storage device instead of loading the entire library into the host DRAM), the entire system can be more energy efficient. The cost of the IR system server can be reduced by reducing the size of the required system memory.
[0155] Caching the most frequently used embedding vectors in host DRAM can reduce the amount of data read from the SSD and increase the hit rate of similar sequential queries.
[0156] Processing embedded vectors close to the storage device during a cache miss may allow for reduction of excessive data movement from the SSD to the CPU and round trip to the GPU.
[0157] Processing embedded vectors close to the storage device can also help hide SSD-based latencies due to reduced data movement.
[0158] Distributed processing of embedded vectors in the GPU and CSD can reduce the amount of data to be processed in any one computing unit. Because the GPU only needs to work with cached embedded vectors, the GPU can avoid stalling or waiting for data to arrive from the SSD. Parallel processing in the GPU and CSD can also allow further acceleration in IR systems with SSDs.
[0159] Any language model and any K-nearest neighbor-based similarity search algorithm can be used in conjunction with CSD-based embedding retrieval and processing. Furthermore, CSD-based embedding processing can be extended to any data type, not just text documents.
[0160] The complete IR system process with distributed embedding vector processing can include converting documents (text, images, audio, etc.) into document embedding vectors offline using any machine learning model and saving the generated document embedding vectors to a storage device. The same machine learning model can also be used to convert queries into query embedding vectors. The K nearest neighbor search algorithm can be used to retrieve the most similar documents to reduce processing costs.
[0161] If there is a hit, the actual document embedding vector can be retrieved from the system cache and processed in the GPU. During total cache misses, the FPGA CSD can process the embedding vector close to the storage device. During partial cache hits, the GPU and FPGA can process the embedding vector simultaneously.
[0162] The query embedding vector can be compared to the document embedding vector using cosine similarity or other vector similarity measures.
[0163] The documents can be ranked using the similarity scores, which can be used to retrieve the actual documents.
[0164] Other disclosed embodiments enable document embedding vectors not to be stored in system memory for retrieval. Embedding vectors may be dynamically read from an SSD ad-hoc and cached in system memory for future reference. The cache may follow an LFU replacement policy. The system memory required to run the IR system may be reduced by 80% or more. Embedding vectors may also be loaded directly into accelerator memory for processing by the accelerator. The accelerator may use any desired form: for example, a graphics processing unit (GPU) or a field programmable gate array (FPGA), etc. An embedding management unit (EMU) may manage what embedding vectors are loaded and where they are stored.
[0165] The embedded vector may initially be stored in a cache coherent interconnect solid state drive (SSD). The cache coherent interconnect SSD may use a protocol such as the Compute Express Link (CXL) protocol. Although the disclosed embodiments focus on SSDs, the disclosed embodiments may be extended to any type of cache coherent interconnect storage device and is not limited to CXL SSDs.
[0166] When a query is received, the EMU can determine where the appropriate embedded vector is stored. If the embedded vector is stored in the accelerator memory, the accelerator can continue to process the query. If the embedded vector is stored in the CPU DRAM or CXL SSD, the embedded vector can be transferred to the accelerator memory. Note that this transfer can be completed without the accelerator knowing that the embedded vector has been transferred to the accelerator memory. The accelerator can use a unified address space to access the accelerator memory. If the address used is not in the accelerator memory, the system can automatically transfer the embedded vector to the accelerator memory so that the accelerator can access the embedded vector from its own memory (i.e., the accelerator memory).
[0167] The EMU can also use the embedding vectors appropriate for the query to perform pre-fetching of other embedding vectors from the CXL SSD into the CPU DRAM. That is, given the embedding vectors relevant to the current query, the EMU can pre-fetch other embedding vectors that are expected to be relevant to the upcoming query. Then, if those embedding vectors are relevant to the upcoming query, those embedding vectors can be transferred from the CPU DRAM to the accelerator memory.
[0168] The accelerator memory, CPU DRAM, and CXL SSD may be used as a multi-layer cache. An embedded vector may be loaded into the accelerator memory. When an embedded vector is evicted from the accelerator memory (which may use a least recently used cache management scheme, but other cache management schemes may also be used), the evicted embedded vector may be transferred to the CPU DRAM. The CPU DRAM may also use a cache management scheme (such as a least recently used cache management scheme) to evict the embedded vector back to the CXL SSD. (Note that the embedded vector should not change unless the underlying data changes. Therefore, evicting the embedded vector from the CPU DRAM should not involve writing the data back to the CXL SSD.)
[0169] The EMU can decide how and where to load the embedded vector. If the embedded vector is cached in the GPU memory, no load operation is required. If the embedded vector is cached in the CPU memory, the embedded vector can be loaded from the CPU memory to the GPU memory. If the embedded vector is not already cached, the embedded vector can be read directly from the CXL SSD through fine-grained access to the GPU cache. If part of the embedded vector is in the CPU memory and part of the embedded vector is in the CXL SSD, they can be read simultaneously to saturate the I / O bus bandwidth.
[0170] The disclosed embodiments enable document embedding vectors not to be stored in system memory for retrieval. Embedding vectors may be dynamically read from SSD ad-hoc and cached in system memory for future reference. The cache may follow an LFU replacement policy. The system memory required to run the IR system may be reduced by 80% or more.
[0171] The disclosed embodiments provide efficient use of hardware through multiple layers of embedded cache in GPU, CPU and CXL SSD. EMU can pre-fetch predicted next embedded vectors, which increases cache hit rate. Because GPU / accelerator can directly access CXL SSD without additional data movement through CPU DRAM, the disclosed embodiments can be more energy efficient and provide low latency.
[0172] The following discussion is intended to provide a brief general description of one or more suitable machines in which specific aspects of the disclosure may be implemented. One or more machines may be controlled at least in part by input from conventional input devices (such as keyboards, mice, etc.) and by instructions received from another machine, interaction with a virtual reality (VR) environment, biometric feedback, or other input signals. As used herein, the term "machine" is intended to broadly include a single machine, a virtual machine, or a system of machines, virtual machines, or devices that operate together in a communicative manner. Exemplary machines include computing devices (such as personal computers, workstations, servers, portable computers, handheld devices, phones, tablet computers, etc.) and transportation devices (such as private or public transportation (e.g., cars, trains, taxis, etc.)).
[0173] One or more machines may include embedded controllers (such as programmable or non-programmable logic devices or arrays, application specific integrated circuits (ASICs), embedded computers, smart cards, etc.). One or more machines may utilize one or more connections (such as through a network interface, modem, or other communication combination) to one or more remote machines. The machines may be interconnected by way of physical networks and / or logical networks (such as intranets, the Internet, local area networks, wide area networks, etc.). Those skilled in the art will appreciate that network communications may utilize a variety of wired and / or wireless short-range or long-range carriers and protocols (including radio frequency (RF), satellite, microwave, Institute of Electrical and Electronics Engineers (IEEE) 802.11, optical, infrared, cable, laser, etc.).
[0174] Embodiments of the present disclosure may be described by reference to or in conjunction with associated data, which includes functions, programs, data structures, applications, etc., which, when accessed by a machine, cause the machine to perform tasks or define abstract data types or low-level hardware contexts. The associated data may be stored in, for example, volatile memory and / or non-volatile memory (e.g., RAM, ROM, etc.), or in other storage devices and their associated storage media (including hard disk drives, floppy disks, optical storage devices, tapes, flash memory, memory sticks, digital video disks, bio-storage devices, etc.). The associated data may be transmitted in a transmission environment (including a physical network and / or a logical network) in the form of packets, serial data, parallel data, propagation signals, etc., and may be used in a compressed format or an encrypted format. The associated data may be used in a distributed environment and may be stored locally and / or remotely for machine access.
[0175] The disclosed embodiments may include a tangible, non-transitory machine-readable medium including instructions executable by one or more processors, the instructions including instructions for performing elements of the disclosure as described herein.
[0176] The various operations of the methods described above may be performed by any suitable means capable of performing the operations (such as various hardware and / or one or more software components, circuits and / or one or more modules). Software may include an ordered list of executable instructions for implementing logical functions and may be implemented in any "processor-readable medium" to be used by or in conjunction with an instruction execution system, device or apparatus (such as a single-core or multi-core processor or a system containing a processor).
[0177] The blocks or steps of the methods or algorithms and functions described in conjunction with the embodiments disclosed herein may be implemented directly in hardware, in software modules executed by a processor, or in a combination of the two. If implemented in software, the functions may be stored on or sent through a tangible, non-transitory computer-readable medium as one or more instructions or codes. The software module may reside in a random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disks, removable disks, CD ROMs, or any other form of storage medium known in the art.
[0178] Having described and illustrated the principles of the disclosure with reference to the illustrated embodiments, it will be appreciated that the illustrated embodiments may be modified in arrangement and detail without departing from such principles, and may be combined in any desired manner. Also, although the foregoing discussion has focused on specific embodiments, other configurations are contemplated. Specifically, although expressions such as "according to the disclosed embodiments" are used herein, these phrases are meant to relate generally to embodiment possibilities, and are not intended to limit the disclosure to specific embodiment configurations. As used herein, these terms may relate to the same or different embodiments that may be combined into other embodiments.
[0179] The foregoing illustrative embodiments should not be construed as limiting the disclosure thereof. Although some embodiments have been described, it will be readily appreciated by those skilled in the art that many modifications are feasible to those embodiments without substantially departing from the novel teachings and advantages of the present disclosure. Therefore, all such modifications are intended to be included within the scope of the present disclosure as defined in the claims.
[0180] The disclosed embodiments extend to the following statements without limitation:
[0181] Statement 1. The disclosed embodiments include a system, comprising:
[0182] A storage device, the storage device stores the document embedding vector;
[0183] an accelerator, connected to the storage device, the accelerator being configured to process the query embedding vector and the document embedding vector; and
[0184] A processor is connected to the storage device and the accelerator, and the processor is configured to send the query embedding vector to the accelerator.
[0185] Statement 2. The disclosed embodiments include a system as described in statement 1, wherein the system includes an information retrieval system configured to return documents based at least in part on a query associated with a query embedding vector.
[0186] Statement 3. The disclosed embodiments include the system of statement 2, wherein the processor is configured to: generate a query embedding vector based at least in part on the query.
[0187] Statement 4. The disclosed embodiment includes the system according to statement 2, further comprising: a document associated with a document embedding vector.
[0188] Statement 5. A disclosed embodiment includes the system of statement 4, wherein the storage device stores the document.
[0189] Statement 6. The disclosed embodiment includes the system according to statement 4, further comprising: a second storage device for storing the document.
[0190] Statement 7. A disclosed embodiment includes the system of statement 4, wherein:
[0191] The system further includes: a memory storing a second document embedding vector; and
[0192] The processor is configured to process the query embedding vector and the second document embedding vector.
[0193] Statement 8. A disclosed embodiment includes the system of statement 7, wherein the storage device stores a second document associated with the second document embedding vector.
[0194] Statement 9. The disclosed embodiment includes the system according to statement 7, further comprising: a second storage device that stores a second document associated with a second document embedding vector.
[0195] Statement 10. A disclosed embodiment includes the system of statement 1 wherein the storage device comprises a solid state drive (SSD).
[0196] Statement 11. A disclosed embodiment includes the system of statement 1, wherein the storage device includes an accelerator.
[0197] Statement 12. The disclosed embodiment includes the system according to statement 1, further comprising: a computing storage unit, the computing storage unit including a storage device and an accelerator.
[0198] Statement 13. The disclosed embodiments include a system according to statement 1, wherein the accelerator includes a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SoC), a graphics processing unit (GPU), a general purpose GPU (GPGPU), a tensor processing unit (TPU), a neural processing unit (NPU), or a central processing unit (CPU).
[0199] Statement 14. A disclosed embodiment includes the system of statement 1, further comprising: a second accelerator, the second accelerator comprising a processor.
[0200] Statement 15. The disclosed embodiments include the system of statement 14, wherein the processor includes an FPGA, an ASIC, a SoC, a GPU, a GPGPU, a TPU, an NPU, or a CPU.
[0201] Statement 16. The disclosed embodiments include the system of statement 1, wherein the accelerator is configured to: perform a similarity search using the query embedding vector and the document embedding vector to produce a result.
[0202] Statement 17. The disclosed embodiment includes the system of statement 16, wherein the processor is configured to: perform a second similarity search using the query embedding vector and the second document embedding vector to generate a second result.
[0203] Statement 18. The disclosed embodiment includes the system according to statement 17, further comprising: a memory including a second document embedding vector.
[0204] Statement 19. A disclosed embodiment includes the system of statement 17, wherein the processor is configured to: combine the result and the second result.
[0205] Statement 20. A disclosed embodiment includes the system of statement 1, wherein the processor is configured to copy the document embedding vector to the memory based at least in part on the accelerator comparing the query embedding vector to the document embedding vector.
[0206] Statement 21. A disclosed embodiment includes the system of statement 20, wherein the processor is configured to: evict the second document embedding vector from the memory using an eviction strategy.
[0207] Statement 22. A disclosed embodiment comprises the system of statement 21 wherein the eviction policy comprises a least frequently used (LFU) eviction policy or a least recently used (LRU) eviction policy.
[0208] Statement 23. A disclosed embodiment includes the system of statement 20, wherein the processor is configured to: copy the document embedding vector to the memory based at least in part on the selection strategy.
[0209] Statement 24. A disclosed embodiment comprises the system of statement 23, wherein the selection policy comprises a most frequently used (MFU) selection policy or a most recently used (MRU) selection policy.
[0210] Statement 25. A disclosed embodiment includes the system of statement 1 wherein the processor is configured to: receive the query from a host.
[0211] Statement 26. A disclosed embodiment includes the system of statement 25, wherein the processor is configured to: send the document to a host.
[0212] Statement 27. A disclosed embodiment includes the system of statement 26 wherein the document is based at least in part on results received from an accelerator.
[0213] Statement 28. The disclosed embodiments include a method comprising:
[0214] identifying, at a processor, a query embedding vector;
[0215] Determining that the document embedding vector is stored on a storage device;
[0216] sending the query embedding vector to an accelerator connected to the storage device;
[0217] receiving the results from the storage device; and
[0218] The document is sent based at least in part on the results.
[0219] Statement 29. A disclosed embodiment includes the method of statement 28 wherein the storage device comprises a solid state drive (SSD).
[0220] Statement 30. A disclosed embodiment includes the method of statement 28 wherein the storage device comprises an accelerator.
[0221] Statement 31. The disclosed embodiment includes the method of statement 28, wherein the step of sending the query embedding vector to an accelerator connected to a storage device includes: sending the query embedding vector to a computational storage unit, the computational storage unit including the storage device and the accelerator.
[0222] Statement 32. The disclosed embodiments include the method of statement 28, wherein the accelerator comprises a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SoC), a graphics processing unit (GPU), a general purpose GPU (GPGPU), a tensor processing unit (TPU), a neural processing unit (NPU), or a central processing unit (CPU).
[0223] Statement 33. The disclosed embodiments include the method of statement 28, wherein the processor comprises an FPGA, an ASIC, a SoC, a GPU, a GPGPU, a TPU, an NPU, or a CPU.
[0224] Statement 34. A disclosed embodiment includes the method of statement 28 wherein the step of identifying the query embedding vector comprises:
[0225] receiving a query at a processor; and
[0226] A query embedding vector is generated based at least in part on the query.
[0227] Statement 35. A disclosed embodiment includes the method of statement 34, wherein:
[0228] The step of receiving the query at the processor includes: receiving the query at the processor from the host; and
[0229] The step of transmitting the document based at least in part on the result includes transmitting the document to a host based at least in part on the result.
[0230] Statement 36. The disclosed embodiments include the method of statement 34, wherein the step of generating a query embedding vector based at least in part on the query comprises: generating a query embedding vector at a processor based at least in part on the query.
[0231] Statement 37. A disclosed embodiment includes the method of statement 28 wherein a document embedding vector is associated with the document.
[0232] Statement 38. A disclosed embodiment includes the method of statement 28 wherein sending the document based at least in part on the result comprises retrieving the document from a storage device.
[0233] Statement 39. A disclosed embodiment includes the method of statement 28 wherein sending the document based at least in part on the result comprises retrieving the document from a second storage device.
[0234] Statement 40. A disclosed embodiment includes the method of statement 28, wherein:
[0235] The method further includes: processing the query embedding vector and the second document embedding vector to generate a second result; and
[0236] The step of sending the document based at least in part on the result comprises:
[0237] combining the result and a second result to produce a combined result; and
[0238] The document is sent based at least in part on the combined result.
[0239] Statement 41. The disclosed embodiment includes a method according to statement 40, wherein the step of processing the query embedding vector and the second document embedding vector to produce a second result includes: processing the query embedding vector and the second document embedding vector stored in a memory to produce a second result.
[0240] Statement 42. A disclosed embodiment includes the method of statement 40, wherein:
[0241] The accelerator is configured to: perform a first similarity search using the query embedding vector and the document embedding vector to produce a result; and
[0242] The step of processing the query embedding vector and the second document embedding vector to produce a second result includes: performing a second similarity search using the query embedding vector and the second document embedding vector to generate a second result.
[0243] Statement 43. A disclosed embodiment includes the method of statement 28, further comprising: copying the document embedding vector from the storage device to the memory.
[0244] Statement 44. A disclosed embodiment includes the method of statement 43 wherein the step of copying the document embedding vector from the storage device to the memory comprises: selecting the document embedding vector for copying from the storage device to the memory.
[0245] Statement 45. The disclosed embodiment includes a method according to statement 44, wherein the step of selecting a document embedding vector for copying from a storage device to a memory includes: using a most frequently used (MFU) selection strategy or a most recently used (MRU) selection strategy to select a document embedding vector for copying from the storage device to the memory.
[0246] Statement 46. A disclosed embodiment includes the method of statement 43, further comprising: evicting the second document embedding vector from the memory.
[0247] Statement 47. A disclosed embodiment includes the method of statement 46, wherein the step of evicting the second document embedding vector from the memory comprises: selecting the second document embedding vector for eviction from the memory.
[0248] Statement 48. The disclosed embodiment includes the method according to statement 47, wherein the step of selecting a second document embedding vector for eviction from the memory includes: using a least frequently used (LFU) eviction strategy or a least recently used (LRU) eviction strategy to select the second document embedding vector for eviction from the memory.
[0249] Statement 49. The disclosed embodiments include a method comprising:
[0250] receiving a query embedding vector from a processor at an accelerator, the accelerator being coupled to a storage device;
[0251] Accessing, by the accelerator, the document embedding vector from the storage device;
[0252] performing, by the accelerator, a similarity search using the query embedding vector and the document embedding vector to produce a result; and
[0253] The results are sent from the accelerator to the processor.
[0254] Statement 50. A disclosed embodiment includes the method of statement 49 wherein the storage device comprises a solid state drive (SSD).
[0255] Statement 51. A disclosed embodiment includes the method of statement 49 wherein the storage device comprises an accelerator.
[0256] Statement 52. The disclosed embodiments include the method of statement 49, wherein the step of receiving the query embedding vector from the processor at the accelerator includes: receiving the query embedding vector from the processor at a computational storage unit, the computational storage unit including a storage device and an accelerator.
[0257] Statement 53. The disclosed embodiments include the method of statement 49, wherein the accelerator comprises a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SoC), a graphics processing unit (GPU), a general purpose GPU (GPGPU), a tensor processing unit (TPU), a neural processing unit (NPU), or a central processing unit (CPU).
[0258] Statement 54. A disclosed embodiment comprises the method of statement 49, further comprising:
[0259] receiving, from a processor, a request for a document associated with a document embedding vector;
[0260] accessing, from a storage device, the document associated with the document embedding vector; and
[0261] The document is returned from the storage device to the processor.
[0262] Statement 55. A disclosed embodiment includes the method of statement 49, further comprising:
[0263] receiving a request for a document embedding vector from a processor;
[0264] accessing the document embedding vector from storage; and
[0265] Send the document embedding vector to the processor.
[0266] Statement 56. The disclosed embodiments include an article comprising a non-transitory storage medium having stored thereon instructions that, when executed by a machine, cause:
[0267] identifying, at a processor, a query embedding vector;
[0268] Determining that the document embedding vector is stored on a storage device;
[0269] sending the query embedding vector to an accelerator connected to the storage device;
[0270] receiving the results from the storage device; and
[0271] The document is sent based at least in part on the results.
[0272] Statement 57. A disclosed embodiment includes the article of statement 56, wherein the storage device comprises a solid state drive (SSD).
[0273] Statement 58. A disclosed embodiment includes the article of statement 56, wherein the storage device comprises an accelerator.
[0274] Statement 59. The disclosed embodiment includes an article according to statement 56, wherein the process of sending the query embedding vector to an accelerator connected to a storage device includes: sending the query embedding vector to a computational storage unit, the computational storage unit including the storage device and the accelerator.
[0275] Statement 60. The disclosed embodiments include an article according to statement 56, wherein the accelerator comprises a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SoC), a graphics processing unit (GPU), a general purpose GPU (GPGPU), a tensor processing unit (TPU), a neural processing unit (NPU), or a central processing unit (CPU).
[0276] Statement 61. The disclosed embodiments include an article according to statement 56, wherein the processor includes an FPGA, an ASIC, a SoC, a GPU, a GPGPU, a TPU, an NPU, or a CPU.
[0277] Statement 62. A disclosed embodiment comprises the article of statement 56, wherein the process of identifying the query embedding vector comprises:
[0278] receiving a query at a processor; and
[0279] A query embedding vector is generated based at least in part on the query.
[0280] Statement 63. A disclosed embodiment includes the article of statement 62, wherein:
[0281] The process of receiving the query at the processor includes: receiving the query at the processor from the host; and
[0282] Sending the document based at least in part on the result includes sending the document to a host based at least in part on the result.
[0283] Statement 64. A disclosed embodiment includes an article as described in statement 62, wherein the processing of generating a query embedding vector based at least in part on the query includes: generating a query embedding vector at a processor based at least in part on the query.
[0284] Statement 65. A disclosed embodiment comprises the article of claim 56, wherein the storage device includes a document embedding vector associated with the document.
[0285] Statement 66. A disclosed embodiment comprises the article of statement 56 wherein the processing of sending the document based at least in part on the result comprises: retrieving the document from a storage device.
[0286] Statement 67. A disclosed embodiment includes the article of statement 56 wherein the processing of sending the document based at least in part on the result includes: retrieving the document from a second storage device.
[0287] Statement 68. A disclosed embodiment includes the article of statement 56, wherein:
[0288] a non-transitory storage medium having further instructions stored thereon that, when executed by the machine, cause the query embedding vector and the second document embedding vector to be processed to produce a second result; and
[0289] Sending the document based at least in part on the result includes:
[0290] combining the result and a second result to produce a combined result; and
[0291] The document is sent based at least in part on the combined result.
[0292] Statement 69. The disclosed embodiments include an article according to statement 68, wherein processing the query embedding vector and the second document embedding vector to produce a second result includes: processing the query embedding vector and the second document embedding vector stored in a memory to produce a second result.
[0293] Statement 70. A disclosed embodiment includes the article of statement 68, wherein:
[0294] The accelerator is configured to: perform a first similarity search using the query embedding vector and the document embedding vector to produce the result; and
[0295] Processing the query embedding vector and the second document embedding vector to produce a second result includes performing a second similarity search using the query embedding vector and the second document embedding vector to generate a second result.
[0296] Statement 71. A disclosed embodiment includes the article of statement 56, a non-transitory storage medium having further instructions stored thereon that, when executed by a machine, cause copying of the document embedding vector from storage to memory.
[0297] Statement 72. A disclosed embodiment includes the article of claim 71 wherein the process of copying the document embedding vector from the storage device to the memory comprises: selecting the document embedding vector for copying from the storage device to the memory.
[0298] Statement 73. The disclosed embodiments include an article according to statement 72, wherein the process of selecting a document embedding vector for copying from a storage device to a memory includes: using a most frequently used (MFU) selection strategy or a most recently used (MRU) selection strategy to select a document embedding vector for copying from the storage device to the memory.
[0299] Statement 74. A disclosed embodiment includes the article of statement 71, a non-transitory storage medium having further instructions stored thereon that, when executed by a machine, cause the second document embedding vector to be evicted from the memory.
[0300] Statement 75. A disclosed embodiment includes the article of claim 74, wherein the process of evicting the second document embedding vector from the memory includes: selecting the second document embedding vector for eviction from the memory.
[0301] Statement 76. The disclosed embodiment includes an article according to statement 75, wherein the process of selecting a second document embedding vector for eviction from memory includes: using a least frequently used (LFU) eviction strategy or a least recently used (LRU) eviction strategy to select the second document embedding vector for eviction from memory.
[0302] Statement 77. The disclosed embodiments include an article comprising a non-transitory storage medium having stored thereon instructions that, when executed by a machine, cause:
[0303] receiving a query embedding vector from a processor at an accelerator, the accelerator being coupled to a storage device;
[0304] Accessing, by the accelerator, the document embedding vector from the storage device;
[0305] performing, by the accelerator, a similarity search using the query embedding vector and the document embedding vector to produce a result; and
[0306] The results are sent from the accelerator to the processor.
[0307] Statement 78. A disclosed embodiment includes the article of statement 77, wherein the storage device comprises a solid state drive (SSD).
[0308] Statement 79. A disclosed embodiment includes the article of statement 77 wherein the storage device comprises an accelerator.
[0309] Statement 80. The disclosed embodiments include the article of claim 77, wherein the processing of receiving the query embedding vector from the processor at the accelerator comprises: receiving the query embedding vector from the processor at a computational storage unit, the computational storage unit comprising a storage device and an accelerator.
[0310] Statement 81. The disclosed embodiments include an article according to statement 77, wherein the accelerator comprises a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SoC), a graphics processing unit (GPU), a general purpose GPU (GPGPU), a tensor processing unit (TPU), a neural processing unit (NPU), or a central processing unit (CPU).
[0311] Statement 82. A disclosed embodiment includes the article of statement 77, a non-transitory storage medium having further instructions stored thereon, which, when executed by a machine, cause:
[0312] receiving, from a processor, a request for a document associated with a document embedding vector;
[0313] accessing, from a storage device, the document associated with the document embedding vector; and
[0314] The document is returned from the storage device to the processor.
[0315] Statement 83. A disclosed embodiment includes the article of statement 77, a non-transitory storage medium having further instructions stored thereon, which, when executed by a machine, cause:
[0316] receiving a request for a document embedding vector from a processor;
[0317] accessing the document embedding vector from storage; and
[0318] Send the document embedding vector to the processor.
[0319] Statement 84. The disclosed embodiments include a system comprising:
[0320] a processor, the processor including a local memory;
[0321] a memory, connected to the processor;
[0322] a cache coherent interconnect storage device connected to the processor; and
[0323] An embedding management unit (EMU) configured to manage storage of document embedding vectors in a local memory, a storage, or a cache coherent interconnect storage device.
[0324] Statement 85. A disclosed embodiment comprises the system of statement 84 wherein the cache coherent interconnect storage device comprises a compute express link (CXL) storage device.
[0325] Statement 86. A disclosed embodiment includes the system of statement 85 wherein the CXL storage device comprises a CXL solid state drive (SSD).
[0326] Statement 87. A disclosed embodiment comprises the system of statement 84 wherein the local memory, the memory, and the cache coherent interconnect storage form a unified memory space.
[0327] Statement 88. A disclosed embodiment includes the system of statement 84, wherein the EMU is configured to: copy the document embedding vector to the local memory based at least in part on the query.
[0328] Statement 89. A disclosed embodiment includes the system of statement 88 wherein the EMU is configured to copy the document embedding vector from the memory or cache coherent interconnect storage device to the local memory based at least in part on the query.
[0329] Statement 90. A disclosed embodiment includes the system of statement 88 wherein the EMU is configured to: copy the document embedding vector from memory to local memory based at least in part on the query, and delete the document embedding vector from memory.
[0330] Statement 91. A disclosed embodiment includes the system of statement 88 wherein the EMU is further configured to: evict the second document embedding vector from the local memory using an eviction policy.
[0331] Statement 92. A disclosed embodiment comprises the system of statement 91 wherein the eviction policy comprises a least frequently used (LFU) eviction policy or a least recently used (LRU) eviction policy.
[0332] Statement 93. A disclosed embodiment includes the system of statement 91 wherein the EMU is configured to copy the second document embedding vector from the local memory to the memory using an eviction policy.
[0333] Statement 94. A disclosed embodiment comprises the system of statement 88 wherein the EMU is further configured to: evict the second document embedding vector from the memory using an eviction policy.
[0334] Statement 95. A disclosed embodiment comprises the system of statement 94 wherein the eviction policy comprises a least frequently used (LFU) eviction policy or a least recently used (LRU) eviction policy.
[0335] Statement 96. A disclosed embodiment comprises the system of statement 84 wherein the EMU is configured to: prefetch the second document embedding vector from the cache coherent interconnect storage device into the memory.
[0336] Statement 97. A disclosed embodiment includes the system of statement 96 wherein the EMU is configured to prefetch the second document embedding vector from the cache coherent interconnect storage device into the memory based at least in part on the query.
[0337] Statement 98. A disclosed embodiment includes the system of statement 97 wherein the query comprises a previous query.
[0338] Statement 99. The disclosed embodiment includes the system of statement 84, further comprising: an accelerator including a processor.
[0339] Statement 100. The disclosed embodiments include a system according to statement 99, wherein the processor includes a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SoC), a graphics processing unit (GPU), a general purpose GPU (GPGPU), a tensor processing unit (TPU), a neural processing unit (NPU), or a central processing unit (CPU).
[0340] Statement 101. The disclosed embodiments include a system according to statement 84, wherein the processor is configured to: generate a query embedding vector based at least in part on the query, and process the query embedding vector and the document embedding vector.
[0341] Statement 102. A disclosed embodiment includes the system of statement 101 wherein the local memory includes document embedding vectors.
[0342] Statement 103. The disclosed embodiments include the system of statement 101, wherein the processor is configured to: perform a similarity search using the query embedding vector and the document embedding vector to generate a result.
[0343] Statement 104. A disclosed embodiment includes the system of statement 101 wherein the processor is configured to: access the document embedding vector from local memory.
[0344] Statement 105. A disclosed embodiment includes the system of statement 101 wherein the processor is configured to: access the document embedding vector from the memory.
[0345] Statement 106. A disclosed embodiment includes the system of statement 101 wherein the processor is configured to: access the document embedding vector from a cache coherent interconnect storage device.
[0346] Statement 107. The disclosed embodiment includes a system according to statement 84, further comprising: an accelerator connected to a cache coherent interconnect storage device, the accelerator being configured to process a query embedding vector and a document embedding vector stored on the cache coherent interconnect storage device and generate a result.
[0347] Statement 108. A disclosed embodiment includes the system of statement 107 wherein the processor is configured to: send a document based at least in part on the result of the accelerator.
[0348] Statement 109. The disclosed embodiments include the system of statement 107, wherein the processor is configured to: perform processing on the query embedding vector and the second document embedding vector to generate a second result.
[0349] Statement 110. A disclosed embodiment includes the system of statement 109 wherein the processor is configured to combine the result of the accelerator and the second result to produce a combined result.
[0350] Statement 111. A disclosed embodiment includes the system of statement 110, wherein the processor is configured to: send the document based at least in part on the combined result.
[0351] Statement 112. The disclosed embodiments include a method comprising:
[0352] identifying, at a processor, a query embedding vector;
[0353] Locating the document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of a processor using an embedding management unit (EMU);
[0354] processing the query embedding vector and the document embedding vector to produce a result; and
[0355] The document is sent based at least in part on the results.
[0356] Statement 113. A disclosed embodiment includes the method of statement 112 wherein the cache coherent interconnect storage device comprises a compute express link (CXL) storage device.
[0357] Statement 114. A disclosed embodiment includes the method of statement 113 wherein the CXL storage device comprises a CXL solid state drive (SSD).
[0358] Statement 115. A disclosed embodiment includes the method of statement 112 wherein the local memory, the memory, and the cache coherent interconnect storage form a unified memory space.
[0359] Statement 116. A disclosed embodiment includes the method of statement 112, wherein:
[0360] The step of locating the document embedding vector using EMU includes: locating the document embedding vector in a local memory of a processor using EMU; and
[0361] The step of processing the query embedding vector and the document embedding vector to generate the result includes: processing the query embedding vector and the document embedding vector in the local memory to generate the result.
[0362] Statement 117. The disclosed embodiment includes the method according to statement 112, wherein the step of locating the document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of a processor using EMU includes: locating the document embedding vector in a memory or a cache coherent interconnect storage device using EMU.
[0363] Statement 118. The disclosed embodiment includes a method according to statement 117, wherein the step of processing the query embedding vector and the document embedding vector to produce the result includes: processing the query embedding vector and the document embedding vector in a memory or a cache coherent interconnect storage device to produce the result.
[0364] Statement 119. A disclosed embodiment includes the method of statement 118, wherein the step of processing the query embedding vector and the document embedding vector to produce the result comprises:
[0365] copying the document embedding vector from the memory or cache coherent interconnect storage device to the local memory; and
[0366] The query embedding vector and the document embedding vector in the local memory are processed to produce the result.
[0367] Statement 120. A disclosed embodiment includes the method of statement 119 wherein the step of copying the document embedding vector from the memory or cache coherent interconnect storage device to the local memory comprises:
[0368] selecting a second document embedding vector for eviction in the local memory using an eviction strategy;
[0369] The second document embedding vector is copied from local storage to memory.
[0370] Statement 121. The disclosed embodiment includes a method according to statement 120, wherein the step of selecting a second document embedding vector for eviction in the local memory using an eviction strategy includes: selecting the second document embedding vector for eviction from the local memory using a least frequently used (LFU) eviction strategy or a least recently used (LRU) eviction strategy.
[0371] Statement 122. A disclosed embodiment includes the method of statement 120 wherein the step of copying the second document embedding vector from the local memory to the memory comprises:
[0372] selecting a third document embedding vector in the memory for eviction using a second eviction strategy; and
[0373] Delete the third document embedding vector from memory.
[0374] Statement 123. The disclosed embodiment includes a method according to statement 122, wherein the step of selecting a third document embedding vector for eviction in the memory using a second eviction strategy includes: selecting a third document embedding vector for eviction in the memory using an LFU eviction strategy or an LRU eviction strategy.
[0375] Statement 124. The disclosed embodiments include the method of statement 112, further comprising: pre-fetching the second document embedding vector from the cache coherent interconnect storage device into the memory based at least in part on the query associated with the query embedding vector.
[0376] Statement 125. The disclosed embodiments include an article comprising a non-transitory storage medium having stored thereon instructions that, when executed by a machine, cause:
[0377] identifying, at a processor, a query embedding vector;
[0378] Locating the document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of a processor using an embedding management unit (EMU);
[0379] Processing the query embedding vector and the document embedding vector to produce a result; and
[0380] The document is sent based at least in part on the results.
[0381] Statement 126. A disclosed embodiment comprises the article of statement 125 wherein the cache coherent interconnect storage device comprises a compute express link (CXL) storage device.
[0382] Statement 127. A disclosed embodiment includes the article of statement 126, wherein the CXL storage device comprises a CXL solid state drive (SSD).
[0383] Statement 128. A disclosed embodiment comprises the article of statement 125 wherein the local memory, the memory, and the cache coherent interconnect storage form a unified memory space.
[0384] Statement 129. A disclosed embodiment includes the article of statement 125, wherein:
[0385] The process of locating the document embedding vector using EMU includes: locating the document embedding vector in a local memory of a processor using EMU; and
[0386] The process of processing the query embedding vector and the document embedding vector to generate the result includes: processing the query embedding vector and the document embedding vector in the local memory to generate the result.
[0387] Statement 130. The disclosed embodiments include an article according to statement 125, wherein the processing of locating the document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of a processor using EMU includes: locating the document embedding vector in a memory or a cache coherent interconnect storage device using EMU.
[0388] Statement 131. The disclosed embodiments include an article according to statement 130, wherein the processing of the query embedding vector and the document embedding vector to produce the result includes: processing the query embedding vector and the document embedding vector in a memory or a cache coherent interconnect storage device to produce the result.
[0389] Statement 132. A disclosed embodiment comprises the article of statement 131, wherein processing the query embedding vector and the document embedding vector to produce the result comprises:
[0390] copying the document embedding vector from the memory or cache coherent interconnect storage device to the local memory; and
[0391] The query embedding vector and the document embedding vector in the local memory are processed to produce the result.
[0392] Statement 133. A disclosed embodiment comprises the article of statement 132, wherein the process of copying the document embedding vector from the memory or cache coherent interconnect storage device to the local memory comprises:
[0393] selecting a second document embedding vector for eviction in the local memory using an eviction strategy;
[0394] The second document embedding vector is copied from local storage to memory.
[0395] Statement 134. The disclosed embodiments include an article according to statement 133, wherein the processing of selecting a second document embedding vector for eviction in the local memory using an eviction policy includes: selecting the second document embedding vector for eviction from the local memory using a least frequently used (LFU) eviction policy or a least recently used (LRU) eviction policy.
[0396] Statement 135. A disclosed embodiment comprises the article of statement 133, wherein the process of copying the second document embedding vector from the local memory to the memory comprises:
[0397] selecting a third document embedding vector in the memory for eviction using a second eviction strategy; and
[0398] Delete the third document embedding vector from memory.
[0399] Statement 136. The disclosed embodiment includes an article according to statement 135, wherein the processing of selecting a third document embedding vector for eviction in memory using a second eviction strategy includes: selecting a third document embedding vector for eviction in memory using an LFU eviction strategy or an LRU eviction strategy.
[0400] Statement 137. The disclosed embodiments include an article according to statement 125, a non-transitory storage medium having additional instructions stored thereon, which, when executed by a machine, cause a second document embedding vector to be pre-fetched from a cache coherent interconnect storage device into a memory based at least in part on a query associated with the query embedding vector.
[0401] Therefore, in view of the wide variety of permutations to the embodiments described herein, this detailed description and accompanying materials are intended to be illustrative only and should not be taken as limiting the scope of the disclosure. Therefore, what is claimed is all such modifications that may fall within the scope and spirit of the appended claims and their equivalents.
Claims
1. An electronic system, include: a processor, the processor including a local memory; a memory, connected to the processor; a cache coherent interconnect storage device connected to the processor; as well as An embedding management unit is configured to manage storage of the first document embedding vector in a local memory, a storage, or a cache coherent interconnect storage device.
2. The electronic system according to claim 1, in, The cache coherent interconnect storage device includes: a computing fast link storage device.
3. The electronic system according to claim 1, in, Local memory, storage and cache coherent interconnect storage form a unified memory space.
4. The electronic system according to claim 1, in, The embedding management unit is further configured to copy the first document embedding vector to a local memory based at least in part on the query.
5. The electronic system according to claim 4, in, The embedding management unit is further configured to evict the second document embedding vector from the local memory using an eviction strategy.
6. The electronic system according to claim 5, in, The embedding management unit is further configured to copy the second document embedding vector from the local memory to the memory using an eviction strategy.
7. The electronic system according to claim 4, in, The embedding management unit is further configured to evict the second document embedding vector from the memory using an eviction strategy.
8. The electronic system according to claim 1, in, The embedding management unit is further configured to pre-fetch the second document embedding vector from the cache coherent interconnect storage device into the memory.
9. The electronic system according to claim 1, further comprising: include: An accelerator comprises the processor.
10. The electronic system according to claim 1, in, The processor is configured to generate a query embedding vector based at least in part on the query, and process the query embedding vector and the first document embedding vector.
11. The electronic system according to claim 10, in, The processor is further configured to perform a similarity search using the query embedding vector and the first document embedding vector to generate a result.
12. The electronic system according to claim 10, in, The processor is further configured to access the first document embedding vector from the local memory.
13. A method for embedding vector retrieval, include: identifying, at a processor, a query embedding vector; locating, using an embedding management unit, a first document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of a processor; Processing the query embedding vector and the first document embedding vector to produce a result; and The document is sent based at least in part on the results.
14. The method according to claim 13, in, The step of locating the first document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of a processor using an embedding management unit includes locating the first document embedding vector in a memory or a cache coherent interconnect storage device using an embedding management unit.
15. The method according to claim 14, in, The step of processing the query embedding vector and the first document embedding vector to produce the result includes: processing the query embedding vector and the first document embedding vector in a memory or a cache coherent interconnect storage device to produce the result.
16. The method according to claim 15, in, The step of processing the query embedding vector and the first document embedding vector to generate the result comprises: copying the first document embedding vector from the memory or cache coherent interconnect storage device to the local memory; and The query embedding vector and the first document embedding vector in the local memory are processed to produce the result.
17. The method according to claim 13, further comprising: include: A second document embedding vector is pre-fetched from a cache coherent interconnect storage device into a memory based at least in part on a query associated with the query embedding vector.
18. An article for embedded vector retrieval, the article comprising a non-transitory storage medium having instructions stored thereon, which, when executed by a machine, cause: identifying, at a processor, a query embedding vector; locating the document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of a processor using an embedding management unit; Processing the query embedding vector and the document embedding vector to produce a result; and The document is sent based at least in part on the results.
19. The article according to claim 18, in, The process of locating the document embedding vector in a memory, a cache coherent interconnect storage device, or a local memory of a processor using an embedding management unit includes locating the document embedding vector in a memory or a cache coherent interconnect storage device using an embedding management unit.
20. The article according to claim 19, in, The process of processing the query embedding vector and the document embedding vector to generate the result includes: copying the document embedding vector from the memory or cache coherent interconnect storage device to the local memory; and The query embedding vector and the document embedding vector in the local memory are processed to produce the result.
