[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DH9CD0THJASH6TAMCRVVRD":3,"skill-same:01M7DH9CD0THJASH6TAMCRVVRD":168},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7DH9CD0THJASH6TAMCRVVRD","train-sentence-transformers",null,"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 \u002F pair classification), `SparseEncoder` (SPLADE, sparse embedding model for learned-sparse retrieval), and `MultiVectorEncoder` (ColBERT \u002F 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.","ak2dev\u002Fagentguard","ak2dev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F233005497?v=4","01M7DGWK3E3XCC276C6YRFSN05","01M7DGWK4J2A9WQ44CS5CRP4R6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: train-sentence-transformers\ndescription: 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 \u002F pair classification), `SparseEncoder` (SPLADE, sparse embedding model for learned-sparse retrieval), and `MultiVectorEncoder` (ColBERT \u002F 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.\n---\n\n# Train a sentence-transformers Model\n\n**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\u002F` and `scripts\u002F`.\n\n**Do not synthesize a training script from this file alone.** Open the per-type production template (`scripts\u002Ftrain_\u003Ctype>_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.\n\n## 1. Identify the model type\n\n| Tag | Class | What it does | When to pick |\n|---|---|---|---|\n| **[SentenceTransformer]** | `SentenceTransformer` (bi-encoder) | Maps each input to a fixed-dim dense vector | Retrieval, similarity, clustering, classification, paraphrase mining, dedup |\n| **[CrossEncoder]** | `CrossEncoder` (reranker) | Scores `(query, passage)` pairs jointly | Two-stage retrieval (rerank top-100 from bi-encoder), pair classification |\n| **[SparseEncoder]** | `SparseEncoder` (SPLADE) | Sparse vectors over the vocabulary | Learned-sparse retrieval, inverted-index backends (Elasticsearch \u002F OpenSearch \u002F Lucene) |\n| **[MultiVectorEncoder]** | `MultiVectorEncoder` (ColBERT) | One embedding per token, scored with MaxSim | Late-interaction retrieval, recall gains over bi-encoders at higher storage cost, multimodal (ColPali \u002F ColQwen2) |\n\nTiebreakers when the request is ambiguous: \"embedding model\" \u002F \"vector search\" \u002F \"similarity\" → **[SentenceTransformer]**. \"rerank\" \u002F \"ranker\" \u002F \"two-stage\" → **[CrossEncoder]**. \"SPLADE\" \u002F \"sparse\" \u002F \"inverted index\" → **[SparseEncoder]**. \"ColBERT\" \u002F \"late interaction\" \u002F \"multi-vector\" \u002F \"MaxSim\" \u002F \"ColPali\" \u002F \"ColQwen\" → **[MultiVectorEncoder]**. If still unclear, ask.\n\n## 2. Required reading\n\n**Read these in full before writing any code. Do not triage by perceived relevance.**\n\n### Per-type: always required\n\n**[SentenceTransformer]**\n- `references\u002Flosses_sentence_transformer.md`: loss-to-data-shape mapping, `BatchSamplers.NO_DUPLICATES` requirement for MNRL-family, `Cached*` ↔ `gradient_checkpointing` incompatibility.\n- `references\u002Fevaluators_sentence_transformer.md`: evaluator-to-task mapping, `metric_for_best_model` key construction (named vs unnamed), per-evaluator `primary_metric` values.\n- `references\u002Fmodel_architectures.md`: encoder vs decoder vs static vs Router pipelines, pooling rules (mean \u002F cls \u002F lasttoken), auto-mean-pooling behavior for fresh-start MLM bases.\n- `scripts\u002Ftrain_sentence_transformer_example.py`: production template. Copy this as your starting point.\n\n**[CrossEncoder]**\n- `references\u002Flosses_cross_encoder.md`: pointwise \u002F pairwise \u002F listwise \u002F distillation, `pos_weight` derivation, `activation_fn=Identity()` mandatory for non-BCE losses (silent eval-rank collapse otherwise).\n- `references\u002Fevaluators_cross_encoder.md`: `CrossEncoderRerankingEvaluator` recipe, named-evaluator key format `eval_{name}_{primary_metric}`.\n- `scripts\u002Ftrain_cross_encoder_example.py`: production template. Copy this as your starting point.\n\n**[SparseEncoder]**\n- `references\u002Flosses_sparse_encoder.md`: `SpladeLoss` wrapper requirement, FLOPS regularizer weights, smoke-test active-dim ramp behavior.\n- `references\u002Fevaluators_sparse_encoder.md`: `SparseNanoBEIREvaluator` (English-only) and the in-domain alternative, `eval_{name}_{primary_metric}` key format.\n- `scripts\u002Ftrain_sparse_encoder_example.py`: production template. Copy this as your starting point.\n\n**[MultiVectorEncoder]**\n- `references\u002Flosses_multi_vector_encoder.md`: MaxSim scoring, scale choice per scoring mode (`scale=1.0` for MaxSim, roughly the average query length for MeanMaxSim), MNRL \u002F CachedMNRL \u002F MarginMSE \u002F DistillKLDiv, XTR-vs-ColBERT scoring, CachedMNRL ↔ `gradient_checkpointing` incompatibility.\n- `references\u002Fevaluators_multi_vector_encoder.md`: `MultiVectorNanoBEIREvaluator` (English-only) and the in-domain alternative, `eval_NanoBEIR_mean_maxsim_ndcg@10` key format, distillation-eval spearman variant.\n- `scripts\u002Ftrain_multi_vector_encoder_example.py`: production template. Copy this as your starting point.\n\n### Cross-cutting: always required (regardless of task)\n\n- `references\u002Ftraining_args.md`: `TrainingArguments` knobs, precision rules (load fp32 + autocast bf16\u002Ffp16, never `torch_dtype=bfloat16`), `warmup_steps` (float) vs deprecated `warmup_ratio`, `save_steps` must be a multiple of `eval_steps` for `load_best_model_at_end`, schedulers, HPO, tracker, resume, hub-push variants.\n- `references\u002Fdataset_formats.md`: column-matching rules (label name auto-detection, column-order-not-name), reshaping recipes, hard-negative mining options.\n- `references\u002Fbase_model_selection.md`: discovery commands, per-type model namespaces, ModernBERT-family `max_seq_length=8192` trap, `datasets >= 4` script-loader rejection, non-English starting-point shortcuts.\n- `references\u002Ftroubleshooting.md`: symptom-indexed failure recipes. Skim the section headings on every run, even a healthy one. The \"Metrics don't improve\" and \"Hub push fails\" entries cover bugs that bite frequently and are cheaper to recognize before they fire than to debug after.\n\n### Cross-cutting: load when applicable\n\n- `references\u002Fhardware_guide.md`: VRAM sizing, multi-GPU, FSDP \u002F DeepSpeed, HF Jobs flavors. Required for >24GB models, multi-GPU, or HF Jobs runs.\n- `references\u002Fhf_jobs_execution.md`: required when running on HF Jobs.\n- `references\u002Fprompts_and_instructions.md`: required when using prompt-tuned bases (E5, BGE, GTE, Qwen3-Embedding, Instructor, Nomic, etc.) or adding `query: ` \u002F `passage: ` style prefixes.\n\n### Variant scripts (open when the task matches)\n- **[SentenceTransformer]** `scripts\u002Ftrain_sentence_transformer_\u003Cmatryoshka|multi_dataset|with_lora|distillation|make_multilingual|static_embedding>_example.py`.\n- **[CrossEncoder]** `scripts\u002Ftrain_cross_encoder_\u003Cdistillation|listwise>_example.py`.\n- **[SparseEncoder]** `scripts\u002Ftrain_sparse_encoder_distillation_example.py`.\n- Hard-negative mining CLI: `scripts\u002Fmine_hard_negatives.py`.\n\n## 3. Defaults\n\nOverride only if the user specifies otherwise:\n- **Local execution.** Pitch HF Jobs only if local hardware can't fit the job.\n- **Single run.** After it completes, propose experimentation if the user would benefit (weak\u002Fmarginal verdict, \"see how high you can push it\" framing, etc.). Iteration rules in `references\u002Ftraining_args.md` (Experimentation section).\n- **Public Hub push at end-of-run, wrapped in try-except.** On HF Jobs (ephemeral env) ALSO enable in-trainer push (`push_to_hub=True` + `hub_strategy=\"every_save\"`). Details in `references\u002Fhf_jobs_execution.md`.\n\n## 4. Constraints the produced script must satisfy\n\nThese are non-negotiable contracts. Implementation lives in the production templates and references. Do not reinvent.\n\n- Capture the pre-training evaluator score as `baseline_eval` **before** `trainer.train()`.\n- Emit a single end-of-run line: `VERDICT: WIN|MARGINAL|REGRESSION | score=... | baseline=... | delta=...`. A monitor scrapes for this.\n- Silence `httpx`, `httpcore`, `huggingface_hub`, `urllib3`, `filelock`, `fsspec` to WARNING (otherwise HF download URLs flood the agent's context).\n- Tee logs to `logs\u002F{RUN_NAME}.log`.\n- End with `model.push_to_hub(...)` wrapped in `try\u002Fexcept`.\n- Smoke-test before any long run (`max_steps=1` + tiny dataset slice). The production templates show one common pattern (`SMOKE_TEST` env var).\n- **[CrossEncoder]** Include `EarlyStoppingCallback(patience>=3)`. CE rerankers often peak mid-training and regress.\n- **[SparseEncoder]** Log `query_active_dims` \u002F `corpus_active_dims` on the verdict line. High nDCG with collapsed sparsity is not a win. The keys come back name-prefixed (e.g. `..._query_active_dims`). Use suffix matching to pluck them. See the SPARSE production template for the exact pattern.\n- **[MultiVectorEncoder]** Match `scale` to the scoring mode on any MNRL-family loss: near `1.0` for unnormalized MaxSim (do not copy `scale=20.0` from bi-encoder MNRL), roughly the average query length with length-normalized MeanMaxSim, since each score is divided by its query's token count. `XTRScores` is a train-only `similarity_fct`: the evaluators reject it, so evaluation always scores with MaxSim, including for XTR-trained models.\n\n## 5. Workflow\n\n1. Identify the model type (§1). Ask if ambiguous.\n2. Load the §2 required-reading files for that type.\n3. Open `scripts\u002Ftrain_\u003Ctype>_example.py` and copy it as your starting point.\n4. Replace `MODEL_NAME`, `DATASET_NAME`, `RUN_NAME`, the loss, and the evaluator with the user's task. Cross-check loss\u002Fdata-shape match against `references\u002Flosses_\u003Ctype>.md`. Cross-check the `metric_for_best_model` key against `references\u002Fevaluators_\u003Ctype>.md` (named evaluators format the key as `eval_{name}_{primary_metric}`).\n5. Smoke-test (`max_steps=1`).\n6. Run.\n7. After the run, append to `logs\u002Fexperiments.md` and propose iteration if the verdict is weak\u002Fmarginal.\n\n## Prerequisites\n\n```bash\npip install \"sentence-transformers[train]>=5.0\"        # add [train,image] \u002F [audio] \u002F [video] for [SentenceTransformer] multimodal\n                                                       # [MultiVectorEncoder] requires >=6.0\npip install trackio                                    # optional tracker (or wandb \u002F tensorboard \u002F mlflow)\nhf auth login                                          # or set HF_TOKEN with write scope (for Hub push)\n```\n\nGPU strongly recommended. CPU works only for demos and `[SentenceTransformer]` `StaticEmbedding`.\n","# Train a sentence-transformers Model\n\n**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\u002F` and `scripts\u002F`.\n\n**Do not synthesize a training script from this file alone.** Open the per-type production template (`scripts\u002Ftrain_\u003Ctype>_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.\n\n## 1. Identify the model type\n\n| Tag | Class | What it does | When to pick |\n|---|---|---|---|\n| **[SentenceTransformer]** | `SentenceTransformer` (bi-encoder) | Maps each input to a fixed-dim dense vector | Retrieval, similarity, clustering, classification, paraphrase mining, dedup |\n| **[CrossEncoder]** | `CrossEncoder` (reranker) | Scores `(query, passage)` pairs jointly | Two-stage retrieval (rerank top-100 from bi-encoder), pair classification |\n| **[SparseEncoder]** | `SparseEncoder` (SPLADE) | Sparse vectors over the vocabulary | Learned-sparse retrieval, inverted-index backends (Elasticsearch \u002F OpenSearch \u002F Lucene) |\n| **[MultiVectorEncoder]** | `MultiVectorEncoder` (ColBERT) | One embedding per token, scored with MaxSim | Late-interaction retrieval, recall gains over bi-encoders at higher storage cost, multimodal (ColPali \u002F ColQwen2) |\n\nTiebreakers when the request is ambiguous: \"embedding model\" \u002F \"vector search\" \u002F \"similarity\" → **[SentenceTransformer]**. \"rerank\" \u002F \"ranker\" \u002F \"two-stage\" → **[CrossEncoder]**. \"SPLADE\" \u002F \"sparse\" \u002F \"inverted index\" → **[SparseEncoder]**. \"ColBERT\" \u002F \"late interaction\" \u002F \"multi-vector\" \u002F \"MaxSim\" \u002F \"ColPali\" \u002F \"ColQwen\" → **[MultiVectorEncoder]**. If still unclear, ask.\n\n## 2. Required reading\n\n**Read these in full before writing any code. Do not triage by perceived relevance.**\n\n### Per-type: always required\n\n**[SentenceTransformer]**\n- `references\u002Flosses_sentence_transformer.md`: loss-to-data-shape mapping, `BatchSamplers.NO_DUPLICATES` requirement for MNRL-family, `Cached*` ↔ `gradient_checkpointing` incompatibility.\n- `references\u002Fevaluators_sentence_transformer.md`: evaluator-to-task mapping, `metric_for_best_model` key construction (named vs unnamed), per-evaluator `primary_metric` values.\n- `references\u002Fmodel_architectures.md`: encoder vs decoder vs static vs Router pipelines, pooling rules (mean \u002F cls \u002F lasttoken), auto-mean-pooling behavior for fresh-start MLM bases.\n- `scripts\u002Ftrain_sentence_transformer_example.py`: production template. Copy this as your starting point.\n\n**[CrossEncoder]**\n- `references\u002Flosses_cross_encoder.md`: pointwise \u002F pairwise \u002F listwise \u002F distillation, `pos_weight` derivation, `activation_fn=Identity()` mandatory for non-BCE losses (silent eval-rank collapse otherwise).\n- `references\u002Fevaluators_cross_encoder.md`: `CrossEncoderRerankingEvaluator` recipe, named-evaluator key format `eval_{name}_{primary_metric}`.\n- `scripts\u002Ftrain_cross_encoder_example.py`: production template. Copy this as your starting point.\n\n**[SparseEncoder]**\n- `references\u002Flosses_sparse_encoder.md`: `SpladeLoss` wrapper requirement, FLOPS regularizer weights, smoke-test active-dim ramp behavior.\n- `references\u002Fevaluators_sparse_encoder.md`: `SparseNanoBEIREvaluator` (English-only) and the in-domain alternative, `eval_{name}_{primary_metric}` key format.\n- `scripts\u002Ftrain_sparse_encoder_example.py`: production template. Copy this as your starting point.\n\n**[MultiVectorEncoder]**\n- `references\u002Flosses_multi_vector_encoder.md`: MaxSim scoring, scale choice per scoring mode (`scale=1.0` for MaxSim, roughly the average query length for MeanMaxSim), MNRL \u002F CachedMNRL \u002F MarginMSE \u002F DistillKLDiv, XTR-vs-ColBERT scoring, CachedMNRL ↔ `gradient_checkpointing` incompatibility.\n- `references\u002Fevaluators_multi_vector_encoder.md`: `MultiVectorNanoBEIREvaluator` (English-only) and the in-domain alternative, `eval_NanoBEIR_mean_maxsim_ndcg@10` key format, distillation-eval spearman variant.\n- `scripts\u002Ftrain_multi_vector_encoder_example.py`: production template. Copy this as your starting point.\n\n### Cross-cutting: always required (regardless of task)\n\n- `references\u002Ftraining_args.md`: `TrainingArguments` knobs, precision rules (load fp32 + autocast bf16\u002Ffp16, never `torch_dtype=bfloat16`), `warmup_steps` (float) vs deprecated `warmup_ratio`, `save_steps` must be a multiple of `eval_steps` for `load_best_model_at_end`, schedulers, HPO, tracker, resume, hub-push variants.\n- `references\u002Fdataset_formats.md`: column-matching rules (label name auto-detection, column-order-not-name), reshaping recipes, hard-negative mining options.\n- `references\u002Fbase_model_selection.md`: discovery commands, per-type model namespaces, ModernBERT-family `max_seq_length=8192` trap, `datasets >= 4` script-loader rejection, non-English starting-point shortcuts.\n- `references\u002Ftroubleshooting.md`: symptom-indexed failure recipes. Skim the section headings on every run, even a healthy one. The \"Metrics don't improve\" and \"Hub push fails\" entries cover bugs that bite frequently and are cheaper to recognize before they fire than to debug after.\n\n### Cross-cutting: load when applicable\n\n- `references\u002Fhardware_guide.md`: VRAM sizing, multi-GPU, FSDP \u002F DeepSpeed, HF Jobs flavors. Required for >24GB models, multi-GPU, or HF Jobs runs.\n- `references\u002Fhf_jobs_execution.md`: required when running on HF Jobs.\n- `references\u002Fprompts_and_instructions.md`: required when using prompt-tuned bases (E5, BGE, GTE, Qwen3-Embedding, Instructor, Nomic, etc.) or adding `query: ` \u002F `passage: ` style prefixes.\n\n### Variant scripts (open when the task matches)\n- **[SentenceTransformer]** `scripts\u002Ftrain_sentence_transformer_\u003Cmatryoshka|multi_dataset|with_lora|distillation|make_multilingual|static_embedding>_example.py`.\n- **[CrossEncoder]** `scripts\u002Ftrain_cross_encoder_\u003Cdistillation|listwise>_example.py`.\n- **[SparseEncoder]** `scripts\u002Ftrain_sparse_encoder_distillation_example.py`.\n- Hard-negative mining CLI: `scripts\u002Fmine_hard_negatives.py`.\n\n## 3. Defaults\n\nOverride only if the user specifies otherwise:\n- **Local execution.** Pitch HF Jobs only if local hardware can't fit the job.\n- **Single run.** After it completes, propose experimentation if the user would benefit (weak\u002Fmarginal verdict, \"see how high you can push it\" framing, etc.). Iteration rules in `references\u002Ftraining_args.md` (Experimentation section).\n- **Public Hub push at end-of-run, wrapped in try-except.** On HF Jobs (ephemeral env) ALSO enable in-trainer push (`push_to_hub=True` + `hub_strategy=\"every_save\"`). Details in `references\u002Fhf_jobs_execution.md`.\n\n## 4. Constraints the produced script must satisfy\n\nThese are non-negotiable contracts. Implementation lives in the production templates and references. Do not reinvent.\n\n- Capture the pre-training evaluator score as `baseline_eval` **before** `trainer.train()`.\n- Emit a single end-of-run line: `VERDICT: WIN|MARGINAL|REGRESSION | score=... | baseline=... | delta=...`. A monitor scrapes for this.\n- Silence `httpx`, `httpcore`, `huggingface_hub`, `urllib3`, `filelock`, `fsspec` to WARNING (otherwise HF download URLs flood the agent's context).\n- Tee logs to `logs\u002F{RUN_NAME}.log`.\n- End with `model.push_to_hub(...)` wrapped in `try\u002Fexcept`.\n- Smoke-test before any long run (`max_steps=1` + tiny dataset slice). The production templates show one common pattern (`SMOKE_TEST` env var).\n- **[CrossEncoder]** Include `EarlyStoppingCallback(patience>=3)`. CE rerankers often peak mid-training and regress.\n- **[SparseEncoder]** Log `query_active_dims` \u002F `corpus_active_dims` on the verdict line. High nDCG with collapsed sparsity is not a win. The keys come back name-prefixed (e.g. `..._query_active_dims`). Use suffix matching to pluck them. See the SPARSE production template for the exact pattern.\n- **[MultiVectorEncoder]** Match `scale` to the scoring mode on any MNRL-family loss: near `1.0` for unnormalized MaxSim (do not copy `scale=20.0` from bi-encoder MNRL), roughly the average query length with length-normalized MeanMaxSim, since each score is divided by its query's token count. `XTRScores` is a train-only `similarity_fct`: the evaluators reject it, so evaluation always scores with MaxSim, including for XTR-trained models.\n\n## 5. Workflow\n\n1. Identify the model type (§1). Ask if ambiguous.\n2. Load the §2 required-reading files for that type.\n3. Open `scripts\u002Ftrain_\u003Ctype>_example.py` and copy it as your starting point.\n4. Replace `MODEL_NAME`, `DATASET_NAME`, `RUN_NAME`, the loss, and the evaluator with the user's task. Cross-check loss\u002Fdata-shape match against `references\u002Flosses_\u003Ctype>.md`. Cross-check the `metric_for_best_model` key against `references\u002Fevaluators_\u003Ctype>.md` (named evaluators format the key as `eval_{name}_{primary_metric}`).\n5. Smoke-test (`max_steps=1`).\n6. Run.\n7. After the run, append to `logs\u002Fexperiments.md` and propose iteration if the verdict is weak\u002Fmarginal.\n\n## Prerequisites\n\n```bash\npip install \"sentence-transformers[train]>=5.0\"        # add [train,image] \u002F [audio] \u002F [video] for [SentenceTransformer] multimodal\n                                                       # [MultiVectorEncoder] requires >=6.0\npip install trackio                                    # optional tracker (or wandb \u002F tensorboard \u002F mlflow)\nhf auth login                                          # or set HF_TOKEN with write scope (for Hub push)\n```\n\nGPU strongly recommended. CPU works only for demos and `[SentenceTransformer]` `StaticEmbedding`.\n",{"name":5,"description":7},"main","634c25395a24b98cd6125453ad4abb65517bcabb","bench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard","https:\u002F\u002Fsite-bionic8.vercel.app","https:\u002F\u002Fgithub.com\u002Fak2dev","2026-11-11 02:37:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add ak2dev\u002Fagentguard --skill train-sentence-transformers",{"tool":36,"command":37},"bunx","bunx skills add ak2dev\u002Fagentguard --skill train-sentence-transformers",{"tool":39,"command":40},"pnpm","pnpm dlx skills add ak2dev\u002Fagentguard --skill train-sentence-transformers","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002FSKILL.md",true,[44,50,54,58,62,66,70,74,78,82,86,90,94,98,102,106,110,116,120,124,128,132,136,140,144,148,152,156,160,164],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fbase_model_selection.md","REFERENCE","参考文档",7647,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fbase_model_selection.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fdataset_formats.md",6484,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fdataset_formats.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fevaluators_cross_encoder.md",5602,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fevaluators_cross_encoder.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fevaluators_multi_vector_encoder.md",6734,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fevaluators_multi_vector_encoder.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fevaluators_sentence_transformer.md",5986,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fevaluators_sentence_transformer.md",{"path":67,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fevaluators_sparse_encoder.md",5024,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fevaluators_sparse_encoder.md",{"path":71,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fhardware_guide.md",6031,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fhardware_guide.md",{"path":75,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fhf_jobs_execution.md",7279,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fhf_jobs_execution.md",{"path":79,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Flosses_cross_encoder.md",9736,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Flosses_cross_encoder.md",{"path":83,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Flosses_multi_vector_encoder.md",10723,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Flosses_multi_vector_encoder.md",{"path":87,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Flosses_sentence_transformer.md",10980,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Flosses_sentence_transformer.md",{"path":91,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Flosses_sparse_encoder.md",5174,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Flosses_sparse_encoder.md",{"path":95,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fmodel_architectures.md",9176,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fmodel_architectures.md",{"path":99,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fprompts_and_instructions.md",6540,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Fprompts_and_instructions.md",{"path":103,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Ftraining_args.md",15388,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Ftraining_args.md",{"path":107,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Ftroubleshooting.md",13237,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Freferences\u002Ftroubleshooting.md",{"path":111,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":114,"sourceHtmlUrl":115},"scripts\u002Fmine_hard_negatives.py","SCRIPT","脚本",8460,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Fmine_hard_negatives.py",{"path":117,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":118,"sourceHtmlUrl":119},"scripts\u002Ftrain_cross_encoder_distillation_example.py",9412,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_cross_encoder_distillation_example.py",{"path":121,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":122,"sourceHtmlUrl":123},"scripts\u002Ftrain_cross_encoder_example.py",9232,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_cross_encoder_example.py",{"path":125,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":126,"sourceHtmlUrl":127},"scripts\u002Ftrain_cross_encoder_listwise_example.py",10411,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_cross_encoder_listwise_example.py",{"path":129,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":130,"sourceHtmlUrl":131},"scripts\u002Ftrain_multi_vector_encoder_example.py",9017,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_multi_vector_encoder_example.py",{"path":133,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":134,"sourceHtmlUrl":135},"scripts\u002Ftrain_sentence_transformer_distillation_example.py",12232,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sentence_transformer_distillation_example.py",{"path":137,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":138,"sourceHtmlUrl":139},"scripts\u002Ftrain_sentence_transformer_example.py",7722,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sentence_transformer_example.py",{"path":141,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":142,"sourceHtmlUrl":143},"scripts\u002Ftrain_sentence_transformer_make_multilingual_example.py",11825,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sentence_transformer_make_multilingual_example.py",{"path":145,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":146,"sourceHtmlUrl":147},"scripts\u002Ftrain_sentence_transformer_matryoshka_example.py",7302,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sentence_transformer_matryoshka_example.py",{"path":149,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":150,"sourceHtmlUrl":151},"scripts\u002Ftrain_sentence_transformer_multi_dataset_example.py",10115,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sentence_transformer_multi_dataset_example.py",{"path":153,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":154,"sourceHtmlUrl":155},"scripts\u002Ftrain_sentence_transformer_static_embedding_example.py",10517,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sentence_transformer_static_embedding_example.py",{"path":157,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":158,"sourceHtmlUrl":159},"scripts\u002Ftrain_sentence_transformer_with_lora_example.py",10567,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sentence_transformer_with_lora_example.py",{"path":161,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":162,"sourceHtmlUrl":163},"scripts\u002Ftrain_sparse_encoder_distillation_example.py",9655,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sparse_encoder_distillation_example.py",{"path":165,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":166,"sourceHtmlUrl":167},"scripts\u002Ftrain_sparse_encoder_example.py",8259,"https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Fbench\u002Fcorpus\u002Fbenign\u002Freal-hf-train-sentence-transformers\u002Fscripts\u002Ftrain_sparse_encoder_example.py",[169,176,181,186,191,197],{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":18},"01M7DJ7GBSJBJ32GXNQXVAMNYK","csv-tool","Summarize CSV files and report column statistics.","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SYS-002\u002Fpositive\u002Ffault\u002Fcsv-tool\u002FSKILL.md",[],[],{"skillNo":177,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":18},"01M7DJ7F00PA7EHFM39RVCC8R5","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SYS-002\u002Fnegative\u002Fnormal\u002Fcsv-tool\u002FSKILL.md",[],[],{"skillNo":182,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":18},"01M7DJ7DP7KDW7MYY5Q0R0JFEN","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SYS-001\u002Fpositive\u002Ftoo-large\u002Fcsv-tool\u002FSKILL.md",[],[],{"skillNo":187,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":190,"publishedAt":18},"01M7DJ7C3VA0KQ8Q9ESNX6AJHE","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SYS-001\u002Fnegative\u002Fsmall\u002Fcsv-tool\u002FSKILL.md",[],[],{"skillNo":192,"name":193,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":196,"publishedAt":18},"01M7DJ7AQZTGY5YADQX73TRB7K","pdf","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SKL-TYP-002\u002Fpositive\u002Fother-publisher\u002Fpdf\u002FSKILL.md",[],[],{"skillNo":198,"name":193,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":201,"publishedAt":18},"01M7DJ7831XDVWS4W9SAAKBJHX","https:\u002F\u002Fgithub.com\u002Fak2dev\u002Fagentguard\u002Fblob\u002Fmain\u002Ffixtures\u002Frules\u002FAG-SKL-TYP-002\u002Fnegative\u002Fsame-publisher\u002Fpdf\u002FSKILL.md",[],[]]