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.7.tar.gz
(7.8 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.7.tar.gz.
File metadata
- Download URL: hard_negatives-0.1.7.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51bda26fc3ff265e8fa9c536fef27ce5e50672b809933b0c4c8d0d39df093287
|
|
| MD5 |
72352d98e524acf1f9ed1630d47abb66
|
|
| BLAKE2b-256 |
a2e317f37eef26e82337e6a45905691374e633026dcec1da02f6a58423fdf185
|
File details
Details for the file hard_negatives-0.1.7-py3-none-any.whl.
File metadata
- Download URL: hard_negatives-0.1.7-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f89fa7b3eee319872fd3e158b809f01c97dedda60323aa2a79c514c48c2c0497
|
|
| MD5 |
d571839b1c5977748ed7582a92df2082
|
|
| BLAKE2b-256 |
6ab6862a8c29a9b313a6f2f9d8924162ce909bd9395514c394ab5ac75c0f0c6b
|