From 945452e66ea053c47bbfec929cff28ceb9915e65 Mon Sep 17 00:00:00 2001 From: Ishan Chattopadhyaya Date: Sun, 17 Mar 2024 12:24:57 +0530 Subject: [PATCH] Initial import --- LICENSE.txt | 226 ++++++++++++++++++ README.md | 52 +++- cuda/.gitignore | 2 + cuda/CMakeLists.txt | 48 ++++ cuda/build.sh | 41 ++++ cuda/cmake/thirdparty/fetch_rapids.cmake | 21 ++ cuda/cmake/thirdparty/get_raft.cmake | 63 +++++ cuda/pom.xml | 101 ++++++++ cuda/src/CudaIndexJni.cu | 97 ++++++++ ...ale_lucene_vectorsearch_jni_CuVSIndexJni.h | 29 +++ lucene/pom.xml | 127 ++++++++++ lucene/query.txt | 1 + .../vectorsearch/CuVSIndexSearcher.java | 75 ++++++ .../LuceneVectorSearchExample.java | 148 ++++++++++++ .../lucene/vectorsearch/jni/CuVSIndexJni.java | 12 + .../lucene/vectorsearch/jni/JavaUtils.java | 103 ++++++++ pom.xml | 24 ++ query.txt | 1 + 18 files changed, 1169 insertions(+), 2 deletions(-) create mode 100644 LICENSE.txt create mode 100644 cuda/.gitignore create mode 100644 cuda/CMakeLists.txt create mode 100755 cuda/build.sh create mode 100644 cuda/cmake/thirdparty/fetch_rapids.cmake create mode 100644 cuda/cmake/thirdparty/get_raft.cmake create mode 100644 cuda/pom.xml create mode 100644 cuda/src/CudaIndexJni.cu create mode 100644 cuda/src/com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni.h create mode 100644 lucene/pom.xml create mode 100644 lucene/query.txt create mode 100644 lucene/src/main/java/com/searchscale/lucene/vectorsearch/CuVSIndexSearcher.java create mode 100644 lucene/src/main/java/com/searchscale/lucene/vectorsearch/LuceneVectorSearchExample.java create mode 100644 lucene/src/main/java/com/searchscale/lucene/vectorsearch/jni/CuVSIndexJni.java create mode 100644 lucene/src/main/java/com/searchscale/lucene/vectorsearch/jni/JavaUtils.java create mode 100644 pom.xml create mode 100644 query.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..534e44e --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,226 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +========================================================================== +The following license applies to the JQuery JavaScript library +-------------------------------------------------------------------------- +Copyright (c) 2010 John Resig, http://jquery.com/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/README.md b/README.md index 7d4d270..f2416d8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,50 @@ -# lucene-cuvs -CuVS integration for Lucene +# Lucene CuVS Integration + +This is an integration for [CuVS](https://github.com/rapidsai/cuvs), GPU accelerated vector search library from NVIDIA (formerly part of [Raft](https://github.com/rapidsai/raft)), into [Apache Lucene](https://github.com/apache/lucene). + +## Architecture + +As an initial integration, the CuVS library is plugged in as an IndexSearcher. This project has two layers: (1) Java/JNI layer in `lucene` dir, (2) CuVS/C++ layer in `cuda` dir. + +By way of a working example, OpenAI's Wikipedia corpus (25k documents) can be indexed, each document having title and content vectors. A provided sample query (query.txt) can be executed after the indexing. + +> :warning: This is not production ready yet. + +## Running + +Install RAFT (https://docs.rapids.ai/api/raft/stable/build/#installation) + +Set the correct path for Raft in `cuda/CMakeLists.txt` file. Then, proceed to run the following (Wikipedia OpenAI benchmark): + + wget -c https://cdn.openai.com/API/examples/data/vector_database_wikipedia_articles_embedded.zip + mvn package + java -jar lucene/target/cuvs-searcher-lucene-0.0.1-SNAPSHOT-jar-with-dependencies.jar + +## Benchmarks + +Wikipedia (OpenAI, 1536 dimensions, 25k vectors): + +| | CuVS (RTX 4090) | Lucene HNSW (Ryzen 7950X) | Improvement | +| -------- | ------- | ------------------------- | ------------- | +| Indexing | 5.2 seconds | 26.5 seconds | 5.1x | +| Searching | 1 millisecond | 22 milliseconds | 22x | + +Wikipedia (768 dimensions, 750k vectors): + +| | CuVS (RTX 4090) | Lucene HNSW (Ryzen 7950X) | Improvement | +| -------- | ------- | ------------------------- | ------- | +| Indexing | 167.9 seconds | 804 seconds | 4.8x | + + +> :warning: Switching over the index building algorithm from IVF_PQ to [NN_DESCENT](https://github.com/rapidsai/raft/pull/1748) will likely result in further 8x (or better) speed up. This is work in progress. + +## Next steps +* Instead of using the IVF_PQ build algorithm of Cagra, switch over to NN_DESCENT, for a further 8x (or better) improvement in indexing speed. +* Instead of extending the IndexSearcher, create a (KnnVectorFormat)[https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsFormat.java] and corresponding KnnVectorsWriter and KnnVectorsReader for tighter integration. + +## Contributors + +* Vivek Narang, SearchScale +* Ishan Chattopadhyaya, SearchScale & Committer, Apache Lucene & Solr +* Kishore Angani, SearchScale +* Noble Paul, SearchScale & Committer, Apache Lucene & Solr \ No newline at end of file diff --git a/cuda/.gitignore b/cuda/.gitignore new file mode 100644 index 0000000..0f63015 --- /dev/null +++ b/cuda/.gitignore @@ -0,0 +1,2 @@ +/target/ +/bin/ diff --git a/cuda/CMakeLists.txt b/cuda/CMakeLists.txt new file mode 100644 index 0000000..80ed5fc --- /dev/null +++ b/cuda/CMakeLists.txt @@ -0,0 +1,48 @@ +# ============================================================================= +# Copyright (c) 2023, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. + +cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) + +# ------------- configure rapids-cmake --------------# + +include(cmake/thirdparty/fetch_rapids.cmake) +include(rapids-cmake) +include(rapids-cpm) +include(rapids-cuda) +include(rapids-export) +include(rapids-find) + +# ------------- configure project --------------# + +rapids_cuda_init_architectures(luceneraft) + +project(luceneraft LANGUAGES CXX CUDA) + +# ------------- configure raft -----------------# + +rapids_cpm_init() +include(cmake/thirdparty/get_raft.cmake) + +# -------------- compile tasks ----------------- # +# Build a .so file for use in JNI + +include_directories($ENV{JAVA_HOME}/include) +include_directories($ENV{JAVA_HOME}/include/linux) + +add_library(${PROJECT_NAME} SHARED src/CudaIndexJni.cu) +set_property(TARGET ${PROJECT_NAME} PROPERTY IMPORTED_LOCATION "~/miniforge3/lib/libraft.so") +target_link_libraries(${PROJECT_NAME} PRIVATE raft::raft raft::compiled) + +# Build an executable file +#add_executable(CAGRA_EXAMPLE src/cagra_example.cu) +#target_link_libraries(CAGRA_EXAMPLE PRIVATE raft::raft raft::compiled) diff --git a/cuda/build.sh b/cuda/build.sh new file mode 100755 index 0000000..3ac00fc --- /dev/null +++ b/cuda/build.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Copyright (c) 2023, NVIDIA CORPORATION. + +# raft empty project template build script + +# Abort script on first error +set -e + +PARALLEL_LEVEL=${PARALLEL_LEVEL:=`nproc`} + +BUILD_TYPE=Release +BUILD_DIR=build/ + +RAFT_REPO_REL="" +EXTRA_CMAKE_ARGS="" +set -e + + +if [[ ${RAFT_REPO_REL} != "" ]]; then + RAFT_REPO_PATH="`readlink -f \"${RAFT_REPO_REL}\"`" + EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DCPM_raft_SOURCE=${RAFT_REPO_PATH}" +fi + +if [ "$1" == "clean" ]; then + rm -rf build + exit 0 +fi + +mkdir -p $BUILD_DIR +cd $BUILD_DIR + +cmake \ + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DRAFT_NVTX=OFF \ + -DCMAKE_CUDA_ARCHITECTURES="NATIVE" \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + ${EXTRA_CMAKE_ARGS} \ + ../ + +cmake --build . -j${PARALLEL_LEVEL} diff --git a/cuda/cmake/thirdparty/fetch_rapids.cmake b/cuda/cmake/thirdparty/fetch_rapids.cmake new file mode 100644 index 0000000..15b6c43 --- /dev/null +++ b/cuda/cmake/thirdparty/fetch_rapids.cmake @@ -0,0 +1,21 @@ +# ============================================================================= +# Copyright (c) 2023, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. + +# Use this variable to update RAPIDS and RAFT versions +set(RAPIDS_VERSION "24.02") + +if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake) + file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-${RAPIDS_VERSION}/RAPIDS.cmake + ${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake) +endif() +include(${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake) diff --git a/cuda/cmake/thirdparty/get_raft.cmake b/cuda/cmake/thirdparty/get_raft.cmake new file mode 100644 index 0000000..6128b5c --- /dev/null +++ b/cuda/cmake/thirdparty/get_raft.cmake @@ -0,0 +1,63 @@ +# ============================================================================= +# Copyright (c) 2023, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. + +# Use RAPIDS_VERSION from cmake/thirdparty/fetch_rapids.cmake +set(RAFT_VERSION "${RAPIDS_VERSION}") +set(RAFT_FORK "rapidsai") +set(RAFT_PINNED_TAG "branch-${RAPIDS_VERSION}") + +function(find_and_configure_raft) + set(oneValueArgs VERSION FORK PINNED_TAG COMPILE_LIBRARY ENABLE_NVTX ENABLE_MNMG_DEPENDENCIES) + cmake_parse_arguments(PKG "${options}" "${oneValueArgs}" + "${multiValueArgs}" ${ARGN} ) + + set(RAFT_COMPONENTS "") + if(PKG_COMPILE_LIBRARY) + string(APPEND RAFT_COMPONENTS " compiled") + endif() + + if(PKG_ENABLE_MNMG_DEPENDENCIES) + string(APPEND RAFT_COMPONENTS " distributed") + endif() + + #----------------------------------------------------- + # Invoke CPM find_package() + #----------------------------------------------------- + rapids_cpm_find(raft ${PKG_VERSION} + GLOBAL_TARGETS raft::raft + BUILD_EXPORT_SET raft-template-exports + INSTALL_EXPORT_SET raft-template-exports + COMPONENTS ${RAFT_COMPONENTS} + CPM_ARGS + GIT_REPOSITORY https://github.com/${PKG_FORK}/raft.git + GIT_TAG ${PKG_PINNED_TAG} + SOURCE_SUBDIR cpp + OPTIONS + "BUILD_TESTS OFF" + "BUILD_PRIMS_BENCH OFF" + "BUILD_ANN_BENCH OFF" + "RAFT_NVTX ${ENABLE_NVTX}" + "RAFT_COMPILE_LIBRARY ${PKG_COMPILE_LIBRARY}" + ) +endfunction() + +# Change pinned tag here to test a commit in CI +# To use a different RAFT locally, set the CMake variable +# CPM_raft_SOURCE=/path/to/local/raft +find_and_configure_raft(VERSION ${RAFT_VERSION}.00 + FORK ${RAFT_FORK} + PINNED_TAG ${RAFT_PINNED_TAG} + COMPILE_LIBRARY ON + ENABLE_MNMG_DEPENDENCIES OFF + ENABLE_NVTX OFF +) diff --git a/cuda/pom.xml b/cuda/pom.xml new file mode 100644 index 0000000..27ce66d --- /dev/null +++ b/cuda/pom.xml @@ -0,0 +1,101 @@ + + + 4.0.0 + + + com.searchscale.lucene.vectorsearch + cuvs-searcher + 0.1 + + cuvs-searcher-cuda + + cuvs-searcher-cuda + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 11 + 11 + + + + + com.googlecode.cmake-maven-project + cmake-maven-plugin + 3.27.7-b1 + + + cmake-generate + + generate + + + + . + + + build + + + + value + + + + + + cmake-build + + generate + + + + build + + + build + + + + value + + + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.8 + + + attach-artifacts + package + + attach-artifact + + + + + ${basedir}/build/libluceneraft.so + so + + + + + + + + + + diff --git a/cuda/src/CudaIndexJni.cu b/cuda/src/CudaIndexJni.cu new file mode 100644 index 0000000..045bb07 --- /dev/null +++ b/cuda/src/CudaIndexJni.cu @@ -0,0 +1,97 @@ +#include "com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +long ms () { + struct timeval tp; + gettimeofday(&tp, NULL); + return tp.tv_sec * 1000 + tp.tv_usec / 1000; // get current timestamp in milliseconds +} + +raft::neighbors::cagra::index_params index_params; +raft::neighbors::cagra::search_params search_params; +raft::device_resources dev_resources; +rmm::mr::pool_memory_resource pool_mr(rmm::mr::get_current_device_resource(), 2 * 1024 * 1024 * 1024ull); +std::string filename("./cagra_index.indx"); +raft::neighbors::cagra::index dindx = raft::neighbors::cagra::index(dev_resources); + +JNIEXPORT jint JNICALL Java_com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni_initIndex +(JNIEnv *env, jobject jobj, jintArray docIds, jfloatArray dataVectors, jint numVectors, jint dimension) { + std::cout<<"CUDA devices: "<array->hostmatrix->devicematrix), + // TODO: it might possible to do it once (JNI -> Device) for better efficiency. + long startTime = ms(); + jsize numDocs = env->GetArrayLength(docIds); + std::vector docs (numDocs); + env->GetIntArrayRegion( docIds, 0, numDocs, &docs[0] ); // TODO: This docid to index mapping should be persisted and used during search + std::vector data(numVectors * dimension); + env->GetFloatArrayRegion( dataVectors, 0, numVectors * dimension, &data[0] ); + auto datasetHost = raft::make_host_matrix(dev_resources, numVectors, dimension); + auto dataset = raft::make_device_matrix(dev_resources, numVectors, dimension); + int p = 0; + for(size_t i = 0; i < numDocs ; i ++) { + for(size_t j = 0; j < dimension; ++j) { + datasetHost(i, j) = data[p++]; // TODO: Is there a better SIMD friendly way to copy? + } + } + cudaStream_t stream = raft::resource::get_cuda_stream(dev_resources); + raft::copy(dataset.data_handle(), datasetHost.data_handle(), datasetHost.size(), stream); + raft::resource::sync_stream(dev_resources, stream); + std::cout<<"Data copying time (CPU to GPU): "<<(ms()-startTime)<(dev_resources, index_params, raft::make_const_mdspan(dataset.view())); + std::cout << "Cagra Index building time: " << (ms()-startTime) << std::endl; + + // Serialize the index into a file + raft::neighbors::cagra::serialize(dev_resources, filename, ind); + dindx = raft::neighbors::cagra::deserialize(dev_resources, filename); + return numVectors * dimension; +} + +JNIEXPORT jobject JNICALL Java_com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni_getTopK +(JNIEnv *env, jobject jobj, jfloatArray queryVector, jint topK) +{ + rmm::mr::set_current_device_resource(&pool_mr); + + // Copy the query vector into the device + int64_t topk = topK; + int64_t n_queries = 1; + jsize queryVectorSize = env->GetArrayLength(queryVector); + std::vector query(queryVectorSize); + env->GetFloatArrayRegion( queryVector, 0, queryVectorSize, &query[0] ); + auto queries = raft::make_device_matrix(dev_resources, n_queries, queryVectorSize); // one query at a time + for (int i = 0; i < queryVectorSize; i++) { + queries(0, i) = query[i]; + } + + // Perform the search + long startTime = ms(); + auto neighbors = raft::make_device_matrix(dev_resources, n_queries, topk); + auto distances = raft::make_device_matrix(dev_resources, n_queries, topk); + raft::neighbors::cagra::search(dev_resources, search_params, dindx, raft::make_const_mdspan(queries.view()), neighbors.view(), distances.view()); + std::cout<<"Time taken for cagra::search: "<<(ms()-startTime)<NewDirectByteBuffer((void*)retDocsAndScores, sizeof(int)*numResults + sizeof(float)*numResults); + return directBuffer; +} diff --git a/cuda/src/com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni.h b/cuda/src/com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni.h new file mode 100644 index 0000000..c33634c --- /dev/null +++ b/cuda/src/com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni */ + +#ifndef _Included_com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni +#define _Included_com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni + * Method: initIndex + * Signature: ([I[FII)I + */ +JNIEXPORT jint JNICALL Java_com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni_initIndex + (JNIEnv *, jobject, jintArray, jfloatArray, jint, jint); + +/* + * Class: com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni + * Method: getTopK + * Signature: ([FI)Ljava/lang/Object; + */ +JNIEXPORT jobject JNICALL Java_com_searchscale_lucene_vectorsearch_jni_CuVSIndexJni_getTopK + (JNIEnv *, jobject, jfloatArray, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/lucene/pom.xml b/lucene/pom.xml new file mode 100644 index 0000000..ebf064d --- /dev/null +++ b/lucene/pom.xml @@ -0,0 +1,127 @@ + + 4.0.0 + com.searchscale.lucene.vectorsearch + cuvs-searcher-lucene + 0.0.1-SNAPSHOT + cuvs-searcher-lucene + jar + + + 11 + 11 + + + + + org.apache.lucene + lucene-core + 9.9.0 + + + org.apache.lucene + lucene-codecs + 9.9.0 + test + + + com.opencsv + opencsv + 5.3 + + + commons-io + commons-io + 2.15.1 + + + + com.github.fommil + jniloader + 1.1 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.7 + + + ${project.build.directory}/classes + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + + + copy + compile + + copy + + + + + com.searchscale.lucene.vectorsearch + cuvs-searcher-cuda + 0.1 + so + false + ${project.build.directory}/classes + libluceneraft.so + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.2 + + + jar-with-dependencies + + + + com.searchscale.lucene.vectorsearch.LuceneVectorSearchExample + + + + + + assemble-all + package + + single + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + true + com.searchscale.lucene.vectorsearch.LuceneVectorSearchExample + + + + + + + + \ No newline at end of file diff --git a/lucene/query.txt b/lucene/query.txt new file mode 100644 index 0000000..98a39fe --- /dev/null +++ b/lucene/query.txt @@ -0,0 +1 @@ +[0.01700117439031601, 0.01225309818983078, 0.020791975781321526, -0.02795238047838211, -0.018035028129816055, 0.012565807439386845, -0.02856503613293171, 0.015571645461022854, -0.018175428733229637, -0.01703946478664875, -0.01052362471818924, 0.020728157833218575, 0.024952923879027367, -0.0007131685852073133, 0.0017629783833399415, 0.024225397035479546, 0.022157685831189156, 0.015239791013300419, 0.0077283866703510284, -0.008455914445221424, -0.02986692637205124, 0.013095499016344547, 0.010581061244010925, 0.010925679467618465, 0.01577586494386196, -0.006222276482731104, 0.006014867220073938, -0.011493661440908909, 0.01086824294179678, -0.01635022833943367, 0.009355750866234303, 0.01627364568412304, -0.02657390758395195, -0.00511183962225914, -0.009400423616170883, -0.01501004584133625, 0.00039327976992353797, -0.01774146594107151, 0.008270841091871262, 0.0051022665575146675, 0.004690639209002256, 0.025055034086108208, 0.0010139120277017355, -0.014882409013807774, -0.01292318943887949, 0.0028925607912242413, 0.01086824294179678, -0.016618264839053154, -0.010210915468633175, 0.013631572015583515, 0.03379812836647034, 0.011799989268183708, 0.03055616468191147, -0.002496887929737568, -0.034487366676330566, -0.011104370467364788, -0.023038377985358238, -0.013363535515964031, 0.02529754303395748, -0.006962568033486605, 0.0271865613758564, 0.004642775747925043, -0.0022033241111785173, 0.01905612088739872, -0.0021155739668756723, 0.003160597290843725, -0.004585339222103357, 0.024148814380168915, -0.010210915468633175, -0.004042884334921837, 0.031730420887470245, 0.013950662687420845, -0.004923575557768345, 0.006739204283803701, 4.5520340790972114e-05, -0.013899608515202999, -0.00012614070146810263, -0.02999456413090229, -0.03004561737179756, 0.010255588218569756, 0.01530360896140337, -0.009438714943826199, -0.017205392941832542, 0.014920700341463089, 0.010044988244771957, 0.02120041288435459, -0.009585496969521046, 0.009732278995215893, -0.011474516242742538, 0.009330224245786667, 0.012342443689703941, 0.002898942679166794, 0.012833843939006329, -0.010453424416482449, -0.008264459669589996, 0.008219786919653416, -0.0005707741947844625, 0.011225624941289425, -0.012048879638314247, -0.028233179822564125, -0.013350771740078926, -0.024161579087376595, -0.0035100020468235016, -0.00959826074540615, -0.0012939143925905228, 0.01294233463704586, 0.003446183865889907, 0.008455914445221424, 0.01905612088739872, 0.0011846256675198674, -0.008730332367122173, -0.011136279441416264, 0.021506739780306816, -0.03867384046316147, -0.0057595944963395596, -0.01458884496241808, 0.00786240492016077, -0.003695074934512377, -0.014282518066465855, -6.162447243696079e-05, 0.04010336846113205, 0.026076124981045723, 0.016848010942339897, -0.013235898688435555, 0.027441835030913353, 0.018609393388032913, -0.04102235287427902, -0.006346722133457661, -0.005488366819918156, -0.000912600546143949, 0.023970123380422592, 0.014946226961910725, -0.007326331455260515, 0.001604230492375791, -0.005727685056626797, 0.01324866246432066, -0.018864665180444717, 0.014167645014822483, 0.009451478719711304, -8.690246613696218e-05, 0.0004574968770612031, 0.020217612385749817, -0.0033057837281376123, -0.014180408790707588, -0.012342443689703941, 0.026803651824593544, 0.02591019682586193, 0.025629397481679916, 0.007262513507157564, -0.007830495946109295, 0.01564822718501091, -0.0016528918640688062, 0.016784191131591797, 0.01775422878563404, 0.005265003070235252, 0.0163629911839962, -0.015571645461022854, 0.0002582643646746874, 0.006353104021400213, -0.0146399000659585, -0.01901783049106598, 0.0012540280586108565, 0.022808631882071495, -0.011180952191352844, 0.013810263015329838, 0.03073485568165779, 0.023638268932700157, -0.03065827302634716, 0.008660132065415382, 0.009662078693509102, -0.0238680150359869, 0.017856337130069733, -0.02925427258014679, 0.02797790803015232, 0.01834135688841343, 0.02109830267727375, -0.00426305690780282, -0.010044988244771957, 0.007619895506650209, -0.006215894594788551, -0.023408522829413414, -0.008372950367629528, 0.007032767869532108, -0.01495899073779583, 0.00097960967104882, 0.009087714366614819, -0.0034717111848294735, -0.014997282065451145, 0.026139942929148674, -0.04569384455680847, 0.02182583138346672, 0.009298314340412617, -0.00647435849532485, 0.012910425662994385, -0.6633010506629944, -0.019375212490558624, 0.012112698517739773, -0.014690954238176346, 0.01019815169274807, 0.001219725701957941, 0.014218699187040329, 0.02787579782307148, -0.009049423970282078, 0.011870188638567924, -0.025029506534337997, 0.00632119458168745, -0.028462925925850868, -0.01758830063045025, -0.01530360896140337, -0.016005609184503555, 0.0010306643089279532, 0.016873536631464958, 0.0031143291853368282, 0.0008431982132606208, -0.017167100682854652, 0.030326418578624725, 0.01971982978284359, 0.017294738441705704, 0.005807457957416773, -0.0015005258610472083, 0.012170135043561459, -0.03737194836139679, -0.018558338284492493, -0.00629885820671916, 0.0004082371888216585, 0.011359643191099167, -0.01698840968310833, 0.0022735241800546646, 0.0393630787730217, -0.037805914878845215, 0.001448673545382917, 0.0017103282734751701, 0.005293721333146095, -0.0011822325177490711, 0.0098726786673069, 0.005909567233175039, 0.02859056182205677, 0.011774461716413498, 0.018711501732468605, 0.008736714720726013, 0.03599347546696663, -0.006116976495832205, -0.00287820165976882, -0.011034170165657997, 0.009700369089841843, -0.0043268753215670586, -0.02053670398890972, -0.002890965435653925, -0.003982257097959518, -0.010670406743884087, 0.029662707820534706, 0.005092693958431482, -0.007785822730511427, -0.008321896195411682, -0.009298314340412617, 0.011046933941543102, -0.019949575886130333, -0.005032066721469164, -0.007690095342695713, 0.02726314403116703, -0.03349180147051811, 0.015150445513427258, -0.005249048583209515, 0.0031143291853368282, 0.021442921832203865, -0.001498132711276412, -0.002498483285307884, -0.010140715166926384, 0.007115731481462717, 0.007690095342695713, 0.028386345133185387, -0.008321896195411682, -0.004607675597071648, -0.0011008642613887787, 0.01970706693828106, -0.019336920231580734, 0.010402370244264603, 0.012061643414199352, 0.01535466406494379, -0.01836688444018364, -0.014563317410647869, 0.006330767646431923, -0.009189823642373085, -0.0038354750722646713, -0.0026197379920631647, 0.041175514459609985, -0.0008615459664724767, 0.0005616003181785345, 0.006930658593773842, -0.0013401826145127416, -0.007077440619468689, -0.012399880215525627, 0.01695011928677559, -0.016809718683362007, 0.022629940882325172, 0.003516383934766054, 0.028947943821549416, -0.015520591288805008, 0.016197064891457558, -0.011653207242488861, -0.018162665888667107, 0.02864161692559719, 0.024761470034718513, -0.03121987357735634, 0.025603869929909706, -0.0004327672941144556, -0.01829030178487301, 0.0028095971792936325, 0.005265003070235252, -0.01569928228855133, -0.00881329644471407, 0.002217683242633939, -0.00915791466832161, -0.00731995003297925, 0.003427038434892893, 0.024646596983075142, 0.016758665442466736, -0.016018373891711235, 0.005399021320044994, 0.01627364568412304, 0.011787225492298603, -0.020804740488529205, -0.004671493545174599, -0.009642933495342731, -0.01564822718501091, -0.0037684659473598003, 0.0028000243473798037, -0.002669197041541338, 0.005006539169698954, 0.021940704435110092, 0.033721547573804855, -0.006764731369912624, -0.008309132419526577, -0.0068413130939006805, -0.006254185456782579, -0.0017534055514261127, 0.0030792290344834328, 0.004010975360870361, -0.01762659288942814, -0.017269210889935493, -0.009164296090602875, -0.0029324472416192293, -0.04278373345732689, -0.0078432597219944, 0.0023277695290744305, -0.02246401272714138, -0.018698738887906075, 0.012693444266915321, -0.01255942601710558, 0.0006844504387117922, 0.005552185233682394, -0.028309762477874756, -0.02591019682586193, -0.007919841445982456, 0.02389354072511196, 0.02864161692559719, -0.035151075571775436, 0.017294738441705704, 0.018941247835755348, -0.004655539058148861, -0.0342065654695034, 0.008028332144021988, -0.020038921386003494, -0.026676015928387642, 0.012061643414199352, -0.01632470078766346, 0.009962024167180061, 0.0018969966331496835, -0.011066079139709473, 0.02917768992483616, -0.01709051989018917, -0.014103827066719532, -0.010759752243757248, 0.0010498097399249673, 0.003666356671601534, 0.00647435849532485, 0.021940704435110092, 0.004582148045301437, 0.028845835477113724, -0.017498955130577087, 0.010370460338890553, 0.008640986867249012, -0.01832859218120575, 0.009362133219838142, 0.015099391341209412, 0.010013078339397907, -0.01188933476805687, -0.0006318003870546818, -0.002650051610544324, -0.0279268529266119, -0.006222276482731104, 0.008564405143260956, 0.027365252375602722, 0.0146399000659585, 0.022349141538143158, 0.010415133088827133, -0.005667057819664478, 0.009993933141231537, 0.011040552519261837, 0.00044393548159860075, 0.014754772186279297, -0.0342065654695034, 0.030862491577863693, 0.014920700341463089, 0.014091063290834427, -0.003015410853549838, 0.010638497769832611, -0.0009086119243875146, 0.0076581863686442375, 0.0313730388879776, 0.02381695993244648, 0.00887711439281702, 0.007185931783169508, 0.006416921969503164, 0.004381120670586824, 0.003928011283278465, -0.0029723336920142174, 0.0053032939322292805, -0.020562229678034782, 0.01188933476805687, 0.014346336014568806, 0.01979641243815422, 0.0021171695552766323, -0.028309762477874756, -0.02596125192940235, -0.004042884334921837, 0.003650402184575796, 0.005060784984380007, 0.013759207911789417, 0.0004367559449747205, 0.013567754067480564, 0.0004475252644624561, -0.016848010942339897, -0.008315513841807842, 0.013210371136665344, 0.0020246331114321947, 0.01530360896140337, -0.006681767757982016, 0.04160948097705841, -0.011940388940274715, 0.04564278945326805, 0.002227255841717124, -0.0038067568093538284, 0.00029416210600174963, -0.0017230919329449534, -0.003283447353169322, -0.04227318987250328, 0.005775548983365297, -0.004942721221596003, -0.017269210889935493, 0.008979223668575287, -0.007256131619215012, -0.006962568033486605, 0.023357467725872993, 0.011787225492298603, 0.027339724823832512, 0.0073773860931396484, 0.004732121247798204, 0.02442961558699608, -0.014473971910774708, -0.015992846339941025, 0.013503935188055038, 0.0014765940140932798, -0.01197868026793003, -0.005539421457797289, -0.014167645014822483, 0.011851043440401554, -0.013708153739571571, -0.0007199493120424449, -0.013350771740078926, 0.007479495368897915, -0.025514524430036545, -0.009623787365853786, 0.0006892367964610457, -0.005226712208241224, -0.05631319805979729, -0.00407160259783268, 0.032343074679374695, -0.005676630884408951, -0.011397934518754482, 0.01091291569173336, 0.01770317368209362, -0.024225397035479546, 0.012323298491537571, 0.020919611677527428, -0.0054787942208349705, -0.027671581134200096, -0.0017422373639419675, -0.01222757063806057, -0.004467275459319353, 0.0005775549216195941, 0.0065349857322871685, -0.01186380721628666, -0.012757262215018272, 0.01197868026793003, -0.00042399231460876763, -0.004808702971786261, 0.01635022833943367, 0.0231277234852314, 0.021596085280179977, 0.0009078141883946955, -0.01569928228855133, -0.008334659971296787, -0.035814784467220306, 0.01978364773094654, -0.026242051273584366, -0.008200641721487045, -0.002393183298408985, -0.0071093495935201645, 0.013491171412169933, 0.005427739582955837, -0.002066114917397499, 0.03412998467683792, 0.016886301338672638, -0.019643248990178108, -0.01322313491255045, -0.018685974180698395, -0.020115502178668976, 0.08786492794752121, 0.0034621383529156446, 0.0020230375230312347, 0.008353805169463158, 0.0007821720791980624, -0.0021091920789331198, -0.011078842915594578, 0.006231849081814289, -0.0016433191485702991, -0.015967318788170815, -0.009674842469394207, 0.0005328821134753525, 0.010510860942304134, 0.015278082340955734, 0.00023433253227267414, 0.024340270087122917, -0.008979223668575287, -0.04063944146037102, -0.020077211782336235, -0.01229777093976736, -0.007115731481462717, 0.0043524024076759815, -0.0043268753215670586, 0.048655010759830475, 0.007262513507157564, 0.017996737733483315, 0.03658060356974602, 0.002764924429357052, 0.009642933495342731, -0.004955484997481108, 0.0014143713051453233, 0.0016640600515529513, 0.009400423616170883, -0.004342829808592796, -0.0056128124706447124, -0.005475603509694338, -0.018660448491573334, 0.004984202794730663, 0.013899608515202999, 0.0039790659211575985, 0.008289987221360207, -0.007747531868517399, -0.005746830720454454, -0.03453842177987099, 0.007696477230638266, 0.0013673054054379463, 0.008609077893197536, 0.03451289236545563, 0.012770025990903378, -0.008743096143007278, 0.00952167809009552, -0.005188421346247196, -0.0072816587053239346, -0.018137138336896896, -0.014793063513934612, -0.0010785278864204884, -0.017154337838292122, -0.0101790064945817, 0.004732121247798204, -0.0010202937992289662, -0.0026197379920631647, -0.011174570769071579, 0.004827848169952631, -0.020626049488782883, 0.010778897441923618, -0.02190241403877735, -0.0022224695421755314, -0.014001717790961266, -0.045157771557569504, -0.0011216051643714309, 0.003055297303944826, -0.05513894185423851, -0.04811893776059151, -0.0014662236208096147, 0.03895464166998863, 6.167432729853317e-05, 0.027007870376110077, -0.005797885358333588, 0.016796955838799477, 0.01501004584133625, 0.014665426686406136, -0.005963812582194805, -0.05095246806740761, -0.011340497992932796, -0.004205620847642422, 0.013121025636792183, 0.023319177329540253, -0.016784191131591797, 0.012489225715398788, 0.02388077788054943, 0.030913546681404114, 0.012106316164135933, 0.03586583957076073, -0.003227606415748596, 0.01904335618019104, -0.00262931059114635, -0.006037203595042229, 0.01982193998992443, 0.004406648222357035, -0.016656555235385895, 0.007556077092885971, -0.004843803122639656, 0.01264877151697874, 0.008909023366868496, 0.0010043391957879066, -0.003956729546189308, 0.0007287242915481329, -0.0012077598366886377, -0.016771428287029266, -0.02382972277700901, 0.022668231278657913, -0.005644721444696188, 0.0002389194560237229, -0.025399651378393173, -0.016171537339687347, 0.034334201365709305, 0.033696021884679794, 0.025425178930163383, -0.012725353240966797, 0.0005125401075929403, -0.02518266998231411, -0.03180700168013573, -0.016133246943354607, 0.017996737733483315, 0.0037078384775668383, 0.015507827512919903, 0.012061643414199352, -0.00788793247193098, -0.03859725967049599, -0.005092693958431482, -0.001545198610983789, -0.003733365796506405, -8.216595597332343e-05, -0.013669862411916256, -0.012170135043561459, -0.0002642473264131695, -0.0025511332787573338, 0.007639041170477867, -0.009138769470155239, 0.011206479743123055, -0.006790258456021547, -0.019400738179683685, -0.01982193998992443, -0.0005388651043176651, -0.006834931205958128, -0.03793355077505112, 0.014882409013807774, 0.00047424915828742087, 0.008258077315986156, -0.008149586617946625, -0.004674684721976519, -0.009119623340666294, -0.012584952637553215, 0.0015962532488629222, -0.02388077788054943, 0.0015428054612129927, -0.02996903657913208, -0.018571102991700172, 0.02527201548218727, 0.029662707820534706, 0.03405340388417244, 0.019298629835247993, 0.007926222868263721, 0.02037077583372593, -0.006732822395861149, -0.02448066882789135, 0.0015571645926684141, -0.014384626410901546, -0.02519543282687664, 0.0022815014235675335, 0.018647683784365654, 0.0014989303890615702, -0.017958447337150574, 0.0072816587053239346, -0.00955358799546957, 0.009457860141992569, 0.013746445067226887, -0.01696288213133812, -0.006981713231652975, -0.024340270087122917, 0.006764731369912624, -0.01700117439031601, -0.009387659840285778, -0.0007925425306893885, -0.00989820621907711, -0.02869267202913761, 0.028871363028883934, 0.009240878745913506, -0.0024936969857662916, -0.006771113257855177, 0.03185805678367615, 0.009942878969013691, 0.022655468434095383, -0.001411180361174047, 0.0064679766073822975, -0.022298086434602737, -0.02255335822701454, 0.002768115373328328, -0.010153478942811489, 0.006675385870039463, 0.010159860365092754, -0.00018975949205923826, 0.015035572461783886, -0.011314970441162586, 0.009304696694016457, 0.013095499016344547, -0.018213719129562378, 0.026854706928133965, 0.004275820683687925, -0.011436224915087223, 0.010044988244771957, -0.01123200636357069, -0.02588466927409172, -0.024327505379915237, -0.0022846923675388098, -0.0020501604303717613, -0.04360060766339302, 0.01119371596723795, -0.002680365229025483, -0.044698283076286316, 0.006751967594027519, 0.01495899073779583, 0.023548923432826996, 0.019426265731453896, 0.0156865194439888, 0.013261426240205765, -0.0018618965987116098, -0.011831898242235184, -0.015278082340955734, -0.01086824294179678, -0.006522221956402063, 0.039082277566194534, -0.010970352217555046, 0.00751140434294939, -0.014448445290327072, -0.024927396327257156, -0.00955358799546957, -0.009630169719457626, -0.013503935188055038, 0.018137138336896896, -0.0077666775323450565, 0.010274733416736126, -0.0013872485142201185, 7.713030208833516e-05, -0.008430386893451214, 0.035840313881635666, -0.03318547457456589, -0.006637095008045435, -0.020243139937520027, -0.014473971910774708, -0.00852611381560564, -0.009055805392563343, -0.009910969994962215, 0.02520819753408432, 0.01911993883550167, -0.015571645461022854, -0.030377473682165146, 0.0022495922166854143, -0.002322983229532838, -0.008251695893704891, -0.02382972277700901, -0.008545259945094585, -0.02242572233080864, -0.001526850974187255, 0.0018363692797720432, 0.012546662241220474, 0.018022265285253525, 0.0023756332229822874, -0.006404158193618059, 0.02665048837661743, -0.011168188415467739, 0.0017693601548671722, 0.010664024390280247, 0.015967318788170815, -0.004294966347515583, -0.0030967791099101305, -0.01627364568412304, 0.02795238047838211, -0.01401448156684637, -0.012163752689957619, 0.026829179376363754, -0.023982886224985123, -0.007830495946109295, -0.007958131842315197, -0.005992530845105648, -0.013286953791975975, -0.02856503613293171, 0.016133246943354607, -0.011755316518247128, -0.02989245392382145, -0.029279800131917, 0.0013393849367275834, -0.008009186945855618, 0.026395216584205627, -0.0029117062222212553, 0.0003334502107463777, -0.005325630307197571, -0.00880691409111023, -0.0355595126748085, 0.009119623340666294, 0.0105172423645854, 0.0037301750853657722, -0.0203580129891634, 0.028156599029898643, 0.0047959391959011555, -0.025974014773964882, 0.026216525584459305, -0.011991443112492561, -0.0058266036212444305, -0.016796955838799477, -0.0020102739799767733, 0.00632119458168745, -0.012801934964954853, 0.007690095342695713, 0.01707775518298149, 0.009981169365346432, 0.006030821707099676, -0.018941247835755348, -0.004521520808339119, 0.016733137890696526, -0.010970352217555046, 0.0038769568782299757, 0.02532307058572769, -6.715870404150337e-05, 0.009432332590222359, -0.0024442379362881184, -0.0021969422232359648, -0.008730332367122173, -0.01569928228855133, 0.0007219436229206622, -0.004815084859728813, 0.03226649388670921, 0.00238041952252388, 0.007741149980574846, -0.0033664111979305744, -0.020051684230566025, -0.004304538946598768, 0.003580202115699649, 0.007709241006523371, -0.017269210889935493, 0.002938829129561782, 0.039184387773275375, 0.014103827066719532, -0.020728157833218575, -0.00883244164288044, -0.009936496615409851, -0.014869645237922668, 0.00781773217022419, -0.03213885426521301, -0.01906888373196125, -0.0005691787227988243, 0.027109980583190918, -0.005191612057387829, -0.020843030884861946, -0.017243683338165283, 0.007977277971804142, -0.02450619637966156, -0.01128306146711111, 0.0190050657838583, 0.015175973065197468, 0.04291137307882309, -0.002768115373328328, 0.0023947786539793015, 0.0366571843624115, 0.003583393059670925, -0.0038450476713478565, 0.020077211782336235, 0.004368357360363007, -0.011244770139455795, -0.02393183298408985, 0.002173010492697358, -0.03760169446468353, -0.042681626975536346, -0.003340883878991008, 0.016094954684376717, -0.004014166072010994, -0.00851335097104311, 0.014767535962164402, -0.008500587195158005, -0.01703946478664875, -0.009962024167180061, -0.006554131396114826, 0.018762556836009026, 0.027007870376110077, 0.017920156940817833, -0.01123838871717453, -0.00034142748336307704, 0.008889878168702126, 0.020638812333345413, -0.0025335834361612797, -0.020651575177907944, -0.0135932806879282, 0.0066690039820969105, -0.011761697940528393, -0.017473429441452026, -0.01324866246432066, 0.008398477919399738, -0.015163209289312363, -0.00952806044369936, 0.0003129086981061846, -0.006988095119595528, 0.01983470283448696, -0.0008100925479084253, -0.02243848703801632, 0.0002965552848763764, -0.013580516912043095, -0.016158772632479668, 0.0007067868136800826, 0.0016592737520113587, -0.022885214537382126, -0.00982800591737032, -0.0029707381036132574, -0.0008623437024652958, -0.017409609630703926, -0.00030951836379244924, -0.019592193886637688, -0.016835246235132217, -0.02384248748421669, 0.022629940882325172, 0.024263687431812286, -0.011072461493313313, -0.00349723850376904, -0.012935953214764595, 0.0033568383660167456, 0.007983659394085407, -0.0016736327670514584, 0.008749477565288544, -0.02654838003218174, -0.010319406166672707, 0.028182126581668854, -0.018788084387779236, -0.0212259404361248, 0.0285395085811615, 0.01975812017917633, 0.007402913644909859, -0.007562458980828524, 0.2281118482351303, -0.0022224695421755314, -0.03466605767607689, 0.045872535556554794, -0.009700369089841843, 0.039694931358098984, 0.04015442356467247, 0.0019145465921610594, 0.005663867108523846, -0.016158772632479668, -0.00924726016819477, 0.022285321727395058, -0.023676559329032898, 0.00627971300855279, 0.005204375833272934, -0.039286497980356216, -0.029535071924328804, -0.008615459315478802, 0.026931289583444595, -0.005325630307197571, -0.003924820572137833, -0.02382972277700901, -0.023523395881056786, -0.020817503333091736, 0.03341522067785263, -0.013108262792229652, -0.00495867570862174, 0.00699447700753808, -0.007473113480955362, -0.016911828890442848, -0.008264459669589996, 0.00853249616920948, 0.01846899278461933, 0.019541138783097267, -0.024825287982821465, -0.023663796484470367, -0.0034908566158264875, -0.004384311847388744, 0.027799217030405998, 0.034410785883665085, 0.002613356104120612, 0.0032004837412387133, -0.0042215753346681595, 0.01401448156684637, -0.0037525114603340626, 0.0033664111979305744, 0.0012787575833499432, -0.01963048428297043, 0.007849641144275665, 0.019975103437900543, -0.00955358799546957, -0.001535625895485282, 0.009074950590729713, 0.05304570496082306, 0.016643792390823364, -0.018098847940564156, 0.020089976489543915, 0.004164138808846474, 0.008494204841554165, 0.0014542576391249895, -0.017511719837784767, 0.04020547866821289, -0.008245314471423626, 0.009138769470155239, -0.01766488328576088, 0.016886301338672638, -0.047251008450984955, 0.022272558882832527, 0.005175657570362091, -0.019885757938027382, -0.00476083904504776, -0.0115638617426157, -0.022323613986372948, -0.02508055977523327, -0.03816329687833786, -0.007951750420033932, 0.01121924351900816, 0.03282809257507324, 0.038418568670749664, 0.016490628942847252, 0.0034876656718552113, 0.008104913868010044, -0.0074858772568404675, -0.007568840868771076, -0.013529462739825249, -0.007288040593266487, -0.0030696564354002476, 0.014231462962925434, 0.012170135043561459, 7.892518624430522e-05, -0.0010673596989363432, -0.020804740488529205, -0.0212259404361248, 0.0016959692584350705, 0.014627136290073395, 0.0005703753558918834, -0.005702157970517874, 0.014078299514949322, -0.0039120567962527275, -0.017537247389554977, -0.019592193886637688, 0.020166557282209396, 0.011359643191099167, -0.010127951391041279, -0.020230375230312347, -0.013682626187801361, -0.011155424639582634, -0.0019560283981263638, 0.02520819753408432, -0.0007642231648787856, -0.015941791236400604, -0.012131843715906143, -0.004856566432863474, -0.009291932918131351, -0.021404631435871124, 0.013542226515710354, 0.0031526200473308563, 0.009043041616678238, 0.029764818027615547, 0.007230604533106089, -0.021289758384227753, -0.010466188192367554, -0.0070455316454172134, -0.005676630884408951, -0.001825201092287898, -0.0381377674639225, -0.004521520808339119, -0.005864894483238459, -0.0017789328703656793, -0.0351766012609005, -0.004732121247798204, 0.010351315140724182, -0.00749225914478302, -0.01257857121527195, -0.016579974442720413, 0.017524482682347298, -0.020051684230566025, -0.045413047075271606, -0.013389062136411667, -0.00729442248120904, -0.00027880584821105003, -0.038444094359874725, -0.006586040370166302, -0.0033536474220454693, 0.013542226515710354, -0.016835246235132217, 0.016886301338672638, -0.005363921634852886, -0.019936811178922653, 0.005124602932482958, -0.010670406743884087, -0.013133789412677288, -0.00042399231460876763, 0.02033248543739319, 0.019477320834994316, 0.011097988113760948, 0.006598804146051407, -0.024148814380168915, -0.02381695993244648, 0.02106001228094101, -0.020549466833472252, 0.01646510139107704, 0.020804740488529205, -0.04020547866821289, -0.01638851873576641, 0.002190560335293412, -0.16082191467285156, 0.01917099393904209, 0.013363535515964031, 0.00203580129891634, 0.019962338730692863, 0.012680680491030216, 0.0018810420297086239, 0.0049012391828000546, -0.009955642744898796, -0.0008767027757130563, 0.02790132537484169, -0.009260023944079876, -0.010287497192621231, 0.004215193446725607, -0.012361588887870312, -0.040562860667705536, 0.009611023589968681, -0.009387659840285778, -0.0057851215824484825, 0.007013622205704451, 0.01461437251418829, -0.006573276594281197, 0.011474516242742538, -0.004014166072010994, -0.016069427132606506, 0.0038195205852389336, 0.0011295825242996216, 0.051411956548690796, -0.009559969417750835, -0.016120482236146927, 0.00012035717372782528, -0.016669319942593575, 0.03221543878316879, -0.006598804146051407, 0.01322313491255045, 0.022974560037255287, -0.008104913868010044, -0.030173255130648613, -0.028947943821549416, 0.004987393971532583, 0.015137681737542152, 0.03338969126343727, 0.007798586506396532, 0.005099075846374035, -0.0008116879616864026, 0.003141451859846711, 0.01435909979045391, -0.026778124272823334, 0.016758665442466736, -0.02172372303903103, 0.002160246716812253, -0.004192857071757317, -0.012495607137680054, 0.009732278995215893, -0.007402913644909859, 0.017294738441705704, 0.014537790790200233, 0.02917768992483616, 0.02989245392382145, 0.0052586211822927, -0.03607005625963211, 0.0021267421543598175, -0.001286734826862812, -0.022068340331315994, 0.006318003870546818, -0.005702157970517874, -0.01222757063806057, -0.002498483285307884, -0.04303900897502899, 0.022834159433841705, 0.0006848492776043713, -0.01831582933664322, 0.0033855566289275885, -0.014895172789692879, 0.0042183841578662395, 0.011429843492805958, -0.04074155166745186, -0.008628223091363907, 0.00699447700753808, 0.0106129702180624, -0.018609393388032913, 0.036555077880620956, -0.0285395085811615, 0.012527517043054104, 0.002362869679927826, -0.007753913756459951, -0.018698738887906075, -0.0007095788605511189, 0.0021666286047548056, 0.0036248748656362295, 0.027390779927372932, -0.023268122225999832, -0.028258707374334335, -0.009043041616678238, 0.027365252375602722, 0.03446183726191521, -0.0035482931416481733, 0.03458947688341141, -0.004735311958938837, 0.004212002735584974, -0.0030425337608903646, 0.016094954684376717, -0.01193400751799345, 0.017333028838038445, 0.028360817581415176, 0.025514524430036545, 0.022055577486753464, 0.004907621070742607, 0.04007784277200699, 0.0054787942208349705, -0.008934550918638706, -0.004515138920396566, 0.016069427132606506, 0.04038416966795921, 0.0005205173511058092, 0.021213175728917122, -0.005287339445203543, -0.027390779927372932, -0.003813138697296381, -0.001018698327243328, 0.03596794977784157, 0.019502848386764526, -0.017256446182727814, 0.010159860365092754, -0.005568139720708132, -0.01624811813235283, -0.09797373414039612, -0.024072231724858284, 0.02046012133359909, 0.022936267778277397, 0.0023197922855615616, 0.03525318577885628, 0.005363921634852886, 0.0122084254398942, 0.010408751666545868, 0.018022265285253525, -0.01915822923183441, -0.01909441128373146, 0.01197868026793003, 0.00948338769376278, 0.03696351498365402, -0.03129645437002182, -0.0026867471169680357, -0.018175428733229637, -0.02933085337281227, 0.007262513507157564, 0.016120482236146927, -0.023561686277389526, -0.013861317187547684, 0.00228309677913785, -0.01222757063806057, -0.014665426686406136, -0.022885214537382126, 0.012099934741854668, 0.003253133734688163, -0.008270841091871262, 0.007332713343203068, -0.030198782682418823, -0.02449343353509903, -0.030836964026093483, -0.0026037832722067833, -0.012023353017866611, -0.022897977381944656, 0.04829762876033783, 0.03058169037103653, -0.021647140383720398, 0.013440117239952087, 0.026190998032689095, 0.014091063290834427, -0.02782474458217621, -0.013976190239191055, -0.04148184135556221, -0.01777975633740425, -0.002873415360227227, -0.02375314198434353, -0.00140160764567554, 0.008073004893958569, -0.019847465679049492, -0.014818591065704823, 0.008047477342188358, 0.0009732278413139284, 0.01695011928677559, 0.009930115193128586, 0.0351766012609005, 0.0123041532933712, 0.005252239294350147, 0.004074793308973312, 0.008264459669589996, -0.011793606914579868, 0.007434822618961334, 0.01290404424071312, 0.026395216584205627, -0.0013689008774235845, 0.001979960361495614, 0.010395987890660763, -0.03538082167506218, -0.012425407767295837, 0.018864665180444717, -0.0072816587053239346, -0.024353032931685448, -0.04066497087478638, -0.003186124609783292, -0.02306390553712845, 0.01361880823969841, -0.0031047563534229994, -0.0062669492326676846, -0.018086083233356476, -0.009342987090349197, -0.02527201548218727, -0.013516698963940144, -0.000345814973115921, 0.0058266036212444305, -0.03379812836647034, -0.016758665442466736, -0.007926222868263721, -0.023459577932953835, 0.0025798515416681767, 0.042502935975790024, 0.023408522829413414, -0.01978364773094654, -0.011838279664516449, 0.008991987444460392, 0.000797328888438642, 0.0034908566158264875, 0.02575703337788582, 0.010389606468379498, -0.026063360273838043, 0.005012921057641506, -0.05370941385626793, 0.03762722387909889, 0.030760381370782852, -0.00696894945576787, -0.004170520696789026, 0.009323841892182827, 0.012527517043054104, -0.0008312322897836566, 0.014078299514949322, 0.004550239071249962, -0.008155968971550465, 0.0212259404361248, 0.0011120324488729239, -0.0007171572651714087, 0.0009373301290906966, -0.005635148845613003, 0.026216525584459305, 0.008085768669843674, 0.010025842115283012, 0.01841793768107891, -0.008085768669843674, 0.00712211336940527, 0.01638851873576641, 0.007300804369151592, -0.010249205864965916, 0.004818275570869446, -0.012125462293624878, 0.01056829746812582, -0.01502280868589878, 0.007907077670097351, 0.018762556836009026, -0.024646596983075142, -0.0015922646271064878, 0.03688693046569824, -0.013025298714637756, -0.016209827736020088, -0.020715394988656044, 0.008092150092124939, 0.00459172111004591, 0.024199869483709335, -0.003628065809607506, -0.015290845185518265, 0.020868558436632156, -0.001971983117982745, 0.004559811670333147, 0.02584637887775898, -0.014410153962671757, -0.007907077670097351, 0.014142117463052273, 0.006183985620737076, 0.010810806415975094, 0.025642160326242447, -0.02031972073018551, -0.009623787365853786, -0.0006274128681980073, -0.02582085132598877, 0.005185230169445276, 0.029688235372304916, 0.01701393723487854, -0.003208460984751582, 0.0135932806879282, 0.011653207242488861, 0.015252554789185524, -0.004524711985141039, 0.009910969994962215, 0.004534284584224224, -0.014129353687167168, 0.004556620959192514, 0.006617949344217777, -0.012310534715652466, -0.014167645014822483, 0.009323841892182827, 0.026727071031928062, -0.016911828890442848, 0.007371004205197096, -0.007268895395100117, 0.00474169384688139, 0.02439132332801819, -0.006445640232414007, 0.02647179737687111, -0.006783877033740282, -0.0060276309959590435, -0.0355595126748085, 0.004141802433878183, 0.006592422258108854, -0.015124917961657047, -0.009119623340666294, 0.023625504225492477, -0.047276537865400314, -0.008073004893958569, -0.011736170388758183, -0.0037716568913310766, -0.014895172789692879, 0.006075494457036257, -0.0053703030571341515, 0.01905612088739872, 0.00015824924048501998, -0.011136279441416264, -0.02109830267727375, 0.0394907146692276, -0.011761697940528393, -0.004084365908056498, -0.0021458875853568316, -0.0005939083057455719, -0.0409712977707386, 0.017996737733483315, -0.007307186257094145, -0.0342065654695034, -0.002102810423821211, 0.0028191697783768177, 0.015227027237415314, 0.006611567456275225, 0.010230060666799545, -0.005268194247037172, -0.0021586513612419367, 0.00850696861743927, -0.010510860942304134, -0.016860773786902428, -0.031653836369514465, 0.003478093072772026, -0.007804968394339085, 0.005727685056626797, 0.01772870123386383, 0.0004906025715172291, 0.005600048694759607, 0.005497939884662628, 0.03405340388417244, -0.01364433579146862, 0.01467819046229124, 0.0024522151798009872, -0.0039120567962527275, -0.012425407767295837, 0.020549466833472252, -0.014665426686406136, -0.016146009787917137, 0.006445640232414007, 0.013669862411916256, 0.01646510139107704, -0.02579532377421856, 0.04944635555148125, -0.007409295532852411, -0.010313024744391441, 0.013376299291849136, 0.02592296153306961, 0.0409712977707386, 0.02665048837661743, 0.029790345579385757, -0.013159316964447498, -0.0177159383893013, 0.017256446182727814, -0.01121286116540432, 0.009425951167941093, -0.013172080740332603, -0.026318633928894997, 0.008698423393070698, 0.005424548871815205, -0.020549466833472252, -0.02252783253788948, 0.009253641590476036, 0.02324259653687477, -0.012055261991918087, 0.023970123380422592, 0.0011583006707951427, 0.001814032904803753, 0.0032036746852099895, -0.003950347658246756, -0.023548923432826996, -0.0005779537605121732, -0.024212632328271866, -0.00614888546988368, -0.02108553983271122, -0.03607005625963211, -0.015367427840828896, 0.007020004093647003, 0.0004981809761375189, 0.0029468063730746508, -0.019924048334360123, 0.02527201548218727, 0.02389354072511196, 0.01501004584133625, -0.0014359100023284554, -0.016579974442720413, -0.008692041970789433, 0.027569470927119255, -0.022974560037255287, -0.024799760431051254, -0.016567209735512733, -0.023472340777516365] \ No newline at end of file diff --git a/lucene/src/main/java/com/searchscale/lucene/vectorsearch/CuVSIndexSearcher.java b/lucene/src/main/java/com/searchscale/lucene/vectorsearch/CuVSIndexSearcher.java new file mode 100644 index 0000000..ed1c877 --- /dev/null +++ b/lucene/src/main/java/com/searchscale/lucene/vectorsearch/CuVSIndexSearcher.java @@ -0,0 +1,75 @@ +package com.searchscale.lucene.vectorsearch; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.ArrayList; +import java.util.List; + +import org.apache.lucene.index.FloatVectorValues; +import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.LeafReaderContext; +import org.apache.lucene.search.DocIdSetIterator; +import org.apache.lucene.search.IndexSearcher; +import org.apache.lucene.search.KnnFloatVectorQuery; +import org.apache.lucene.search.Query; +import org.apache.lucene.search.ScoreDoc; +import org.apache.lucene.search.TopDocs; +import org.apache.lucene.search.TotalHits; + +import com.searchscale.lucene.vectorsearch.jni.CuVSIndexJni; + +public class CuVSIndexSearcher extends IndexSearcher { + + private CuVSIndexJni jni = new CuVSIndexJni(); + + public CuVSIndexSearcher(IndexReader reader) { + super(reader); + + long startTime = System.currentTimeMillis(); + List docIds = new ArrayList<>(); + List dataVectors = new ArrayList(); + try { + for (LeafReaderContext leaf: reader.leaves()) { + FloatVectorValues vectors = leaf.reader().getFloatVectorValues("content_vector"); + DocIdSetIterator disi = FloatVectorValues.all(leaf.reader().maxDoc()); + for (int doc = disi.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; doc = disi.nextDoc()) { + vectors.advance(doc); + docIds.add(leaf.docBase+doc); + dataVectors.add(vectors.vectorValue().clone()); + } + } + } catch (Exception ex) { + ex.printStackTrace(); + } + int numVectors = dataVectors.size(); + int dim = dataVectors.get(0).length; + float[] singleDataVector = new float[numVectors * dim]; + for (int i=0; i 1) ? parts[parts.length - 1] : null; + + // Split filename to prefix and suffix (extension) + String prefix = ""; + String suffix = null; + if (filename != null) { + parts = filename.split("\\.", 2); + prefix = parts[0]; + suffix = (parts.length > 1) ? "."+parts[parts.length - 1] : null; // Thanks, davs! :-) + } + + // Check if the filename is okay + if (filename == null || prefix.length() < 3) { + throw new IllegalArgumentException("The filename has to be at least 3 characters long."); + } + + // Prepare temporary file + File temp = File.createTempFile(prefix, suffix); + + if (!temp.exists()) { + throw new FileNotFoundException("File " + temp.getAbsolutePath() + " does not exist."); + } + + boolean tempFileIsPosix = false; + try { + if (FileSystems.getDefault() + .supportedFileAttributeViews() + .contains("posix")) { + // Assume POSIX compliant file system, can be deleted after loading. + tempFileIsPosix = true; + } + } catch (FileSystemNotFoundException + | ProviderNotFoundException + | SecurityException e) { + // Assume non-POSIX, and don't delete until last file descriptor closed. + e.printStackTrace(); + } + + // Prepare buffer for data copying + byte[] buffer = new byte[1024]; + int readBytes; + + // Open and check input stream + InputStream is = JavaUtils.class.getResourceAsStream(path); + if (is == null) { + temp.delete(); + throw new FileNotFoundException("File " + path + " was not found inside JAR."); + } + + // Open output stream and copy data between source file in JAR and the temporary file + OutputStream os = new FileOutputStream(temp); + try { + while ((readBytes = is.read(buffer)) != -1) { + os.write(buffer, 0, readBytes); + } + } catch (Throwable e) { + temp.delete(); + throw e; + } finally { + // If read/write fails, close streams safely before throwing an exception + os.close(); + is.close(); + } + + try { + // Load the library + System.load(temp.getAbsolutePath()); + } finally { + if (tempFileIsPosix) + temp.delete(); + else + temp.deleteOnExit(); + } + } +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..beb5781 --- /dev/null +++ b/pom.xml @@ -0,0 +1,24 @@ + + + 4.0.0 + com.searchscale.lucene.vectorsearch + cuvs-searcher + 0.1 + pom + + cuvs-searcher + + + 11 + 11 + UTF-8 + UTF-8 + + + + cuda + lucene + + diff --git a/query.txt b/query.txt new file mode 100644 index 0000000..98a39fe --- /dev/null +++ b/query.txt @@ -0,0 +1 @@ +[0.01700117439031601, 0.01225309818983078, 0.020791975781321526, -0.02795238047838211, -0.018035028129816055, 0.012565807439386845, -0.02856503613293171, 0.015571645461022854, -0.018175428733229637, -0.01703946478664875, -0.01052362471818924, 0.020728157833218575, 0.024952923879027367, -0.0007131685852073133, 0.0017629783833399415, 0.024225397035479546, 0.022157685831189156, 0.015239791013300419, 0.0077283866703510284, -0.008455914445221424, -0.02986692637205124, 0.013095499016344547, 0.010581061244010925, 0.010925679467618465, 0.01577586494386196, -0.006222276482731104, 0.006014867220073938, -0.011493661440908909, 0.01086824294179678, -0.01635022833943367, 0.009355750866234303, 0.01627364568412304, -0.02657390758395195, -0.00511183962225914, -0.009400423616170883, -0.01501004584133625, 0.00039327976992353797, -0.01774146594107151, 0.008270841091871262, 0.0051022665575146675, 0.004690639209002256, 0.025055034086108208, 0.0010139120277017355, -0.014882409013807774, -0.01292318943887949, 0.0028925607912242413, 0.01086824294179678, -0.016618264839053154, -0.010210915468633175, 0.013631572015583515, 0.03379812836647034, 0.011799989268183708, 0.03055616468191147, -0.002496887929737568, -0.034487366676330566, -0.011104370467364788, -0.023038377985358238, -0.013363535515964031, 0.02529754303395748, -0.006962568033486605, 0.0271865613758564, 0.004642775747925043, -0.0022033241111785173, 0.01905612088739872, -0.0021155739668756723, 0.003160597290843725, -0.004585339222103357, 0.024148814380168915, -0.010210915468633175, -0.004042884334921837, 0.031730420887470245, 0.013950662687420845, -0.004923575557768345, 0.006739204283803701, 4.5520340790972114e-05, -0.013899608515202999, -0.00012614070146810263, -0.02999456413090229, -0.03004561737179756, 0.010255588218569756, 0.01530360896140337, -0.009438714943826199, -0.017205392941832542, 0.014920700341463089, 0.010044988244771957, 0.02120041288435459, -0.009585496969521046, 0.009732278995215893, -0.011474516242742538, 0.009330224245786667, 0.012342443689703941, 0.002898942679166794, 0.012833843939006329, -0.010453424416482449, -0.008264459669589996, 0.008219786919653416, -0.0005707741947844625, 0.011225624941289425, -0.012048879638314247, -0.028233179822564125, -0.013350771740078926, -0.024161579087376595, -0.0035100020468235016, -0.00959826074540615, -0.0012939143925905228, 0.01294233463704586, 0.003446183865889907, 0.008455914445221424, 0.01905612088739872, 0.0011846256675198674, -0.008730332367122173, -0.011136279441416264, 0.021506739780306816, -0.03867384046316147, -0.0057595944963395596, -0.01458884496241808, 0.00786240492016077, -0.003695074934512377, -0.014282518066465855, -6.162447243696079e-05, 0.04010336846113205, 0.026076124981045723, 0.016848010942339897, -0.013235898688435555, 0.027441835030913353, 0.018609393388032913, -0.04102235287427902, -0.006346722133457661, -0.005488366819918156, -0.000912600546143949, 0.023970123380422592, 0.014946226961910725, -0.007326331455260515, 0.001604230492375791, -0.005727685056626797, 0.01324866246432066, -0.018864665180444717, 0.014167645014822483, 0.009451478719711304, -8.690246613696218e-05, 0.0004574968770612031, 0.020217612385749817, -0.0033057837281376123, -0.014180408790707588, -0.012342443689703941, 0.026803651824593544, 0.02591019682586193, 0.025629397481679916, 0.007262513507157564, -0.007830495946109295, 0.01564822718501091, -0.0016528918640688062, 0.016784191131591797, 0.01775422878563404, 0.005265003070235252, 0.0163629911839962, -0.015571645461022854, 0.0002582643646746874, 0.006353104021400213, -0.0146399000659585, -0.01901783049106598, 0.0012540280586108565, 0.022808631882071495, -0.011180952191352844, 0.013810263015329838, 0.03073485568165779, 0.023638268932700157, -0.03065827302634716, 0.008660132065415382, 0.009662078693509102, -0.0238680150359869, 0.017856337130069733, -0.02925427258014679, 0.02797790803015232, 0.01834135688841343, 0.02109830267727375, -0.00426305690780282, -0.010044988244771957, 0.007619895506650209, -0.006215894594788551, -0.023408522829413414, -0.008372950367629528, 0.007032767869532108, -0.01495899073779583, 0.00097960967104882, 0.009087714366614819, -0.0034717111848294735, -0.014997282065451145, 0.026139942929148674, -0.04569384455680847, 0.02182583138346672, 0.009298314340412617, -0.00647435849532485, 0.012910425662994385, -0.6633010506629944, -0.019375212490558624, 0.012112698517739773, -0.014690954238176346, 0.01019815169274807, 0.001219725701957941, 0.014218699187040329, 0.02787579782307148, -0.009049423970282078, 0.011870188638567924, -0.025029506534337997, 0.00632119458168745, -0.028462925925850868, -0.01758830063045025, -0.01530360896140337, -0.016005609184503555, 0.0010306643089279532, 0.016873536631464958, 0.0031143291853368282, 0.0008431982132606208, -0.017167100682854652, 0.030326418578624725, 0.01971982978284359, 0.017294738441705704, 0.005807457957416773, -0.0015005258610472083, 0.012170135043561459, -0.03737194836139679, -0.018558338284492493, -0.00629885820671916, 0.0004082371888216585, 0.011359643191099167, -0.01698840968310833, 0.0022735241800546646, 0.0393630787730217, -0.037805914878845215, 0.001448673545382917, 0.0017103282734751701, 0.005293721333146095, -0.0011822325177490711, 0.0098726786673069, 0.005909567233175039, 0.02859056182205677, 0.011774461716413498, 0.018711501732468605, 0.008736714720726013, 0.03599347546696663, -0.006116976495832205, -0.00287820165976882, -0.011034170165657997, 0.009700369089841843, -0.0043268753215670586, -0.02053670398890972, -0.002890965435653925, -0.003982257097959518, -0.010670406743884087, 0.029662707820534706, 0.005092693958431482, -0.007785822730511427, -0.008321896195411682, -0.009298314340412617, 0.011046933941543102, -0.019949575886130333, -0.005032066721469164, -0.007690095342695713, 0.02726314403116703, -0.03349180147051811, 0.015150445513427258, -0.005249048583209515, 0.0031143291853368282, 0.021442921832203865, -0.001498132711276412, -0.002498483285307884, -0.010140715166926384, 0.007115731481462717, 0.007690095342695713, 0.028386345133185387, -0.008321896195411682, -0.004607675597071648, -0.0011008642613887787, 0.01970706693828106, -0.019336920231580734, 0.010402370244264603, 0.012061643414199352, 0.01535466406494379, -0.01836688444018364, -0.014563317410647869, 0.006330767646431923, -0.009189823642373085, -0.0038354750722646713, -0.0026197379920631647, 0.041175514459609985, -0.0008615459664724767, 0.0005616003181785345, 0.006930658593773842, -0.0013401826145127416, -0.007077440619468689, -0.012399880215525627, 0.01695011928677559, -0.016809718683362007, 0.022629940882325172, 0.003516383934766054, 0.028947943821549416, -0.015520591288805008, 0.016197064891457558, -0.011653207242488861, -0.018162665888667107, 0.02864161692559719, 0.024761470034718513, -0.03121987357735634, 0.025603869929909706, -0.0004327672941144556, -0.01829030178487301, 0.0028095971792936325, 0.005265003070235252, -0.01569928228855133, -0.00881329644471407, 0.002217683242633939, -0.00915791466832161, -0.00731995003297925, 0.003427038434892893, 0.024646596983075142, 0.016758665442466736, -0.016018373891711235, 0.005399021320044994, 0.01627364568412304, 0.011787225492298603, -0.020804740488529205, -0.004671493545174599, -0.009642933495342731, -0.01564822718501091, -0.0037684659473598003, 0.0028000243473798037, -0.002669197041541338, 0.005006539169698954, 0.021940704435110092, 0.033721547573804855, -0.006764731369912624, -0.008309132419526577, -0.0068413130939006805, -0.006254185456782579, -0.0017534055514261127, 0.0030792290344834328, 0.004010975360870361, -0.01762659288942814, -0.017269210889935493, -0.009164296090602875, -0.0029324472416192293, -0.04278373345732689, -0.0078432597219944, 0.0023277695290744305, -0.02246401272714138, -0.018698738887906075, 0.012693444266915321, -0.01255942601710558, 0.0006844504387117922, 0.005552185233682394, -0.028309762477874756, -0.02591019682586193, -0.007919841445982456, 0.02389354072511196, 0.02864161692559719, -0.035151075571775436, 0.017294738441705704, 0.018941247835755348, -0.004655539058148861, -0.0342065654695034, 0.008028332144021988, -0.020038921386003494, -0.026676015928387642, 0.012061643414199352, -0.01632470078766346, 0.009962024167180061, 0.0018969966331496835, -0.011066079139709473, 0.02917768992483616, -0.01709051989018917, -0.014103827066719532, -0.010759752243757248, 0.0010498097399249673, 0.003666356671601534, 0.00647435849532485, 0.021940704435110092, 0.004582148045301437, 0.028845835477113724, -0.017498955130577087, 0.010370460338890553, 0.008640986867249012, -0.01832859218120575, 0.009362133219838142, 0.015099391341209412, 0.010013078339397907, -0.01188933476805687, -0.0006318003870546818, -0.002650051610544324, -0.0279268529266119, -0.006222276482731104, 0.008564405143260956, 0.027365252375602722, 0.0146399000659585, 0.022349141538143158, 0.010415133088827133, -0.005667057819664478, 0.009993933141231537, 0.011040552519261837, 0.00044393548159860075, 0.014754772186279297, -0.0342065654695034, 0.030862491577863693, 0.014920700341463089, 0.014091063290834427, -0.003015410853549838, 0.010638497769832611, -0.0009086119243875146, 0.0076581863686442375, 0.0313730388879776, 0.02381695993244648, 0.00887711439281702, 0.007185931783169508, 0.006416921969503164, 0.004381120670586824, 0.003928011283278465, -0.0029723336920142174, 0.0053032939322292805, -0.020562229678034782, 0.01188933476805687, 0.014346336014568806, 0.01979641243815422, 0.0021171695552766323, -0.028309762477874756, -0.02596125192940235, -0.004042884334921837, 0.003650402184575796, 0.005060784984380007, 0.013759207911789417, 0.0004367559449747205, 0.013567754067480564, 0.0004475252644624561, -0.016848010942339897, -0.008315513841807842, 0.013210371136665344, 0.0020246331114321947, 0.01530360896140337, -0.006681767757982016, 0.04160948097705841, -0.011940388940274715, 0.04564278945326805, 0.002227255841717124, -0.0038067568093538284, 0.00029416210600174963, -0.0017230919329449534, -0.003283447353169322, -0.04227318987250328, 0.005775548983365297, -0.004942721221596003, -0.017269210889935493, 0.008979223668575287, -0.007256131619215012, -0.006962568033486605, 0.023357467725872993, 0.011787225492298603, 0.027339724823832512, 0.0073773860931396484, 0.004732121247798204, 0.02442961558699608, -0.014473971910774708, -0.015992846339941025, 0.013503935188055038, 0.0014765940140932798, -0.01197868026793003, -0.005539421457797289, -0.014167645014822483, 0.011851043440401554, -0.013708153739571571, -0.0007199493120424449, -0.013350771740078926, 0.007479495368897915, -0.025514524430036545, -0.009623787365853786, 0.0006892367964610457, -0.005226712208241224, -0.05631319805979729, -0.00407160259783268, 0.032343074679374695, -0.005676630884408951, -0.011397934518754482, 0.01091291569173336, 0.01770317368209362, -0.024225397035479546, 0.012323298491537571, 0.020919611677527428, -0.0054787942208349705, -0.027671581134200096, -0.0017422373639419675, -0.01222757063806057, -0.004467275459319353, 0.0005775549216195941, 0.0065349857322871685, -0.01186380721628666, -0.012757262215018272, 0.01197868026793003, -0.00042399231460876763, -0.004808702971786261, 0.01635022833943367, 0.0231277234852314, 0.021596085280179977, 0.0009078141883946955, -0.01569928228855133, -0.008334659971296787, -0.035814784467220306, 0.01978364773094654, -0.026242051273584366, -0.008200641721487045, -0.002393183298408985, -0.0071093495935201645, 0.013491171412169933, 0.005427739582955837, -0.002066114917397499, 0.03412998467683792, 0.016886301338672638, -0.019643248990178108, -0.01322313491255045, -0.018685974180698395, -0.020115502178668976, 0.08786492794752121, 0.0034621383529156446, 0.0020230375230312347, 0.008353805169463158, 0.0007821720791980624, -0.0021091920789331198, -0.011078842915594578, 0.006231849081814289, -0.0016433191485702991, -0.015967318788170815, -0.009674842469394207, 0.0005328821134753525, 0.010510860942304134, 0.015278082340955734, 0.00023433253227267414, 0.024340270087122917, -0.008979223668575287, -0.04063944146037102, -0.020077211782336235, -0.01229777093976736, -0.007115731481462717, 0.0043524024076759815, -0.0043268753215670586, 0.048655010759830475, 0.007262513507157564, 0.017996737733483315, 0.03658060356974602, 0.002764924429357052, 0.009642933495342731, -0.004955484997481108, 0.0014143713051453233, 0.0016640600515529513, 0.009400423616170883, -0.004342829808592796, -0.0056128124706447124, -0.005475603509694338, -0.018660448491573334, 0.004984202794730663, 0.013899608515202999, 0.0039790659211575985, 0.008289987221360207, -0.007747531868517399, -0.005746830720454454, -0.03453842177987099, 0.007696477230638266, 0.0013673054054379463, 0.008609077893197536, 0.03451289236545563, 0.012770025990903378, -0.008743096143007278, 0.00952167809009552, -0.005188421346247196, -0.0072816587053239346, -0.018137138336896896, -0.014793063513934612, -0.0010785278864204884, -0.017154337838292122, -0.0101790064945817, 0.004732121247798204, -0.0010202937992289662, -0.0026197379920631647, -0.011174570769071579, 0.004827848169952631, -0.020626049488782883, 0.010778897441923618, -0.02190241403877735, -0.0022224695421755314, -0.014001717790961266, -0.045157771557569504, -0.0011216051643714309, 0.003055297303944826, -0.05513894185423851, -0.04811893776059151, -0.0014662236208096147, 0.03895464166998863, 6.167432729853317e-05, 0.027007870376110077, -0.005797885358333588, 0.016796955838799477, 0.01501004584133625, 0.014665426686406136, -0.005963812582194805, -0.05095246806740761, -0.011340497992932796, -0.004205620847642422, 0.013121025636792183, 0.023319177329540253, -0.016784191131591797, 0.012489225715398788, 0.02388077788054943, 0.030913546681404114, 0.012106316164135933, 0.03586583957076073, -0.003227606415748596, 0.01904335618019104, -0.00262931059114635, -0.006037203595042229, 0.01982193998992443, 0.004406648222357035, -0.016656555235385895, 0.007556077092885971, -0.004843803122639656, 0.01264877151697874, 0.008909023366868496, 0.0010043391957879066, -0.003956729546189308, 0.0007287242915481329, -0.0012077598366886377, -0.016771428287029266, -0.02382972277700901, 0.022668231278657913, -0.005644721444696188, 0.0002389194560237229, -0.025399651378393173, -0.016171537339687347, 0.034334201365709305, 0.033696021884679794, 0.025425178930163383, -0.012725353240966797, 0.0005125401075929403, -0.02518266998231411, -0.03180700168013573, -0.016133246943354607, 0.017996737733483315, 0.0037078384775668383, 0.015507827512919903, 0.012061643414199352, -0.00788793247193098, -0.03859725967049599, -0.005092693958431482, -0.001545198610983789, -0.003733365796506405, -8.216595597332343e-05, -0.013669862411916256, -0.012170135043561459, -0.0002642473264131695, -0.0025511332787573338, 0.007639041170477867, -0.009138769470155239, 0.011206479743123055, -0.006790258456021547, -0.019400738179683685, -0.01982193998992443, -0.0005388651043176651, -0.006834931205958128, -0.03793355077505112, 0.014882409013807774, 0.00047424915828742087, 0.008258077315986156, -0.008149586617946625, -0.004674684721976519, -0.009119623340666294, -0.012584952637553215, 0.0015962532488629222, -0.02388077788054943, 0.0015428054612129927, -0.02996903657913208, -0.018571102991700172, 0.02527201548218727, 0.029662707820534706, 0.03405340388417244, 0.019298629835247993, 0.007926222868263721, 0.02037077583372593, -0.006732822395861149, -0.02448066882789135, 0.0015571645926684141, -0.014384626410901546, -0.02519543282687664, 0.0022815014235675335, 0.018647683784365654, 0.0014989303890615702, -0.017958447337150574, 0.0072816587053239346, -0.00955358799546957, 0.009457860141992569, 0.013746445067226887, -0.01696288213133812, -0.006981713231652975, -0.024340270087122917, 0.006764731369912624, -0.01700117439031601, -0.009387659840285778, -0.0007925425306893885, -0.00989820621907711, -0.02869267202913761, 0.028871363028883934, 0.009240878745913506, -0.0024936969857662916, -0.006771113257855177, 0.03185805678367615, 0.009942878969013691, 0.022655468434095383, -0.001411180361174047, 0.0064679766073822975, -0.022298086434602737, -0.02255335822701454, 0.002768115373328328, -0.010153478942811489, 0.006675385870039463, 0.010159860365092754, -0.00018975949205923826, 0.015035572461783886, -0.011314970441162586, 0.009304696694016457, 0.013095499016344547, -0.018213719129562378, 0.026854706928133965, 0.004275820683687925, -0.011436224915087223, 0.010044988244771957, -0.01123200636357069, -0.02588466927409172, -0.024327505379915237, -0.0022846923675388098, -0.0020501604303717613, -0.04360060766339302, 0.01119371596723795, -0.002680365229025483, -0.044698283076286316, 0.006751967594027519, 0.01495899073779583, 0.023548923432826996, 0.019426265731453896, 0.0156865194439888, 0.013261426240205765, -0.0018618965987116098, -0.011831898242235184, -0.015278082340955734, -0.01086824294179678, -0.006522221956402063, 0.039082277566194534, -0.010970352217555046, 0.00751140434294939, -0.014448445290327072, -0.024927396327257156, -0.00955358799546957, -0.009630169719457626, -0.013503935188055038, 0.018137138336896896, -0.0077666775323450565, 0.010274733416736126, -0.0013872485142201185, 7.713030208833516e-05, -0.008430386893451214, 0.035840313881635666, -0.03318547457456589, -0.006637095008045435, -0.020243139937520027, -0.014473971910774708, -0.00852611381560564, -0.009055805392563343, -0.009910969994962215, 0.02520819753408432, 0.01911993883550167, -0.015571645461022854, -0.030377473682165146, 0.0022495922166854143, -0.002322983229532838, -0.008251695893704891, -0.02382972277700901, -0.008545259945094585, -0.02242572233080864, -0.001526850974187255, 0.0018363692797720432, 0.012546662241220474, 0.018022265285253525, 0.0023756332229822874, -0.006404158193618059, 0.02665048837661743, -0.011168188415467739, 0.0017693601548671722, 0.010664024390280247, 0.015967318788170815, -0.004294966347515583, -0.0030967791099101305, -0.01627364568412304, 0.02795238047838211, -0.01401448156684637, -0.012163752689957619, 0.026829179376363754, -0.023982886224985123, -0.007830495946109295, -0.007958131842315197, -0.005992530845105648, -0.013286953791975975, -0.02856503613293171, 0.016133246943354607, -0.011755316518247128, -0.02989245392382145, -0.029279800131917, 0.0013393849367275834, -0.008009186945855618, 0.026395216584205627, -0.0029117062222212553, 0.0003334502107463777, -0.005325630307197571, -0.00880691409111023, -0.0355595126748085, 0.009119623340666294, 0.0105172423645854, 0.0037301750853657722, -0.0203580129891634, 0.028156599029898643, 0.0047959391959011555, -0.025974014773964882, 0.026216525584459305, -0.011991443112492561, -0.0058266036212444305, -0.016796955838799477, -0.0020102739799767733, 0.00632119458168745, -0.012801934964954853, 0.007690095342695713, 0.01707775518298149, 0.009981169365346432, 0.006030821707099676, -0.018941247835755348, -0.004521520808339119, 0.016733137890696526, -0.010970352217555046, 0.0038769568782299757, 0.02532307058572769, -6.715870404150337e-05, 0.009432332590222359, -0.0024442379362881184, -0.0021969422232359648, -0.008730332367122173, -0.01569928228855133, 0.0007219436229206622, -0.004815084859728813, 0.03226649388670921, 0.00238041952252388, 0.007741149980574846, -0.0033664111979305744, -0.020051684230566025, -0.004304538946598768, 0.003580202115699649, 0.007709241006523371, -0.017269210889935493, 0.002938829129561782, 0.039184387773275375, 0.014103827066719532, -0.020728157833218575, -0.00883244164288044, -0.009936496615409851, -0.014869645237922668, 0.00781773217022419, -0.03213885426521301, -0.01906888373196125, -0.0005691787227988243, 0.027109980583190918, -0.005191612057387829, -0.020843030884861946, -0.017243683338165283, 0.007977277971804142, -0.02450619637966156, -0.01128306146711111, 0.0190050657838583, 0.015175973065197468, 0.04291137307882309, -0.002768115373328328, 0.0023947786539793015, 0.0366571843624115, 0.003583393059670925, -0.0038450476713478565, 0.020077211782336235, 0.004368357360363007, -0.011244770139455795, -0.02393183298408985, 0.002173010492697358, -0.03760169446468353, -0.042681626975536346, -0.003340883878991008, 0.016094954684376717, -0.004014166072010994, -0.00851335097104311, 0.014767535962164402, -0.008500587195158005, -0.01703946478664875, -0.009962024167180061, -0.006554131396114826, 0.018762556836009026, 0.027007870376110077, 0.017920156940817833, -0.01123838871717453, -0.00034142748336307704, 0.008889878168702126, 0.020638812333345413, -0.0025335834361612797, -0.020651575177907944, -0.0135932806879282, 0.0066690039820969105, -0.011761697940528393, -0.017473429441452026, -0.01324866246432066, 0.008398477919399738, -0.015163209289312363, -0.00952806044369936, 0.0003129086981061846, -0.006988095119595528, 0.01983470283448696, -0.0008100925479084253, -0.02243848703801632, 0.0002965552848763764, -0.013580516912043095, -0.016158772632479668, 0.0007067868136800826, 0.0016592737520113587, -0.022885214537382126, -0.00982800591737032, -0.0029707381036132574, -0.0008623437024652958, -0.017409609630703926, -0.00030951836379244924, -0.019592193886637688, -0.016835246235132217, -0.02384248748421669, 0.022629940882325172, 0.024263687431812286, -0.011072461493313313, -0.00349723850376904, -0.012935953214764595, 0.0033568383660167456, 0.007983659394085407, -0.0016736327670514584, 0.008749477565288544, -0.02654838003218174, -0.010319406166672707, 0.028182126581668854, -0.018788084387779236, -0.0212259404361248, 0.0285395085811615, 0.01975812017917633, 0.007402913644909859, -0.007562458980828524, 0.2281118482351303, -0.0022224695421755314, -0.03466605767607689, 0.045872535556554794, -0.009700369089841843, 0.039694931358098984, 0.04015442356467247, 0.0019145465921610594, 0.005663867108523846, -0.016158772632479668, -0.00924726016819477, 0.022285321727395058, -0.023676559329032898, 0.00627971300855279, 0.005204375833272934, -0.039286497980356216, -0.029535071924328804, -0.008615459315478802, 0.026931289583444595, -0.005325630307197571, -0.003924820572137833, -0.02382972277700901, -0.023523395881056786, -0.020817503333091736, 0.03341522067785263, -0.013108262792229652, -0.00495867570862174, 0.00699447700753808, -0.007473113480955362, -0.016911828890442848, -0.008264459669589996, 0.00853249616920948, 0.01846899278461933, 0.019541138783097267, -0.024825287982821465, -0.023663796484470367, -0.0034908566158264875, -0.004384311847388744, 0.027799217030405998, 0.034410785883665085, 0.002613356104120612, 0.0032004837412387133, -0.0042215753346681595, 0.01401448156684637, -0.0037525114603340626, 0.0033664111979305744, 0.0012787575833499432, -0.01963048428297043, 0.007849641144275665, 0.019975103437900543, -0.00955358799546957, -0.001535625895485282, 0.009074950590729713, 0.05304570496082306, 0.016643792390823364, -0.018098847940564156, 0.020089976489543915, 0.004164138808846474, 0.008494204841554165, 0.0014542576391249895, -0.017511719837784767, 0.04020547866821289, -0.008245314471423626, 0.009138769470155239, -0.01766488328576088, 0.016886301338672638, -0.047251008450984955, 0.022272558882832527, 0.005175657570362091, -0.019885757938027382, -0.00476083904504776, -0.0115638617426157, -0.022323613986372948, -0.02508055977523327, -0.03816329687833786, -0.007951750420033932, 0.01121924351900816, 0.03282809257507324, 0.038418568670749664, 0.016490628942847252, 0.0034876656718552113, 0.008104913868010044, -0.0074858772568404675, -0.007568840868771076, -0.013529462739825249, -0.007288040593266487, -0.0030696564354002476, 0.014231462962925434, 0.012170135043561459, 7.892518624430522e-05, -0.0010673596989363432, -0.020804740488529205, -0.0212259404361248, 0.0016959692584350705, 0.014627136290073395, 0.0005703753558918834, -0.005702157970517874, 0.014078299514949322, -0.0039120567962527275, -0.017537247389554977, -0.019592193886637688, 0.020166557282209396, 0.011359643191099167, -0.010127951391041279, -0.020230375230312347, -0.013682626187801361, -0.011155424639582634, -0.0019560283981263638, 0.02520819753408432, -0.0007642231648787856, -0.015941791236400604, -0.012131843715906143, -0.004856566432863474, -0.009291932918131351, -0.021404631435871124, 0.013542226515710354, 0.0031526200473308563, 0.009043041616678238, 0.029764818027615547, 0.007230604533106089, -0.021289758384227753, -0.010466188192367554, -0.0070455316454172134, -0.005676630884408951, -0.001825201092287898, -0.0381377674639225, -0.004521520808339119, -0.005864894483238459, -0.0017789328703656793, -0.0351766012609005, -0.004732121247798204, 0.010351315140724182, -0.00749225914478302, -0.01257857121527195, -0.016579974442720413, 0.017524482682347298, -0.020051684230566025, -0.045413047075271606, -0.013389062136411667, -0.00729442248120904, -0.00027880584821105003, -0.038444094359874725, -0.006586040370166302, -0.0033536474220454693, 0.013542226515710354, -0.016835246235132217, 0.016886301338672638, -0.005363921634852886, -0.019936811178922653, 0.005124602932482958, -0.010670406743884087, -0.013133789412677288, -0.00042399231460876763, 0.02033248543739319, 0.019477320834994316, 0.011097988113760948, 0.006598804146051407, -0.024148814380168915, -0.02381695993244648, 0.02106001228094101, -0.020549466833472252, 0.01646510139107704, 0.020804740488529205, -0.04020547866821289, -0.01638851873576641, 0.002190560335293412, -0.16082191467285156, 0.01917099393904209, 0.013363535515964031, 0.00203580129891634, 0.019962338730692863, 0.012680680491030216, 0.0018810420297086239, 0.0049012391828000546, -0.009955642744898796, -0.0008767027757130563, 0.02790132537484169, -0.009260023944079876, -0.010287497192621231, 0.004215193446725607, -0.012361588887870312, -0.040562860667705536, 0.009611023589968681, -0.009387659840285778, -0.0057851215824484825, 0.007013622205704451, 0.01461437251418829, -0.006573276594281197, 0.011474516242742538, -0.004014166072010994, -0.016069427132606506, 0.0038195205852389336, 0.0011295825242996216, 0.051411956548690796, -0.009559969417750835, -0.016120482236146927, 0.00012035717372782528, -0.016669319942593575, 0.03221543878316879, -0.006598804146051407, 0.01322313491255045, 0.022974560037255287, -0.008104913868010044, -0.030173255130648613, -0.028947943821549416, 0.004987393971532583, 0.015137681737542152, 0.03338969126343727, 0.007798586506396532, 0.005099075846374035, -0.0008116879616864026, 0.003141451859846711, 0.01435909979045391, -0.026778124272823334, 0.016758665442466736, -0.02172372303903103, 0.002160246716812253, -0.004192857071757317, -0.012495607137680054, 0.009732278995215893, -0.007402913644909859, 0.017294738441705704, 0.014537790790200233, 0.02917768992483616, 0.02989245392382145, 0.0052586211822927, -0.03607005625963211, 0.0021267421543598175, -0.001286734826862812, -0.022068340331315994, 0.006318003870546818, -0.005702157970517874, -0.01222757063806057, -0.002498483285307884, -0.04303900897502899, 0.022834159433841705, 0.0006848492776043713, -0.01831582933664322, 0.0033855566289275885, -0.014895172789692879, 0.0042183841578662395, 0.011429843492805958, -0.04074155166745186, -0.008628223091363907, 0.00699447700753808, 0.0106129702180624, -0.018609393388032913, 0.036555077880620956, -0.0285395085811615, 0.012527517043054104, 0.002362869679927826, -0.007753913756459951, -0.018698738887906075, -0.0007095788605511189, 0.0021666286047548056, 0.0036248748656362295, 0.027390779927372932, -0.023268122225999832, -0.028258707374334335, -0.009043041616678238, 0.027365252375602722, 0.03446183726191521, -0.0035482931416481733, 0.03458947688341141, -0.004735311958938837, 0.004212002735584974, -0.0030425337608903646, 0.016094954684376717, -0.01193400751799345, 0.017333028838038445, 0.028360817581415176, 0.025514524430036545, 0.022055577486753464, 0.004907621070742607, 0.04007784277200699, 0.0054787942208349705, -0.008934550918638706, -0.004515138920396566, 0.016069427132606506, 0.04038416966795921, 0.0005205173511058092, 0.021213175728917122, -0.005287339445203543, -0.027390779927372932, -0.003813138697296381, -0.001018698327243328, 0.03596794977784157, 0.019502848386764526, -0.017256446182727814, 0.010159860365092754, -0.005568139720708132, -0.01624811813235283, -0.09797373414039612, -0.024072231724858284, 0.02046012133359909, 0.022936267778277397, 0.0023197922855615616, 0.03525318577885628, 0.005363921634852886, 0.0122084254398942, 0.010408751666545868, 0.018022265285253525, -0.01915822923183441, -0.01909441128373146, 0.01197868026793003, 0.00948338769376278, 0.03696351498365402, -0.03129645437002182, -0.0026867471169680357, -0.018175428733229637, -0.02933085337281227, 0.007262513507157564, 0.016120482236146927, -0.023561686277389526, -0.013861317187547684, 0.00228309677913785, -0.01222757063806057, -0.014665426686406136, -0.022885214537382126, 0.012099934741854668, 0.003253133734688163, -0.008270841091871262, 0.007332713343203068, -0.030198782682418823, -0.02449343353509903, -0.030836964026093483, -0.0026037832722067833, -0.012023353017866611, -0.022897977381944656, 0.04829762876033783, 0.03058169037103653, -0.021647140383720398, 0.013440117239952087, 0.026190998032689095, 0.014091063290834427, -0.02782474458217621, -0.013976190239191055, -0.04148184135556221, -0.01777975633740425, -0.002873415360227227, -0.02375314198434353, -0.00140160764567554, 0.008073004893958569, -0.019847465679049492, -0.014818591065704823, 0.008047477342188358, 0.0009732278413139284, 0.01695011928677559, 0.009930115193128586, 0.0351766012609005, 0.0123041532933712, 0.005252239294350147, 0.004074793308973312, 0.008264459669589996, -0.011793606914579868, 0.007434822618961334, 0.01290404424071312, 0.026395216584205627, -0.0013689008774235845, 0.001979960361495614, 0.010395987890660763, -0.03538082167506218, -0.012425407767295837, 0.018864665180444717, -0.0072816587053239346, -0.024353032931685448, -0.04066497087478638, -0.003186124609783292, -0.02306390553712845, 0.01361880823969841, -0.0031047563534229994, -0.0062669492326676846, -0.018086083233356476, -0.009342987090349197, -0.02527201548218727, -0.013516698963940144, -0.000345814973115921, 0.0058266036212444305, -0.03379812836647034, -0.016758665442466736, -0.007926222868263721, -0.023459577932953835, 0.0025798515416681767, 0.042502935975790024, 0.023408522829413414, -0.01978364773094654, -0.011838279664516449, 0.008991987444460392, 0.000797328888438642, 0.0034908566158264875, 0.02575703337788582, 0.010389606468379498, -0.026063360273838043, 0.005012921057641506, -0.05370941385626793, 0.03762722387909889, 0.030760381370782852, -0.00696894945576787, -0.004170520696789026, 0.009323841892182827, 0.012527517043054104, -0.0008312322897836566, 0.014078299514949322, 0.004550239071249962, -0.008155968971550465, 0.0212259404361248, 0.0011120324488729239, -0.0007171572651714087, 0.0009373301290906966, -0.005635148845613003, 0.026216525584459305, 0.008085768669843674, 0.010025842115283012, 0.01841793768107891, -0.008085768669843674, 0.00712211336940527, 0.01638851873576641, 0.007300804369151592, -0.010249205864965916, 0.004818275570869446, -0.012125462293624878, 0.01056829746812582, -0.01502280868589878, 0.007907077670097351, 0.018762556836009026, -0.024646596983075142, -0.0015922646271064878, 0.03688693046569824, -0.013025298714637756, -0.016209827736020088, -0.020715394988656044, 0.008092150092124939, 0.00459172111004591, 0.024199869483709335, -0.003628065809607506, -0.015290845185518265, 0.020868558436632156, -0.001971983117982745, 0.004559811670333147, 0.02584637887775898, -0.014410153962671757, -0.007907077670097351, 0.014142117463052273, 0.006183985620737076, 0.010810806415975094, 0.025642160326242447, -0.02031972073018551, -0.009623787365853786, -0.0006274128681980073, -0.02582085132598877, 0.005185230169445276, 0.029688235372304916, 0.01701393723487854, -0.003208460984751582, 0.0135932806879282, 0.011653207242488861, 0.015252554789185524, -0.004524711985141039, 0.009910969994962215, 0.004534284584224224, -0.014129353687167168, 0.004556620959192514, 0.006617949344217777, -0.012310534715652466, -0.014167645014822483, 0.009323841892182827, 0.026727071031928062, -0.016911828890442848, 0.007371004205197096, -0.007268895395100117, 0.00474169384688139, 0.02439132332801819, -0.006445640232414007, 0.02647179737687111, -0.006783877033740282, -0.0060276309959590435, -0.0355595126748085, 0.004141802433878183, 0.006592422258108854, -0.015124917961657047, -0.009119623340666294, 0.023625504225492477, -0.047276537865400314, -0.008073004893958569, -0.011736170388758183, -0.0037716568913310766, -0.014895172789692879, 0.006075494457036257, -0.0053703030571341515, 0.01905612088739872, 0.00015824924048501998, -0.011136279441416264, -0.02109830267727375, 0.0394907146692276, -0.011761697940528393, -0.004084365908056498, -0.0021458875853568316, -0.0005939083057455719, -0.0409712977707386, 0.017996737733483315, -0.007307186257094145, -0.0342065654695034, -0.002102810423821211, 0.0028191697783768177, 0.015227027237415314, 0.006611567456275225, 0.010230060666799545, -0.005268194247037172, -0.0021586513612419367, 0.00850696861743927, -0.010510860942304134, -0.016860773786902428, -0.031653836369514465, 0.003478093072772026, -0.007804968394339085, 0.005727685056626797, 0.01772870123386383, 0.0004906025715172291, 0.005600048694759607, 0.005497939884662628, 0.03405340388417244, -0.01364433579146862, 0.01467819046229124, 0.0024522151798009872, -0.0039120567962527275, -0.012425407767295837, 0.020549466833472252, -0.014665426686406136, -0.016146009787917137, 0.006445640232414007, 0.013669862411916256, 0.01646510139107704, -0.02579532377421856, 0.04944635555148125, -0.007409295532852411, -0.010313024744391441, 0.013376299291849136, 0.02592296153306961, 0.0409712977707386, 0.02665048837661743, 0.029790345579385757, -0.013159316964447498, -0.0177159383893013, 0.017256446182727814, -0.01121286116540432, 0.009425951167941093, -0.013172080740332603, -0.026318633928894997, 0.008698423393070698, 0.005424548871815205, -0.020549466833472252, -0.02252783253788948, 0.009253641590476036, 0.02324259653687477, -0.012055261991918087, 0.023970123380422592, 0.0011583006707951427, 0.001814032904803753, 0.0032036746852099895, -0.003950347658246756, -0.023548923432826996, -0.0005779537605121732, -0.024212632328271866, -0.00614888546988368, -0.02108553983271122, -0.03607005625963211, -0.015367427840828896, 0.007020004093647003, 0.0004981809761375189, 0.0029468063730746508, -0.019924048334360123, 0.02527201548218727, 0.02389354072511196, 0.01501004584133625, -0.0014359100023284554, -0.016579974442720413, -0.008692041970789433, 0.027569470927119255, -0.022974560037255287, -0.024799760431051254, -0.016567209735512733, -0.023472340777516365] \ No newline at end of file