Data & Analysis

Sentence Transformers Training Assistant

Train retrieval, similarity, reranking, and sparse-search models with Sentence Transformers.

47/ 100
Use with care

Useful, but reliability, evidence or controls still have material gaps.

See how it was scored ↓
Works as-is in
Codex · Claude Code
Stars
★ 11k
Last updated
19d ago
License
Apache-2.0
sentence-transformerscross-encodersparse-encodermodel-training
+2hard-negative-mininghugging-face-hub

What does this skill do, and when should you use it?

This skill guides agents through training or fine-tuning SentenceTransformer, CrossEncoder, and SparseEncoder models. It covers loss selection, dataset formats, evaluators, hard-negative mining, distillation, LoRA, Matryoshka training, and Hugging Face Hub publishing. The SKILL.md acts primarily as a router; the detailed procedures live in the referenced files and scripts. It is a good fit for structured, repeatable embedding and reranker training, but the file should not be used alone to synthesize a training script.

It identifies the appropriate bi-encoder, cross-encoder, or SPLADE sparse-encoder path; requires the relevant loss, evaluator, architecture, training-argument, dataset, model-selection, and troubleshooting references; starts from scripts/train_<type>_example.py; substitutes the model, dataset, loss, and evaluator; runs a max_steps=1 smoke test before a longer run; records logs and baseline-versus-final metrics; and attempts to publish the trained model to the Hugging Face Hub.

Good fit
  • A retrieval team fine-tuning a SentenceTransformer for vector search or semantic similarity.
  • A search engineer adding a CrossEncoder reranker after bi-encoder retrieval.
  • A team training SPLADE-style sparse embeddings for inverted-index retrieval.
  • A researcher improving an embedding model with hard-negative mining, distillation, LoRA, or Matryoshka training.
  • An ML engineering team that needs smoke tests, baseline metrics, verdict logging, and reproducible training scaffolding.

How do you install this skill?

Before you use it
  • The default workflow publicly pushes the model to the Hugging Face Hub and requires a write-capable token; manually confirm the destination, token scope, and publication policy for private or sensitive data.
  • The skill depends on Hugging Face Hub, remote model and dataset downloads, and optionally HF Jobs; mainland-China connectivity, proxy, rate-limit, or credential failures may prevent the core workflow from completing.
  • Do not generate a training script from this SKILL.md alone; verify the referenced production template, complete reference set, and installed sentence-transformers version.
  • No code or tests were executed; reliability, effectiveness, and evidence scores are conservative static estimates.
Before you start
Your agent needs
  • Shell / CLI
  • Network access
  • Local filesystem
Install first
  • Python
  • sentence-transformers[train]>=5.0
  • Hugging Face Hub authentication

Copy or symlink the skills/train-sentence-transformers/ folder into a standard Codex .agents/skills location, such as $REPO_ROOT/.agents/skills or $HOME/.agents/skills. Install the training dependency with: pip install "sentence-transformers[train]>=5.0". To publish models, run hf auth login or set an HF_TOKEN with write scope.

Generic route: install into Claude Code manually (macOS / Linux)
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/huggingface/skills.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/skills/train-sentence-transformers" ~/.claude/skills/
rm -rf "$tmp"

Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.

How do you use this skill?

Try saying

Once installed, send your agent any of these to trigger it:

  • Use SentenceTransformer to train a semantic retrieval model on my question-answer dataset, and run a max_steps=1 smoke test first.

After installation, give the coding agent a specific request such as: "Use SentenceTransformer to train a semantic retrieval model on my question-answer dataset, and run a max_steps=1 smoke test first." If the model type is unclear, identify whether the task needs a bi-encoder, cross-encoder, or sparse encoder. The detailed parameters and template behavior are defined in the referenced files under references/ and scripts/.

What are this skill's strengths and limitations?

