Skip to main content

Mine hard negatives from text datasets.

Project description

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/test_pairs.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/}}
}

Project details


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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hard_negatives-0.1.4.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for hard_negatives-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3c558633f6cd7c2bd2e0482d7654421c69b37e2df81ed0a0598ddae48605b14d
MD5 b070629ac0d4f8a3a3cc07c5e9bf98d9
BLAKE2b-256 c66a1eac5486d9c6f8ae77154412dc09796c6b6512e7d0ecd35c53964ecc256b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hard_negatives-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cc040a50e7f4991104216e58b82943d8fd913ea44c91530d939e39d0f4eaf7df
MD5 a4052dbaa718d8faa408391d2bed2d16
BLAKE2b-256 50858e68f9368883cc3ce8e123b29a5e4067f42d73d97a157f6964cc95c33586

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page