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.8.tar.gz (7.6 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.8-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file hard_negatives-0.1.8.tar.gz.

File metadata

  • Download URL: hard_negatives-0.1.8.tar.gz
  • Upload date:
  • Size: 7.6 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

Hashes for hard_negatives-0.1.8.tar.gz
Algorithm Hash digest
SHA256 7d54246c34d9e975d57d6d8183cd0152faa462aea34536494f7794adf34eec38
MD5 15d8d710ee1aa51c90ac9eca51a1d90e
BLAKE2b-256 59ee3247f366666e3ae6e5ac8776e9af898cca4589cc11fbbf56176491d3ff6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hard_negatives-0.1.8-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

Hashes for hard_negatives-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 056f89c86b4723deb914e9b224317b4f129500904bc515acc0c2e60d00cd86af
MD5 b349a9174d1c62f8e3e43a74c6cdbf99
BLAKE2b-256 f0232a85dcf2d9ca85a113f3e0ee7537b10de2ae72d459afd573319acd3df47e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.9

2 files

This release

0.1.8 This release

2 files

0.1.7

2 files

0.1.6

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