Skip to main content

Fast Product Quantization index in C with Python bindings

Project description

Indice de Busqueda Vectorial usando Cuantificacion de Productos (PQ)

Esta libreria provee busqueda vectorial con PQ en C, con un wrapper de Python.

Inspirada por FAISS, usando como base para el algoritmo: Product quantization for nearest neighbor search

API

C

Funciones expuestas:

IndexPQ index_pq_init(int dimension, int n_subvectors, int n_bits_per_value);
void index_pq_train(IndexPQ *index, float *vectors, int n_vectors);
void index_pq_add(IndexPQ *index, float *vectors, int n_vectors);
IndexPQ_SearchResult index_pq_search(IndexPQ *index, float *vectors, int n_vectors, int n_neighbours);

Para usar la API en c, solo hay que descargar jumpsuit.h e incluirlo.

Tests

El codigo de prueba en jumpsuit/tests solo funciona para Linux. Para compilar el codigo de prueba, se debe correr ./build_tests.sh, y el ejecutable queda en ./build/tests/orange-jumpsuit.

Python

Codigo de uso:

from orange_jumpsuit import IndexPQ

index = IndexPQ(dimension, n_subvectors, n_bits_per_value)
index.train(train_data)
index.add(train_data)
distances, indices = index.search(query_data, n_neighbours)

Para instalar la libreria en python se puede usar pip:

pip install orange-jumpsuit

Esta libreria solo esta para Linux y Windows, y es posible que se intente de compilar si no existe el codigo pre-compilado en PyPI. Si esto ocurre, el proyecto se intenta de compilar con gcc (Linux) o cl.exe (MSVC en Windows).

Para armarla localmente puede correr build_lib.(sh/bat) para obtener libjumpsuit.(so/dll), o build_python_wheel.(sh/bat) para obtener dist/(...).whl que puede incluir en python con pip install [camino a .whl].