Pros
  • Covers dense bi-encoders, CrossEncoder rerankers, and SPLADE sparse encoders.
  • Provides a structured reading path for losses, evaluators, datasets, hardware, and troubleshooting.
  • Requires production templates, smoke tests, baseline metrics, and a machine-readable verdict line.
  • Includes workflows for LoRA, distillation, Matryoshka training, hard-negative mining, and Hub publishing.
Limitations
  • The SKILL.md is a router, so the complete training guidance is distributed across references and scripts.
  • A GPU is strongly recommended; CPU use is limited to demos and StaticEmbedding scenarios.
  • The source provides no test-suite results, platform-specific validation, or concrete hardware benchmarks.
  • Hub publishing requires write authentication, and HF Jobs runs require additional configuration guidance.

How does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
Sentence Transformers Training Assistant this page 47 · Use with care ★ 11k 19d ago Apache-2.0
Hugging Face LLM Trainer 48 · Use with care ★ 11k 19d ago Apache-2.0
Hugging Face Model Memory Estimator 44 · Not recommended ★ 11k 19d ago Apache-2.0
TAO AutoML Tuning ✓ NVIDIA · Official 54 · Use with care ★ 3.6k 13d ago Apache-2.0
OCDNet Scene Text Detection ✓ NVIDIA · Official 53 · Use with care ★ 3.6k 13d ago Apache-2.0

How did FollowSkills review this skill?

FollowSkills review · FSRS-2.0
Use with care
47/ 100 5-point scale 2.4 / 5
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
1Trust13 / 25 · 2.6/5

The skill makes HF_TOKEN use, write-scoped authentication, and default public Hub publishing visible, so its external data and publication flow is not concealed. It does not require confirmation before publication, define least-privilege handling, address sensitive training data, or provide rollback and pre-publication checks, so points are deducted.

2Reliability8 / 20 · 2.0/5

The routing, loss/data-shape mappings, evaluator key conventions, smoke-test requirement, logging, and troubleshooting guidance are fairly consistent and document several incompatibilities. However, the referenced production templates and scripts are not included in the supplied evidence, and there is no statically verifiable key-path test coverage, so the score is limited and deductions apply.

3Adaptability8 / 15 · 2.7/5

The skill covers three model types and gives trigger phrases, task mappings, and non-English model-selection hints. Its claim to cover any sentence-transformers training task is broad, while non-fit boundaries, Chinese-language quality, and mainland-China network reachability are not sufficiently established, especially for Hub and Jobs dependencies.

4Convention8 / 15 · 2.7/5

The router-plus-references/scripts structure is readable and provides prerequisites, examples, defaults, limitations, and troubleshooting. The selected skill does not clearly state maintenance ownership, versioning policy, changelog, or update path, and its core templates are absent from the supplied evidence, so points are deducted.

5Effectiveness6 / 15 · 2.0/5

The guidance addresses loss selection, evaluation, hard-negative mining, smoke tests, logging, and Hub publication and could reduce manual trial and error. Still, usable execution depends on production templates, scripts, and additional references not supplied here, with no verifiable representative outputs; direct usability and comparative benefit therefore remain limited.

6Verifiability4 / 10 · 2.0/5

The material contains concrete commands, parameters, metric keys, and failure modes, providing limited auditability. This review is static only, with no execution results, committed key-path test suite, or third-party reproduction evidence, and several critical referenced files are missing, so a higher score is not justified.

1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Jul 20, 2026 Reviewed revision 86cdeee824b7 Review evidence[1][2][3][4][5][6][7][8][9][10][11][12][13]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

See the full review method →

FAQ

Which model types does it support?
It supports SentenceTransformer bi-encoders, CrossEncoder rerankers, and SparseEncoder/SPLADE sparse encoders.
Is a GPU mandatory?
No, but a GPU is strongly recommended. CPU is mainly suitable for demos and SentenceTransformer StaticEmbedding.
Does it publish models automatically?
The default workflow attempts to publish at the end of the run inside a try/except block. Hugging Face Hub write authentication is still required.
What happens when training metrics do not improve?
The workflow requires the symptom-indexed troubleshooting reference, including guidance for metric stagnation and Hub push failures.

