Skip to content
Back to skills

Hf Training Reranking

ASecurity

"Build safe SPLADE HuggingFace Trainer, reranker-training, rerank,

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 9, 2026
toolspythongobashnodeapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill hf-training-reranking --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hf Training Reranking?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Hf Training Reranking
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-hf-training-reranking/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-hf-training-reranking)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: hf-training-reranking
description: "Build safe SPLADE HuggingFace Trainer, reranker-training, rerank,
  and post-training handoff commands."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# HF Training and Reranking

Use this sub-skill when a task asks for SPLADE HuggingFace Trainer training, DPR/dense-vs-sparse flags, multiple hard negatives, reranker training, or applying a reranker to a SPLADE run. The runtime entry points are `python -m splade.hf_train`, `python -m splade.hf_train_reranker`, and `python -m splade.rerank`.

## Route First

- For HF SPLADE/DPR training, read `references/hf-training.md` and use `scripts/splade_hf_command_builder.py hf-train`.
- For training or applying rerankers, read `references/reranking.md` and use `scripts/splade_hf_command_builder.py hf-train-reranker` or `rerank`.
- For accepted training-file layouts and hard-negative formats, read `references/data-formats.md` before forming overrides.
- For failures around data types, negatives, checkpoints, optional reranker dependencies, or distributed launch, read `references/troubleshooting.md`.
- For classic post-training indexing and retrieval commands, use this sub-skill only for the handoff template, then route details to `../hydra-pipelines/SKILL.md`.
- For model internals, tensor shapes, and broader SPLADE data APIs, route to `../model-data-api/SKILL.md`.
- For Anserini, PISA, BEIR, pruning, and external evaluation workflows, route to `../pruning-export-evaluation/SKILL.md`.

## Fast Command Builder

The bundled helper prints commands only; it does not train models, import SPLADE, or download checkpoints.

```bash
python skills/splade/sub-skills/hf-training-reranking/scripts/splade_hf_command_builder.py hf-train \
  --config-name config_hf_splade_sigir23_32neg_distil \
  --checkpoint-dir '<CHECKPOINT_DIR>' \
  --index-dir '<INDEX_DIR>' \
  --out-dir '<OUT_DIR>' \
  --training-data-type json \
  --training-data-path '<HARD_NEGATIVES_JSON>' \
  --document-path '<COLLECTION_RAW_TSV>' \
  --query-path '<QUERIES_RAW_TSV>' \
  --qrels-path '<QRELS_JSON>' \
  --n-negatives 4 \
  --nproc-per-node 2
```

## What Good Output Includes

- A launch command with `--config-name`, `config.checkpoint_dir`, and all required `hf.data.*` paths when overriding data.
- A data validation note naming the `training_data_type`, the needed path files, and whether `n_negatives` is valid.
- A model-mode note explaining `hf.model.dense`, `hf.model.shared_weights`, `hf.model.splade_doc`, and `init_dict.model_type_or_dir_q` when relevant.
- A post-training note that `splade.hf_train` saves the final model under `config.checkpoint_dir/model`, then classic `splade.index` and `splade.retrieve` consume that checkpoint via Hydra configs.

Files in this skill

  • SKILL.md2.7 KB
  • references/data-formats.md4.8 KB
  • references/hf-training.md6.5 KB
  • references/reranking.md5.8 KB
  • references/troubleshooting.md5.3 KB
  • scripts/splade_hf_command_builder.py21.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.