Estos scripts son para Linux y Windows respectivamente.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orange_jumpsuit-0.1.2.tar.gz (39.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

orange_jumpsuit-0.1.2-cp313-cp313-win_amd64.whl (12.7 MB view details)

Uploaded CPython 3.13Windows x86-64

orange_jumpsuit-0.1.2-cp313-cp313-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

orange_jumpsuit-0.1.2-cp312-cp312-win_amd64.whl (12.7 MB view details)

Uploaded CPython 3.12Windows x86-64

orange_jumpsuit-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

orange_jumpsuit-0.1.2-cp311-cp311-win_amd64.whl (12.7 MB view details)

Uploaded CPython 3.11Windows x86-64

orange_jumpsuit-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

orange_jumpsuit-0.1.2-cp310-cp310-win_amd64.whl (12.7 MB view details)

Uploaded CPython 3.10Windows x86-64

orange_jumpsuit-0.1.2-cp310-cp310-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

orange_jumpsuit-0.1.2-cp39-cp39-win_amd64.whl (12.7 MB view details)

Uploaded CPython 3.9Windows x86-64

orange_jumpsuit-0.1.2-cp39-cp39-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

orange_jumpsuit-0.1.2-cp38-cp38-win_amd64.whl (12.7 MB view details)

Uploaded CPython 3.8Windows x86-64

orange_jumpsuit-0.1.2-cp38-cp38-manylinux_2_28_x86_64.whl (12.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

File details

Details for the file orange_jumpsuit-0.1.2.tar.gz.

File metadata

  • Download URL: orange_jumpsuit-0.1.2.tar.gz
  • Upload date:
  • Size: 39.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orange_jumpsuit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4d7586ed4f6963db517884b85dda2574f74bb4a96f6e09bbd48eeb5038e3249f
MD5 86e756e116d5885aac14b5dc4dee251c
BLAKE2b-256 5308899f991fd32736d411309034696184e10c42051892bfa1962f618116cbb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2.tar.gz:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c106c9f9f232f9baa84527b9df9fc5dc25c0f17f5c3cec751f88a6edfb9c5f2f
MD5 279199a02f450e5deb1540c02298851f
BLAKE2b-256 00b4b3a6fa4aa0055909f44025c48361c77753d0e002e9af08edf81dcdb8eab4

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0080585971529d7ed43fc948024cc138f26a1a8b9780021071a16011661fcef1
MD5 04dfddbf50e24d33fd6a7c02d2b43a68
BLAKE2b-256 296e14e91e1c3a4d9bc49fb7f10bb2abba1f856d7d055515ba8fb1b77d1f604e

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 429252cbf68f4afc04ffdabe5e23da6b20765cab49cf65fcffe9a01f829dc911
MD5 a707024e074f8eba531e4048c3d9e615
BLAKE2b-256 0a41d023c5bcf9ad8c6d6726fa21cad282bd08b91bc2063f71d158a40adfad6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a4688dee988cb98076043dd17c413ca4bbce7e5ccb655d958bad4f3292ec973d
MD5 5ae25fef93e774b284f38240b01b8d90
BLAKE2b-256 3b2206e636fb16ddeb0e45c0e2904d4b2f6e13a91c2b26b0eecce19b52b4df52

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d253ca9a1ffd24dcc47fad86ce70e7ab0819977b968c51495410daa5e03e35b1
MD5 b08f398f753ef559d3ad236f4743401f
BLAKE2b-256 5379e6f83534ba9f639b1c8b95db6d1981df9e1e7f0c8c1680125af9879efd64

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 72c9f5e96b5cc1a89d2b018d24b41b3a96c8d4be4a44a37586c7c0b517bdcc70
MD5 4ec1e9800b2090f30f28a2af1ecce710
BLAKE2b-256 f82bbe1b963ff2c74cfa1354dc73e7167d14f805a83926ca51a5109e3071ed1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f1e87dd28a17d5dfe449d1ef23a55949f9b41d948fd833c27ba67065a01faabd
MD5 4e18dc0f3c8344d5d1f1ba407da3763b
BLAKE2b-256 997a112639b3b28efafbbefd0239726fbcdb8b4eeac1a38ca4d13baef08c5761

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ef07a461dfdeb42d9bec48ba1164d8ee0a7a114c9bbc24f8aeb19cbd09832e01
MD5 60312975e3c46216e73a16e1dcab1299
BLAKE2b-256 d50ddf1d9f58455270dfebb3c636a48e7607159bb77ad62f1fefcbb4083fbe1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f3a82e17e34d0ff5d48d740a9ec2ef62de283a75c70af4d5926cf0f414505263
MD5 550c9f65f43f54255ad178b213abe5d7
BLAKE2b-256 c1637a291235c7b78d95b7c745c16008bf715b202dc7c43c6623139b59bb1b0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp39-cp39-win_amd64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c11194881213b81dcb0e7764ab7bca20a9aef2321ea8d2c765802bb1269e5692
MD5 c5dd898900e5041af8557169910cad24
BLAKE2b-256 ab2abf04aa7edfd51f6b7228dc23d3e6629fe38727d2dbc0b83bd7b3f13488ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp39-cp39-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 976dad193bd125b8d86a4750ad130a885cf6dda2bcfd2afa7a6e03df0406ba9f
MD5 311eb0157004bac8290f4ac229982779
BLAKE2b-256 592b0ebf3c008924b15181ca9391919f108e358eb565a7e65e53714117b5c021

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp38-cp38-win_amd64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orange_jumpsuit-0.1.2-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orange_jumpsuit-0.1.2-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 053f81606715a670864afc36a2361133979ddbb11aac69000a1cf1c04006ce17
MD5 244b77026b144146f8f937d169d19c30
BLAKE2b-256 2102e832dbfbf6cac1593cda441b57fa3f709edc17ec9ac071295c8a208d211b

See more details on using hashes here.

Provenance

The following attestation bundles were made for orange_jumpsuit-0.1.2-cp38-cp38-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on FedericoVareika/orange-jumpsuit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page