More skills from this repository

All from huggingface/skills

Data & Analysis

Hugging Face LLM Trainer

Train, fine-tune, and preserve models on Hugging Face cloud GPUs.

★ 11k FS 48 Use with care 19d ago
Dev & Engineering

Hugging Face Local Model Runner

Choose compatible GGUF quantizations from Hugging Face and run them locally with llama.cpp.

★ 11k FS 44 Not recommended 19d ago
Dev & Engineering

Hugging Face MCP Assistant

Connect agents to Hugging Face Hub for searchable models, datasets, documentation, apps, and compute jobs.

★ 11k FS 36 Not recommended 19d ago
Data & Analysis

Hugging Face Model Memory Estimator

Estimate inference memory without downloading model weights.

★ 11k FS 44 Not recommended 19d ago
Writing & Content

Hugging Face Paper Publisher

Publish, connect, and manage research papers on the Hugging Face Hub.

★ 11k FS 36 Not recommended 19d ago
Data & Analysis

Hugging Face Local Evaluator

Run controlled inspect-ai or lighteval evaluations for Hugging Face Hub models on local hardware.

★ 11k FS 47 Use with care 19d ago
Dev & Engineering

Hugging Face Hub CLI Skill

Give agents command-line control over Hugging Face Hub models, datasets, Spaces, jobs, and infrastructure.

★ 11k FS 42 Not recommended 19d ago
Dev & Engineering

LoRA Space Demo Builder

Build and publish a tailored Gradio Space for a Hugging Face LoRA.

★ 11k FS 51 Use with care 19d ago
Dev & Engineering

Hugging Face Spaces Builder

Build, deploy, debug, and maintain machine-learning apps on Hugging Face Spaces.

★ 11k FS 50 Use with care 19d ago
Data & Analysis

Trackio Experiment Tracking

Log, monitor, and query machine-learning experiments with dashboards, diagnostic alerts, and automation-ready output.

★ 11k FS 43 Not recommended 19d ago
Data & Analysis

Hugging Face Vision Trainer

Train detection, classification, and segmentation models on Hugging Face Jobs GPUs and persist the results to the Hub.

★ 11k FS 43 Not recommended 19d ago
Data & Analysis

Hugging Face Model Finder

Recommends AI models by task, benchmark performance, and available device memory.

★ 11k FS 42 Not recommended 19d ago
Dev & Engineering

Hugging Face API Tool Builder

Turn Hugging Face API calls into reusable, composable command-line tools.

★ 11k FS 41 Not recommended 19d ago
Dev & Engineering

Hugging Face ZeroGPU Builder

Build dependable Gradio AI demos and GPU workloads on Hugging Face ZeroGPU.

★ 11k FS 56 Use with care 19d ago
Data & Analysis

Hugging Face Dataset Explorer

Explore, query, and extract Hugging Face datasets through the Dataset Viewer API.

★ 11k FS 49 Use with care 19d ago
Dev & Engineering

Hugging Face Paper Research Assistant

Read AI papers and retrieve structured metadata from Hugging Face paper pages.

★ 11k FS 49 Use with care 19d ago
Automation & Ops

SageMaker Deployment Planner

Choose a practical Amazon SageMaker deployment path for your model, traffic pattern, and latency needs.

★ 11k FS 50 Use with care 19d ago
Data & Analysis

TRL Language Model Trainer

Train and fine-tune transformer language models with TRL’s CLI for SFT, preference alignment, and reinforcement learning.

★ 11k FS 48 Use with care 19d ago
Data & Analysis

Transformers.js Inference Skill

Run Hugging Face models directly inside JavaScript applications.

★ 11k FS 46 Use with care 19d ago
Automation & Ops

AWS Context Discovery

Resolve the active AWS environment before any account operation.

★ 11k FS 50 Use with care 19d ago

Related skills