train-sentence-transformers

Automate training and fine-tuning of sentence-transformers models with Hugging Face Hub.

1|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/noahsilve123/claude-skillset --skill train-sentence-transformers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: train-sentence-transformers
Source: https://github.com/noahsilve123/claude-skillset/tree/main/skills/train-sentence-transformers
Command: npx skills add https://github.com/noahsilve123/claude-skillset --skill train-sentence-transformers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sentence-transformers, datasets, huggingface_hub, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps users train and fine-tune sentence-transformers models for a variety of tasks, including retrieval, similarity, clustering, classification, paraphrase mining, deduplication, and multimodal applications.

Core Features & Use Cases

  • Model Training: Offers a comprehensive guide for training sentence-transformers models, including loss selection, hard-negative mining, evaluators, distillation, and Hugging Face Hub publishing.
  • Model Selection: Provides instructions for selecting the appropriate model architecture for different tasks, such as retrieval, reranking, and sparse embeddings.
  • Use Case: A researcher wants to train a sentence-transformers model for similarity detection. This Skill guides them through the process, including choosing the right model, loss function, and evaluation metrics.

Quick Start

To train a sentence-transformers model for similarity detection, run the following commands:

python train_sentence_transformer_example.py

Frequently Asked Questions about train-sentence-transformers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a sentence-transformers model for retrieval and similarity tasks?

You can train sentence-transformers models for retrieval and similarity by automating the fine-tuning process with this Skill. It handles loss selection, hard-negative mining, and evaluation to produce optimized text embeddings.

What is the best way to fine-tune a sentence-transformers model for text classification?

Fine-tuning a sentence-transformers model for classification is best handled by selecting the appropriate model architecture and loss function. This Skill provides instructions for choosing the right configuration to optimize your classification embeddings.

Can I use Hugging Face Hub to publish my trained sentence-transformers models?

Yes, you can publish trained sentence-transformers models to the Hugging Face Hub. This Skill supports direct Hub publishing using the huggingface_hub library to share your fine-tuned embeddings.

Do I need the datasets library to train sentence-transformers models for paraphrase mining?

Yes, you need the datasets library to load training data for sentence-transformers models. This Skill requires datasets and huggingface_hub dependencies to automate paraphrase mining and deduplication tasks.

How does knowledge distillation work when training sentence-transformers?

Knowledge distillation for sentence-transformers transfers knowledge from a larger model to a smaller one during training. This Skill supports distillation alongside hard-negative mining and evaluators to improve embedding accuracy.

Does this support multimodal applications and sparse embeddings for reranking?

Yes, this supports multimodal applications and sparse embeddings for reranking. It provides instructions for selecting appropriate model architectures to handle diverse data inputs and optimize reranking pipelines.