/agents-mcp:gemma-trainerfrom agents-mcp
Trains, fine-tunes, or adapts Gemma models (SFT, DPO, RLHF, Reward Modeling) on local hardware. Covers TRL, Unsloth, dataset preparation, validation, and GGUF/LiteRT conversion.
Ships in agents-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
When training locally, memory efficiency and execution speed are huge. Always guide the user to follow these best practices:
SFTTrainer, DPOTrainer) coupled with PEFT and bitsandbytes (for QLoRA).Help the user choose the correct workflow based on their goal:
Formatting issues are the #1 cause of poor training runs. Ensure you validate files using the utility script [assets/dataset_prep.py].
Ensure the dataset matches Gemma's official chat template:
<|turn>system
Your instruction here<turn|>
<|turn>user
Your query here<turn|>
<|turn>model
Your response here<turn|>
To avoid formatting drift, use the tokenizer's apply_chat_template during dataset tokenization.
{
"messages": [
{"role": "user", "content": "Tell me a joke."},
{"role": "model", "content": "Why did the computer go to the doctor? It had a virus!"}
]
}
{
"prompt": "Write a python function to compute factorial.",
"chosen": "def factorial(n):\n return 1 if n <= 1 else n * factorial(n - 1)",
"rejected": "factorial is computed using recursion or loops. Just import math."
}
RewardTrainer evaluates the pair and learns to output a higher logit score for chosen than for rejected.Local knowledge distillation allows you to train small, lightweight student models (such as Gemma 4 E2B) using high-quality dataset outputs generated by larger, highly capable teacher models (such as Gemma 4 31B or Gemma 4 26B A4B).
Use the [assets/distill_dataset.py] utility script to generate fine-tuning datasets on your local machine.
Use the [assets/sft_train.py] asset to launch a local QLoRA fine-tuning session.
r): 16 or 32 (Higher rank captures complex behaviors but consumes more memory).lora_alpha): 32 or 64 (Rule of thumb: lora_alpha = 2 * r).lora_dropout): 0.05 or 0.1 (Forcing the model to learn more robust features rather than relying on specific paths).2e-4 for QLoRA; 2e-5 for full fine-tuning.Use the [assets/dpo_train.py] template to execute alignment.
beta (DPO temperature parameter) to 0.1. Values between 0.1 and 0.5 control how strictly the model adheres to the reference policy.Use the [assets/reward_train.py] template to train an evaluation model.
AutoModelForSequenceClassification with num_labels=1).Gemma 4 models are natively multimodal. To fine-tune them on images or audio:
SFTTrainer with a custom visual data collator.{
"messages": [
{"role": "user", "content": [
{"type": "image", "url": "path/to/image.png"},
{"type": "text", "text": "Describe this image."}
]},
{"role": "assistant", "content": [
{"type": "text", "text": "An abstract oil painting with vibrant warm gradients."}
]}
]
}
input_features.image type with audio type in the message format.
{
"messages": [
{"role": "user", "content": [
{"type": "text", "text": "Describe this audio."},
{"type": "audio", "url": "path/to/audio.wav"}
]},
{"role": "assistant", "content": [
{"type": "text", "text": "This is an audio file of a bird chirping."}
]}
]
}
Once your LoRA training is finished, you can convert your model to GGUF format.
If you trained your model using Unsloth, you can export directly to GGUF natively. This automatically handles merging and quantization.
Fetch Saving to GGUF for the best practice.
If you did not use Unsloth, you can convert your merged Hugging Face model directory manually using llama.cpp.
LiteRT-LM is optimized for running models like Gemma 4 E2B and Gemma 4 E4B on mobile, web, and IoT hardware with hardware acceleration (CPU, GPU, NPU). Fetch LiteRT-LM guide for the best practice.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 plugins in one repository ship this exact skill · first indexed Oct 4, 2026
npx claudepluginhub skillmds/skillmd --plugin agents-mcp34 skills in this plugin
/ads-mathCalculate and model paid-media CPA, CPL, CPC, CPM, ROAS, MER, break-even targets, contribution margin, LTV:CAC, impression-share opportunity, budgets, forecasts, and experiment economics. Use for PPC math, ad calculator, break-even analysis, ROAS calculator, CPA calculator, budget forecast, LTV CAC, or MER./agent-recallPersistent compounding memory for AI agents. 5 default MCP tools: session_start, session_end, remember, recall, check. Full surface (18 tools) available with --full flag. Two-verb model: inhale (session_start) and exhale (session_end). Correction-first memory with decision trail tracking, watch_for warnings, palace rooms with salience scoring, cross-project insight matching, same-day journal merging, ambient recall hooks. Local markdown only. Zero cloud, zero telemetry, Obsidian-compatible. Optional Supabase backend: when configured via `ar setup supabase`, recall() uses pgvector cosine similarity on OpenAI/Voyage embeddings instead of keyword search — same API, semantic understanding. Gracefully degrades to local search if not configured./aihot查询 AIHOT(aihot.news)的中文 AI 资讯。用户问今天或最近 AI 圈发生了什么、AI 新闻和 AI 日报、大模型与 AI 产品发布、OpenAI/Anthropic/Google 等公司或某个 AI 话题的最新消息、当前最热的 AI 事件及来龙去脉、AI 模型排行、Codex 额度重置,或其它 AI 行业动态时使用。必须实时查询 AIHOT,不凭训练记忆回答新闻;匿名只读,无需 API Key。/b0Delegate tasks to AI agents via Box0. Use when the user asks to
review code, check security, run tests, compare tools, get multiple
perspectives, research a topic, analyze data, write docs, or any
task that could benefit from specialized or parallel execution.
Also use when the user mentions agent names or says "ask", "delegate",
"get opinions from", or "have someone".
/bioqc-mcpAutomated sequencing quality control and advanced visualization wrapping FastQC, MultiQC, and custom chart generation. Exposes an MCP stdio server for live AI integration alongside a ClawBio CLI runner./BMW-design-analysisBMW's corporate site — distinct from BMW M's motorsport-bombastic variant, this is a measured and settled corporate-automotive interface. On a light (cream-tinted white) canvas, BMW corporate blue (#1c69d4) carries every primary CTA; dark navy hero bands frame model photography. BMW Type Next Latin sets the entire hierarchy on two weights — heavy 700 display and Light 300 body. Configuration and reservation flows ride a card-based 4-up grid, where each card holds a model render, a name, and a "Learn More" link.Other plugins' skills for the same job