Metadata-Version: 2.1
Name: annax
Version: 0.0.1
Summary: Fast and memory-efficient approximate nearest neighbor search with JAX
Home-page: https://github.com/atksh/annax
Author: atksh
License: MIT License
        
        Copyright (c) 2023 atksh
        
        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.
        
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jax (>=0.4.8)
Requires-Dist: jaxlib (>=0.4.7)
Requires-Dist: numpy (>=1.24.2)
Requires-Dist: zstandard (~=0.20.0)
Provides-Extra: dev
Requires-Dist: pytest (~=7.2.2) ; extra == 'dev'
Requires-Dist: black (~=23.3.0) ; extra == 'dev'
Requires-Dist: isort (~=5.12.0) ; extra == 'dev'
Requires-Dist: pre-commit (~=3.2.2) ; extra == 'dev'

# Annax: Approximate Nearest Neighbor Search with JAX

Annax is a high-performance Approximate Nearest Neighbor (ANN) library built on top of the JAX framework. It provides fast and memory-efficient search for high-dimensional data in various applications, such as large-scale machine learning, computer vision, and natural language processing. Annax leverages the power of GPU acceleration to deliver outstanding performance and includes a wide range of indexing structures and distance metrics to cater to different use cases. The easy-to-use API makes it accessible to both beginners and experts in the field.

## Features

- Fast and memory-efficient approximate nearest neighbor search
- GPU acceleration for high-performance computing
- Supports a wide range of indexing structures and distance metrics
- Easy-to-use API for seamless integration with existing projects
- Applicable to various domains, including machine learning, computer vision, and natural language processing
- Built on top of the JAX framework for enhanced flexibility and extensibility

## Installation

To install Annax, simply run the following command in your terminal:

```bash
pip install annax
```

## Quick Start

Here's a simple example of using Annax to find the nearest neighbors in a dataset:

```python
import numpy as np
import annax

# Generate some random high-dimensional data
data = np.random.random((1000, 128))

# Create an Annax index with the default configuration
index = annax.Index(data)

# Query for the 10 nearest neighbors of a random vector
query = np.random.random(128)
neighbors, distances = index.search(query, k=10)
```

### Index Types

- `annax.Index`: Flat Index
- `annax.IndexIVF`: Inverted File Index
- `annax.IndexPQ`: Product Quantization Index
- `annax.IndexIVFPQ`: Inverted File Index with Product Quantization



## Development

To install Annax for development, run the following commands in your terminal:

```bash
python -m pip install -e '.[dev]'
pre-commit install
```

## License

Annax is released under the MIT License.
