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/*.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.5.tar.gz
(7.6 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.5.tar.gz.
File metadata
- Download URL: hard_negatives-0.1.5.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73fc05f8103629c893ff6ca00e9a72a67beb98f2eb8d9ca1fa069fb552e035fc
|
|
| MD5 |
97059f8133c21aff983589b9d43ed624
|
|
| BLAKE2b-256 |
c810cb63411f3829df68a50bf72c72a990041c24facdd451170daaf965899a5e
|
File details
Details for the file hard_negatives-0.1.5-py3-none-any.whl.
File metadata
- Download URL: hard_negatives-0.1.5-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3252ce117d93b46b702dc28e5e302b4d7c2b02d2d02b8730ac2c6ea5d65a9a18
|
|
| MD5 |
58fd91410de79be495363033bd83e889
|
|
| BLAKE2b-256 |
b2e16541aeeb863ea7412351840e38744d4f47b86ac698034a5a4f90ed77685d
|