Skip to content
Back to skills

Training

ASecurity

"Prepare BEIR training pairs and triplets, build evaluators, select

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
businesspythonapi

Works with

  • api

Security analysis

A100/100

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

Scanned September 8, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Training?

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

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

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: training
description: "Prepare BEIR training pairs and triplets, build evaluators, select
  losses, and plan safe SentenceTransformers training runs."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# BEIR Training

Use this sub-skill when the task is to prepare or validate BEIR/SentenceTransformers training inputs, construct `TrainRetriever` data loaders and evaluators, choose BEIR-compatible losses, or plan a safe training invocation.

## Route

- Start with [references/workflows.md](references/workflows.md) for pair/triplet preparation, hard-negative patterns, evaluator setup, and safe training planning.
- Use [references/api-reference.md](references/api-reference.md) for `TrainRetriever`, `BPRLoss`, `MarginMSELoss`, SentenceTransformers loss choices, and fit parameters.
- Use [references/troubleshooting.md](references/troubleshooting.md) for qrels/corpus mismatches, empty dev sets, `max_corpus_size`, triplet shape, dependency compatibility, and expensive training failures.

## Bundled Helper

- Run a no-download training data preflight: `python scripts/training_data_smoke.py`
- Check the `max_corpus_size` guard explicitly: `python scripts/training_data_smoke.py --exercise-max-corpus-error`

The helper imports BEIR training classes, uses tiny in-memory data, validates `InputExample` creation, checks triplet shape expectations, constructs a tiny IR evaluator, and exercises common failure modes without downloading a model or running training.

## Boundaries

- This sub-skill owns `beir.retrieval.train.TrainRetriever`, `beir.losses.BPRLoss`, `beir.losses.MarginMSELoss`, training pair/triplet conversion, evaluator construction for training callbacks, optimizer/scheduler defaults, and training safety planning.
- Route dataset file layout, loader use, and BEIR-format validation to [../data-loading/SKILL.md](../data-loading/SKILL.md).
- Route generated synthetic queries or passage expansion to [../generation/SKILL.md](../generation/SKILL.md).
- Route final retrieval runs and metric reporting after a checkpoint is trained to [../retrieval-evaluation/SKILL.md](../retrieval-evaluation/SKILL.md).
- Route second-stage cross-encoder reranking to [../reranking/SKILL.md](../reranking/SKILL.md).

Files in this skill

  • SKILL.md2.2 KB
  • references/api-reference.md7.5 KB
  • references/troubleshooting.md5.3 KB
  • references/workflows.md6.8 KB
  • scripts/training_data_smoke.py10.4 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.