Sentence-Transformers Training Router
huggingface/skills
Routes a sentence-transformers training task to the right model type and required reference docs and example scripts, covering bi-encoders, rerankers, sparse and multi-vector models.
Build transformer fine-tuning plans for classification and generation
$ npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install wentorai/research-plugins dl-transformer-finetune --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/domains/ai-ml/dl-transformer-finetune .claude/skills/dl-transformer-finetune && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "dl-transformer-finetune" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/dl-transformer-finetune into .claude/skills/dl-transformer-finetune/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dl-transformer-finetune", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/dl-transformer-finetuneType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install wentorai/research-plugins dl-transformer-finetune --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/domains/ai-ml/dl-transformer-finetune .agents/skills/dl-transformer-finetune && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "dl-transformer-finetune" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/dl-transformer-finetune into .agents/skills/dl-transformer-finetune/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dl-transformer-finetune", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install wentorai/research-plugins dl-transformer-finetune --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/domains/ai-ml/dl-transformer-finetune .cursor/skills/dl-transformer-finetune && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "dl-transformer-finetune" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/dl-transformer-finetune into .cursor/skills/dl-transformer-finetune/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dl-transformer-finetune", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/wentorai/research-plugins.git --path skills/domains/ai-ml/dl-transformer-finetune--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install wentorai/research-plugins dl-transformer-finetune --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/domains/ai-ml/dl-transformer-finetune .gemini/skills/dl-transformer-finetune && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "dl-transformer-finetune" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/dl-transformer-finetune into .gemini/skills/dl-transformer-finetune/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dl-transformer-finetune", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install wentorai/research-plugins dl-transformer-finetuneInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/domains/ai-ml/dl-transformer-finetune .github/skills/dl-transformer-finetune && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "dl-transformer-finetune" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/dl-transformer-finetune into .github/skills/dl-transformer-finetune/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dl-transformer-finetune", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install wentorai/research-plugins dl-transformer-finetune --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/domains/ai-ml/dl-transformer-finetune .opencode/skills/dl-transformer-finetune && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "dl-transformer-finetune" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/dl-transformer-finetune into .opencode/skills/dl-transformer-finetune/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dl-transformer-finetune", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
dl-transformer-finetuneBuild transformer fine-tuning plans for classification and generation
Dl Transformer Finetune is an agent skill from wentorai/research-plugins. Build transformer fine-tuning plans for classification and generation
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Fine-tuning. The repository describes itself as: 350+ academic research skills, MCP configs, and plugins for Research-Claw and AI agents. The licence is MIT.
Read from SKILL.md and the folder at commit bf44b3c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
arxiv.orggithub.comhuggingface.coFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Dl Transformer Finetune loads about 2.2k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 422 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from wentorai/research-plugins at commit bf44b3c, republished under its MIT licence (© wentorai). 422 words, ~2,178 tokens.
.claude/skills/dl-transformer-finetune/SKILL.md (or your agent's skills folder).Fine-tuning pretrained transformers is the dominant paradigm in modern NLP and increasingly in vision, audio, and multimodal research. The core idea is simple: take a model pretrained on massive data, then adapt it to your specific task with a comparatively small labeled dataset. But the practical details -- which layers to freeze, which optimizer and learning rate to use, how to handle catastrophic forgetting, when to use parameter-efficient methods -- determine whether fine-tuning succeeds or fails.
This guide covers the full spectrum of fine-tuning approaches: full fine-tuning for maximum performance, parameter-efficient fine-tuning (PEFT) for resource-constrained settings, and the decision framework for choosing between them. The patterns are drawn from hundreds of published papers and the Hugging Face ecosystem that supports them.
Whether you are fine-tuning BERT for text classification in a domain-specific corpus, adapting a large language model with LoRA for instruction following, or building a multi-task model for your research pipeline, this guide provides the recipes you need.
from transformers import (
AutoModelForSequenceClassification,
AutoTokenizer,
TrainingArguments,
Trainer,
)
from datasets import load_dataset
import numpy as np
from sklearn.metrics import accuracy_score, f1_score
# Load model and tokenizer
model_name = "bert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(
model_name, num_labels=3
)
# Prepare dataset
dataset = load_dataset("multi_nli")
def tokenize_function(examples):
return tokenizer(
examples["premise"],
examples["hypothesis"],
truncation=True,
max_length=128,
padding="max_length",
)
tokenized = dataset.map(tokenize_function, batched=True)
# Metrics
def compute_metrics(eval_pred):
logits, labels = eval_pred
preds = np.argmax(logits, axis=-1)
return {
"accuracy": accuracy_score(labels, preds),
"f1_macro": f1_score(labels, preds, average="macro"),
}
# Training arguments (research-grade defaults)
training_args = TrainingArguments(
output_dir="./results",
num_train_epochs=3,
per_device_train_batch_size=32,
per_device_eval_batch_size=64,
learning_rate=2e-5, # Standard for BERT fine-tuning
weight_decay=0.01,
warmup_ratio=0.06, # 6% warmup
evaluation_strategy="epoch",
save_strategy="epoch",
load_best_model_at_end=True,
metric_for_best_model="f1_macro",
fp16=True,
dataloader_num_workers=4,
seed=42,
report_to="wandb",
)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=tokenized["train"],
eval_dataset=tokenized["validation_matched"],
compute_metrics=compute_metrics,
)
trainer.train()| Model Size | Recommended LR | Warmup | Weight Decay |
|---|---|---|---|
| BERT-base (110M) | 2e-5 to 5e-5 | 6-10% | 0.01 |
| BERT-large (340M) | 1e-5 to 3e-5 | 6-10% | 0.01 |
| RoBERTa-large (355M) | 1e-5 to 2e-5 | 6% | 0.01 |
| T5-base (220M) | 3e-4 to 1e-3 | 0-5% | 0.01 |
| LLaMA-7B (full FT) | 1e-5 to 2e-5 | 3% | 0.0 |
| LLaMA-7B (LoRA) | 1e-4 to 3e-4 | 3% | 0.0 |
LoRA freezes the pretrained weights and injects trainable low-rank decomposition matrices. It typically trains only 0.1-1% of parameters while achieving 95-100% of full fine-tuning performance.
from peft import LoraConfig, get_peft_model, TaskType
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load base model
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-2-7b-hf",
torch_dtype=torch.bfloat16,
device_map="auto",
)
# Configure LoRA
lora_config = LoraConfig(
task_type=TaskType.CAUSAL_LM,
r=16, # Rank (8-64 typical)
lora_alpha=32, # Scaling factor (usually 2*r)
lora_dropout=0.05,
target_modules=["q_proj", "v_proj", "k_proj", "o_proj"],
bias="none",
)
model = get_peft_model(model, lora_config)
model.print_trainable_parameters()
# Output: trainable params: 4,194,304 || all params: 6,742,609,920 || trainable%: 0.062from transformers import BitsAndBytesConfig
# 4-bit quantization config
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
)
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-2-7b-hf",
quantization_config=bnb_config,
device_map="auto",
)
# Apply LoRA on top of quantized model
model = get_peft_model(model, lora_config)
# Now fits on a single 24GB GPU!| Method | Trainable % | Memory | Performance | Best For |
|---|---|---|---|---|
| Full fine-tuning | 100% | High | Best | Sufficient compute + data |
| LoRA | 0.1-1% | Low | 95-100% | Most scenarios |
| QLoRA | 0.1-1% | Very low | 93-98% | Consumer GPUs |
| Prefix tuning | ~0.1% | Low | 90-95% | Generation tasks |
| Adapter layers | 1-5% | Medium | 95-99% | Multi-task |
| Prompt tuning | <0.01% | Minimal | 85-95% | Large models, many tasks |
# Strategy 1: Gradual unfreezing (Howard & Ruder, 2018)
def gradual_unfreeze(model, epoch, total_layers=12):
"""Unfreeze one more layer group per epoch, from top to bottom."""
layers_to_unfreeze = min(epoch + 1, total_layers)
for i, (name, param) in enumerate(reversed(list(model.named_parameters()))):
param.requires_grad = i < layers_to_unfreeze * 10 # ~10 params per layer
# Strategy 2: Discriminative learning rates
def get_layer_lrs(model, base_lr=2e-5, decay_factor=0.95):
"""Apply lower learning rates to earlier layers."""
params = []
num_layers = 12 # BERT-base
for i in range(num_layers):
lr = base_lr * (decay_factor ** (num_layers - i - 1))
layer_params = [p for n, p in model.named_parameters()
if f"layer.{i}." in n]
params.append({"params": layer_params, "lr": lr})
return params
# Strategy 3: EWC (Elastic Weight Consolidation)
# Add a penalty term that keeps important weights close to pretrained valuesBefore fine-tuning:
[ ] Report exact pretrained model name and version
[ ] Document dataset size, splits, and preprocessing
[ ] Specify hardware (GPU model, count, precision)
[ ] Set random seeds (Python, NumPy, PyTorch, CUDA)
During fine-tuning:
[ ] Use validation set for hyperparameter selection
[ ] Log training curves (loss, metrics per epoch)
[ ] Monitor for overfitting (val loss divergence)
[ ] Try at least 3 learning rates from the recommended range
Reporting:
[ ] Report mean and std across 3-5 random seeds
[ ] Include training time and compute cost
[ ] Compare against published baselines using same evaluation
[ ] Release model weights or LoRA adapters for reproducibility© wentorai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/domains/ai-ml/dl-transformer-finetune of wentorai/research-plugins.
Open the folder on GitHubat commit bf44b3c
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in wentorai/research-plugins, which our catalogue first saw on October 7, 2026.
Dl Transformer Finetune next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Dl Transformer Finetune this skillwentorai/research-plugins | 298 | 1 repos | ~2.2k | Automated safety check: Pass | MIT | |
| Sentence-Transformers Training Routerhuggingface/skills | 11k | 1 repos | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| Train RlOpenPipe/ART | 11k | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| Qwopus27b Rl TrainingR6410418/Jackrong-llm-finetuning-guide | 1.7k | — | ~830 | Automated safety check: Pass | Apache-2.0 | |
| Dataset Evaluationawslabs/agent-plugins | 916 | 1 repos | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Train SftOpenPipe/ART | 11k | — | ~2.9k | Automated safety check: Pass | Apache-2.0 |
huggingface/skills
Routes a sentence-transformers training task to the right model type and required reference docs and example scripts, covering bi-encoders, rerankers, sparse and multi-vector models.
OpenPipe/ART
RL training reference for the ART framework. An agent skill from OpenPipe/ART.
R6410418/Jackrong-llm-finetuning-guide
Prepare, validate, launch-plan, monitor, resume, and stop configurable Qwopus 27B reinforcement-learning workflows for GRPO or GSPO.
awslabs/agent-plugins
Validates dataset formatting and quality for SageMaker model fine-tuning (SFT, DPO, or RLVR).
OpenPipe/ART
SFT training reference for the ART framework. An agent skill from OpenPipe/ART.
Orchestra-Research/AI-Research-SKILLs
Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training.
wentorai/research-plugins
Craft structured research abstracts that maximize clarity and journal acceptance
wentorai/research-plugins
Manage academic citations across BibTeX, APA, MLA, and Chicago formats
wentorai/research-plugins
Summarize academic papers with structured extraction of key elements
wentorai/research-plugins
Evidence-based study techniques for academic learning and retention
wentorai/research-plugins
Adjust writing tone and register for academic audiences and venues
wentorai/research-plugins
Academic translation, post-editing, and Chinglish correction guide
Categories
Build transformer fine-tuning plans for classification and generation. Dl Transformer Finetune is an agent skill from wentorai/research-plugins.
Dl Transformer Finetune fits situations like: tasks that involve Fine-tuning.
Run `npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a claude-code`. Or copy the skill folder (skills/domains/ai-ml/dl-transformer-finetune in wentorai/research-plugins) into .claude/skills/dl-transformer-finetune in your project. Claude Code loads it when a task matches its description.
Run `npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a codex`. Or copy the skill folder (skills/domains/ai-ml/dl-transformer-finetune in wentorai/research-plugins) into .agents/skills/dl-transformer-finetune in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wentorai/research-plugins --skill dl-transformer-finetune -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dl-transformer-finetune, .gemini/skills/dl-transformer-finetune, .github/skills/dl-transformer-finetune and .opencode/skills/dl-transformer-finetune in your project.
SKILL.md names no scripts, command-line tools or credentials: Dl Transformer Finetune is instructions for the agent only. Our summary lists: Python 3.
SKILL.md names 3 domains. As links in the text: arxiv.org, github.com and huggingface.co. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Dl Transformer Finetune is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Dl Transformer Finetune: Sentence-Transformers Training Router (huggingface/skills, 11k stars), Train Rl (OpenPipe/ART, 11k stars), Qwopus27b Rl Training (R6410418/Jackrong-llm-finetuning-guide, 1.7k stars) and Dataset Evaluation (awslabs/agent-plugins, 916 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
wentorai (a GitHub user) maintains it in wentorai/research-plugins, which has 298 GitHub stars. The repository holds 405 skills in this directory. The repository was last updated on June 19, 2026.
Source: wentorai/research-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.