Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hard_negatives-0.1.6-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

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

Hashes for hard_negatives-0.1.6.tar.gz
Algorithm Hash digest
SHA256 871e06122bfd4e0ab09685e551ed6479e5cf59aebb74adb3e574c72cd17e2424
MD5 3151dbcc727c078dcab456802a861555
BLAKE2b-256 1e0581e33dc7c9295599b421528e1262211f472876ca64132963449fb8b8297c

See more details on using hashes here.

File details

Details for the file hard_negatives-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for hard_negatives-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 712c919cbd5bdebccde4071caddb4ec5bb548e44231243544e2e1286787e2bc6
MD5 bf0b52e1b84a354eba6f3368b29c1b95
BLAKE2b-256 d89b86da2cdc5d09e6d5ac34c1b1de300bf8f97aa1f779d79812d53faf85f170

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

This release

0.1.6 This release

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page