Metadata-Version: 2.4
Name: hard-negatives
Version: 0.1.5
Summary: Mine hard negatives from text datasets.
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: accelerate>=1.14.0
Requires-Dist: datasets>=5.0.0
Requires-Dist: flash-attn>=2.8.3.post1
Requires-Dist: ninja>=1.13.0
Requires-Dist: packaging>=26.2
Requires-Dist: psutil>=7.2.2
Requires-Dist: sentence-transformers>=5.6.0
Requires-Dist: torch>=2.13.0
Requires-Dist: usearch>=2.26.0

## Installation
```bash
uv pip install hard-negatives
```

## Usage
Mines hard negatives from existing query document pair datasets.
```bash
accelerate launch --multi_gpu main.py --input_path /home/henry/hard_negatives/parquets/*.parquet
```

## Contributing
```bash
uvx ruff format
uvx ruff check --select I --fix .
```

```bibtex
@software{shippole2026hardnegatives,
  title        = {Hard Negatives: A Python Library for Mining Hard Negative Examples},
  author       = {Shippole, Enrico and Chaffin, Antoine and Aarsen, Tom},
  year         = {2026},
  url          = {https://github.com/teraflop-ai/hard-negatives},
  version      = {1.0.0},
  note         = {Python package available on PyPI at \url{https://pypi.org/project/hard-negatives/}}
}
```
