Skip to content
AI Primer
๐Ÿค– ML/AI

train-sentence-transformers

huggingfaceby huggingface4 months ago19.1k

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.

Install

npx skills add https://github.com/huggingface/sentence-transformers --skill train-sentence-transformers
Show step-by-step
  1. 1

    Open your terminal

    • Mac: Press โŒ˜ Space, type "Terminal", press Enter
    • Windows: Press Win R, type "cmd", press Enter
  2. 2

    Paste the command above and press Enter

    Use the Copy command button, then paste in your terminal (Mac: โŒ˜V, Windows: Ctrl V).

  3. 3

    Restart Claude Code

    Close and reopen Claude Code, or start a new session, so it picks up the new skill.

Where it lives
~/.claude/skills/huggingface--sentence-transformers--skills--train-sentence-transformers/
โ”œโ”€โ”€ SKILL.md
โ””โ”€โ”€ ... (skill resource files)
View on GitHub

Comments

Always review skill code before installing. Third-party skills may contain scripts that run on your machine.

Related skills

๐Ÿ’ป Developer Tools

dynamic-workflow

Plan-in-code fan-outs, adversarial verification, waves.

by NousResearch ยท 8 days ago248.3k
๐Ÿค– ML/AI

comfyui

Generate images, video, and audio via diffusion workflows.

by NousResearch ยท 4 months ago248.3k
๐Ÿค– ML/AI

hyperframes

Render MP4/WebM videos from HTML compositions.

by NousResearch ยท 4 months ago248.3k
๐Ÿ’ป Developer Tools

claude-api

Reference for the Claude API / Anthropic SDK โ€” model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER โ€” read BEFORE opening the target file; don't skip because it "looks like a one-liner" โ€” whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) โ€” never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named โ€” don't Read the file).

by anthropics ยท 5 months ago177.8k