Agent skill · AI agents · huggingface

train-sentence-transformers agent skill by huggingface

Trains and fine-tunes sentence-transformers models, including bi-encoders, cross-encoders, sparse encoders, and multi-vector encoders, with guidance on loss selection, hard-negative mining, evaluators, and Hub publishing.

View on GitHub Read SKILL.md

At a glance

PublisherHugging Face Official
Repositoryhuggingface/skills (24 listed skills)
CategoryAI Agents and LLM Engineering
LicenseApache-2.0
Last commitOctober 8, 2026 (repository)
SKILL.md104 lines, 1,101 words
Bundled files31 files, including references, scripts
Quality score83/100 · B Passes all seven graded checks
Security scanNot scanned
README badgeGet the badges for this listing

Before you install

Read from the skill's files at the directory's October 22, 2026 snapshot: what ships with it, what its code reads, and the terms it is published under.

Install train-sentence-transformers

The skills CLI works with Claude Code, Codex, Cursor and other agents; the other routes copy the folder by hand.

Skills CLI
npx skills add https://github.com/huggingface/skills/tree/main/skills/train-sentence-transformers
Claude Code, project-level copy
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/huggingface/skills.git "$tmp/repo"
mkdir -p .claude/skills
cp -R "$tmp/repo/"skills/train-sentence-transformers .claude/skills/
rm -rf "$tmp"
Codex, project-level copy
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/huggingface/skills.git "$tmp/repo"
mkdir -p .agents/skills
cp -R "$tmp/repo/"skills/train-sentence-transformers .agents/skills/
rm -rf "$tmp"

For a user-level install, copy the folder to ~/.claude/skills/ (Claude Code) or ~/.agents/skills/ (Codex). Inside Codex, $skill-installer can also fetch a skill from GitHub. New to skills? Read How to install agent skills in Claude Code, Codex and Cursor.

huggingface/skills is third-party code. Read SKILL.md and any bundled scripts before you install it.

How the author describes it

Train or fine-tune sentence-transformers models across `SentenceTransformer` (bi-encoder, dense or static embedding model for retrieval, similarity, clustering, classification, paraphrase mining, dedup, multimodal), `CrossEncoder` (reranker, pair scoring for two-stage retrieval / pair classification), `SparseEncoder` (SPLADE, sparse embedding model for learned-sparse retrieval), and `MultiVectorEncoder` (ColBERT / late-interaction, per-token embeddings scored with MaxSim). Covers loss selection, hard-negative mining, evaluators, distillation, LoRA, Matryoshka, and Hugging Face Hub publishing. Use for any sentence-transformers training task.

From the description field of SKILL.md. Agents read this line to decide when to load the skill.

Sections in SKILL.md

Files in the skill folder

Showing 24 of 31 files. Browse the folder on GitHub.

Suede Skill Check: 83/100 · B

Report snapshot · · graded-v2

The rubric totals 100 points; published scores are capped at 99. Security scan: not scanned.

Source revision: c3ff942be3e0. Report version 23fb98671082. Badge URLs follow the latest listing; save the report to keep this version.

Download report · Request a fresh review

What to review next

  • Boundary clause: 0 of 4 points. 4 when the description says when not to use the skill (“Not for …”, “Do not use …”, “Use … instead”).
  • Example request: 0 of 3 points. 3 when the description quotes an example request (3–60 characters in quotation marks).
  • Description length: 3 of 5 points. 5 for 150–600 characters; 3 for 100–900; 1 for 50–1,024.

Add declarations and bundled files when they describe the skill’s actual needs. Update the source, then request a fresh review with the changed commit or PR.

train-sentence-transformers passes the required frontmatter check and all seven graded checks, which cover the SKILL.md format, a declared license and a commit in the last year. Those checks earn 56 of the score’s points; the rest come from description quality, instruction depth, bundled files, maintenance and curated-list citations. How the score works.

See the checks and points
CheckResult
Frontmatter parses and declares a name and a descriptionPass
Name uses lowercase letters, digits and hyphens, 64 characters or fewerPass
Name matches the skill's folder namePass
Description is between 50 and 1,024 charactersPass
Description says when an agent should use the skillPass
SKILL.md body is 500 lines or fewerPass
A license is declared in the frontmatter or the repositoryPass
Repository has a commit in the last 12 monthsPass
Score componentPoints
Structural checks56 of 56
Description length3 of 5
Boundary clause0 of 4
Example request0 of 3
Instruction depth7 of 7
Reference files3 of 3
Bundled scripts2 of 2
Recent maintenance9 of 9
Curated-list citations3 of 7
Tool permissions declared0 of 2
Compatibility declared0 of 2

Two badges for train-sentence-transformers

Suede Skill Check: 83/100Suede Skill Check: Grade B

Choose the numeric badge, the letter badge, or both. Each links to this skill’s Suede AI listing; either valid linked badge can qualify for the feature offer.

Markdown
[![Suede Skill Check: 83/100](https://suedeai.directory/huggingface/skills/train-sentence-transformers/score.svg)](https://suedeai.directory/huggingface/skills/train-sentence-transformers/)
[![Suede Skill Check: Grade B](https://suedeai.directory/huggingface/skills/train-sentence-transformers/badge.svg)](https://suedeai.directory/huggingface/skills/train-sentence-transformers/)
HTML
<a href="https://suedeai.directory/huggingface/skills/train-sentence-transformers/"><img src="https://suedeai.directory/huggingface/skills/train-sentence-transformers/score.svg" alt="Suede Skill Check: 83/100" width="160" height="175"></a>
<a href="https://suedeai.directory/huggingface/skills/train-sentence-transformers/"><img src="https://suedeai.directory/huggingface/skills/train-sentence-transformers/badge.svg" alt="Suede Skill Check: Grade B" width="160" height="175"></a>

Suede Certified on the shield refers to this published structural quality check. Security scan: not scanned. Read the methodology.

Limited-time feature offer: Display either quality badge in your repository or skill README, linked to your listing, then request verification. Suede AI checks the rendered README at a recorded commit. Eligible skills scoring 80–99 with a verified badge can receive a featured placement while the offer is open. Request badge verification.

Publishers: read How to get your agent skill found in search and cited by AI assistants.

Where this skill is cited

huggingface/skills appears in 2 curated lists: heilcheng/awesome-agent-skills, skillmatic-ai/awesome-agent-skills.

All AI agent and LLM engineering skills

More from huggingface/skills

All 24 skills in huggingface/skills