train-sentence-transformers
训练或微调 sentence-transformers 模型,涵盖 `SentenceTransformer`(双编码器,用于检索、相似度、聚类、分类、释义挖掘、去重、多模态的稠密或静态嵌入模型)、`CrossEncoder`(重排序器,用于两阶段检索/配对分类的配对打分)、`SparseEncoder`(SPLADE,用于学习型稀疏检索的稀疏嵌入模型)以及 `MultiVectorEncoder`(ColBERT/后期交互,逐词元嵌入并用 MaxSim 打分)。涵盖损失函数选择、难负样本挖掘、评估器、蒸馏、LoRA、Matryoshka 以及 Hugging Face Hub 发布。适用于任何 sentence-transformers 训练任务。
机器翻译查看英文原文
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.
适用对象:搜索与知识管理。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Train a sentence-transformers Model
- 1. Identify the model type
- 2. Required reading
- Per-type: always required
- Cross-cutting: always required (regardless of task)
- Cross-cutting: load when applicable
- Variant scripts (open when the task matches)
- 3. Defaults
This SKILL.md is a router, not a manual. It tells you which references and example scripts to load for your task. The actual content (recommended losses, evaluators, training-script structure, model selection, training-arg knobs, troubleshooting) lives in references/ and scripts/. Do not synthesize a training script from this file alone. Open the per-type production template (scripts/train example.py) and copy it as your starting point. The templates contain load-bearing scaffolding (autocast helper, model-card class, logger silencing list, force=True, seed, TF32, version-compatible imports, named-evaluator metric handling) that prior agent runs have repeatedly missed when rolling their own from a synthesized snippet. | Tag | Class | What it does | When to pick | |---|---|---|---| | [SentenceTransformer] | SentenceTransformer (bi-encoder) | Maps each input to a fixed-dim dense vector | Retrieval, similarity, clustering, classification, paraphrase mining, dedup | | [CrossEncoder] | CrossEncoder (reranker) | Scores (query, passage) pairs jointly | Two-stage retrieval (rerank top-100 from bi-encoder), pair classification | | [SparseEncoder] | SparseEncoder (SPLADE) | Sparse vectors ov
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- huggingface/skills
- 源文件
- skills/train-sentence-transformers/SKILL.md
- 固定版本
- 25910b3d0ba31a2ba102f901cdc9e008c278a69c
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:huggingface/skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T16:01:02.765Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
Apache-2.0。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。