Installation
uv pip install hard-negatives \
--no-build-isolation-package flash-attn
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/}}
}
Metadata
Release files for hard-negatives 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hard_negatives-0.1.9.tar.gz | 7.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hard_negatives-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 kB
Release files / hard_negatives-0.1.9.tar.gz
| Download URL | hard_negatives-0.1.9.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26d2284de0bd92bab302242adbae45f6a31580880bbf5e26879294e53715917c
|
|
BLAKE2b-256 checksum How to use checksums |
e8f49cf07e506319a5b06d1dfde22860c4c90d69780ebc6c3641c5e33a3eb4d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / hard_negatives-0.1.9-py3-none-any.whl
| Download URL | hard_negatives-0.1.9-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39048d1b9a134a87b45b4283e3989322f28bd55361ce3f8464a332a52e7d639a
|
|
BLAKE2b-256 checksum How to use checksums |
983c8d55ea871316e60c69d766e3d130477a3e5dcfe0a6502fce9954b8e860de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for hard-negatives 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.