Installation
uv pip install hard-negatives
Usage
Mines hard negatives from existing query document pair datasets.
accelerate launch --multi_gpu main.py --input_path /home/henry/hard_negatives/parquets/*.parquet
Contributing
uvx ruff format
uvx ruff check --select I --fix .
@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/}}
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hard_negatives-0.1.6.tar.gz
(7.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hard_negatives-0.1.6.tar.gz.
File metadata
- Download URL: hard_negatives-0.1.6.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
871e06122bfd4e0ab09685e551ed6479e5cf59aebb74adb3e574c72cd17e2424
|
|
| MD5 |
3151dbcc727c078dcab456802a861555
|
|
| BLAKE2b-256 |
1e0581e33dc7c9295599b421528e1262211f472876ca64132963449fb8b8297c
|
File details
Details for the file hard_negatives-0.1.6-py3-none-any.whl.
File metadata
- Download URL: hard_negatives-0.1.6-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
712c919cbd5bdebccde4071caddb4ec5bb548e44231243544e2e1286787e2bc6
|
|
| MD5 |
bf0b52e1b84a354eba6f3368b29c1b95
|
|
| BLAKE2b-256 |
d89b86da2cdc5d09e6d5ac34c1b1de300bf8f97aa1f779d79812d53faf85f170
|