train-sentence-transformers

Train and fine-tune sentence-transformer models for retrieval and similarity tasks.

1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Tyler-R-Kendrick/slm-training --skill train-sentence-transformers-tyler-r-kendrick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: train-sentence-transformers
Source: https://github.com/Tyler-R-Kendrick/slm-training/tree/main/.agents/skills/train-sentence-transformers
Command: npx skills add https://github.com/Tyler-R-Kendrick/slm-training --skill train-sentence-transformers-tyler-r-kendrick

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a robust, production-ready harness for training and fine-tuning sentence-transformer models, eliminating the common pitfalls of manual script creation and ensuring consistent, high-quality embedding performance.

Core Features & Use Cases

  • Multi-Type Support: Train bi-encoders, cross-encoders, and sparse-encoders (SPLADE) using specialized production templates.
  • Advanced Training Techniques: Includes support for hard-negative mining, Matryoshka representation learning, distillation, and LoRA.
  • Use Case: Build a custom retrieval system by fine-tuning a base model on domain-specific query-passage pairs, ensuring high-accuracy semantic search for your specific data.

Quick Start

Use the train-sentence-transformers skill to fine-tune a bi-encoder model on the provided dataset using the standard MNRL loss configuration.

Frequently Asked Questions about train-sentence-transformers

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

FAQPage Schema
How do I fine-tune sentence-transformers for a custom semantic search system?

You can fine-tune sentence-transformers by using specialized templates for bi-encoders and cross-encoders on domain-specific query-passage pairs. This Skill handles the training harness, ensuring high-accuracy semantic retrieval while eliminating manual script creation pitfalls.

Can I train a SPLADE sparse-encoder model using the sentence-transformers library?

Yes, training a SPLADE sparse-encoder is supported alongside bi-encoders and cross-encoders. The Skill provides specialized production templates to configure and optimize these models for complex retrieval and similarity tasks.

Does this embedding training workflow support hard-negative mining and Matryoshka representation learning?

Hard-negative mining, Matryoshka representation learning, distillation, and LoRA are all supported. These advanced training techniques are integrated to optimize embedding performance and ensure robust model quality for production environments.

What is the best way to evaluate sentence-transformer models for Hugging Face Hub compatibility?

The best way to ensure Hugging Face Hub compatibility is to follow specific production evaluation protocols. This Skill enforces these templates and protocols during the fine-tuning process to guarantee consistent model quality and deployment readiness.

Do I need datasets and DuckDB dependencies to fine-tune bi-encoders for retrieval tasks?

Yes, datasets and DuckDB are required dependencies. The Skill utilizes these libraries alongside sentence-transformers and trackio to manage data loading, track training metrics, and execute complex fine-tuning workflows efficiently.