Skip to content
Back to skills

Evaluation And Training

ASecurity

"Route sentence-transformers evaluation and training tasks across

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 9, 2026
ai-agentspythongobashapibackend

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

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

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Evaluation And Training?

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

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

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: evaluation-and-training
description: "Route sentence-transformers evaluation and training tasks across
  SentenceTransformer, CrossEncoder, and SparseEncoder trainers, losses,
  evaluators, dataset shapes, samplers, smoke tests, and safe training
  scaffolding."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Evaluation and Training

Use this sub-skill when a task asks how to evaluate, fine-tune, smoke-test, or debug training for `SentenceTransformer`, `CrossEncoder`, or `SparseEncoder` models.

Keep this file as the router. Open the references before writing code or giving final training advice.

## Route by request

| Request | Read first | Use for |
| --- | --- | --- |
| Build a safe training workflow | `references/training-reference.md` | Trainer classes, training args, datasets, samplers, model cards, baseline eval, smoke tests |
| Pick evaluator or `metric_for_best_model` | `references/evaluation-reference.md` | Evaluator families, primary metric keys, baseline/final eval practice |
| Match data shape to loss | `references/loss-routing.md` | Dense, reranker, sparse, distillation, pair/list/triplet routing |
| Diagnose failures | `references/troubleshooting.md` | Install extras, API misuse, metrics, samplers, optional backends/services |
| Validate a proposed plan without training | `scripts/training_plan_check.py` | Static checks for model type, data shape, loss, evaluator, sampler, and extras |

## Model-type routing

- Use `SentenceTransformerTrainer` for dense bi-encoders: retrieval embeddings, STS, clustering, paraphrase mining, distillation, Matryoshka, static embeddings, and most vector-search fine-tuning.
- Use `CrossEncoderTrainer` for rerankers or pair classifiers: pair scoring, top-K reranking, NLI-style classification, BCE/ranking/listwise reranker losses.
- Use `SparseEncoderTrainer` for SPLADE-style learned sparse retrieval: sparse vectors, inverted-index retrieval, FLOPS regularization, sparse/distillation losses.
- If the task is really about choosing model architecture, prompts, multimodal support, reranking inference, sparse search, or backend export, route to the relevant model or backend sub-skill first, then return here for evaluation/training details.

## Non-negotiable training checks

- Install the training stack before training: `pip install "sentence-transformers[train]"`; add `image`, `audio`, or `video` extras only for multimodal data.
- Use `datasets.Dataset` or `DatasetDict`; label columns must be named `label`, `labels`, `score`, or `scores`; other columns are inputs and their order matters.
- Run the evaluator once before `trainer.train()` to record a baseline, then compare final or best-checkpoint metrics against it.
- For contrastive dense/sparse losses, set `batch_sampler=BatchSamplers.NO_DUPLICATES`; for batch triplet losses, use `BatchSamplers.GROUP_BY_LABEL`.
- For multi-dataset training, set `multi_dataset_batch_sampler=MultiDatasetBatchSamplers.PROPORTIONAL` or `ROUND_ROBIN` deliberately.
- Smoke-test every long run with a tiny dataset slice and `max_steps=1` before committing GPU time.

## Script quick check

Run the bundled checker to catch common plan mismatches before writing a full script:

```bash
python sub-skills/evaluation-and-training/scripts/training_plan_check.py \
  --model-type cross-encoder \
  --data-shape pair-binary \
  --loss BinaryCrossEntropyLoss \
  --evaluator CrossEncoderRerankingEvaluator
```

The checker is static and does not import or train `sentence-transformers`; it validates routing assumptions and prints warnings to carry into the real script.

Files in this skill

  • SKILL.md3.6 KB
  • references/evaluation-reference.md6.8 KB
  • references/loss-routing.md7.8 KB
  • references/training-reference.md8.2 KB
  • references/troubleshooting.md6.9 KB
  • scripts/training_plan_check.py13.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.