unsloth-mcp-server: Skill for Claude Code

.claude/skills/training-optimization/SKILL.md

training-optimization is a skill for Claude Code from ScientiaCapital/unsloth-mcp-server. It costs 45 tokens per session (6,918 once invoked), scanned A, original, Apache-2.0.

A skill for improving the settings used to fine-tune language models, meaning training an existing model further on selected examples. It covers learning rates, LoRA settings, batch sizes, precision, gradient methods, testing, and monitoring.

In plain words
What is it for?
Use it when configuring, running, or evaluating fine-tuning jobs for language models, including jobs that use LoRA.
Why use it?
Fine-tuning can perform poorly or waste memory and computing time when its training settings are unsuitable. The guidance helps adjust those settings and watch for problems such as overfitting.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is ScientiaCapital/unsloth-mcp-server's own configuration. It tells Claude Code how to work on unsloth-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unsloth-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ScientiaCapital/unsloth-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ScientiaCapital/unsloth-mcp-server/main/.claude/skills/training-optimization/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ScientiaCapital/unsloth-mcp-server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for training-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/scientiacapital/unsloth-mcp-server/training-optimization.svg)](https://agentmods.dev/skills/scientiacapital/unsloth-mcp-server/training-optimization)
Your own site
<a href="https://agentmods.dev/skills/scientiacapital/unsloth-mcp-server/training-optimization"><img src="https://agentmods.dev/badge/skills/scientiacapital/unsloth-mcp-server/training-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,918 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.06918
Opus 5 $0.00023 $0.03459
Sonnet 5 $0.00009 $0.01384
Haiku 4.5 $0.00005 $0.00692

Measured 7d ago against content hash ff60f79890e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

training-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/training-optimization/SKILL.md · 1,086 lines

How it starts

The opening of the file, as written. The whole thing — 1,086 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Training Optimization

Master advanced techniques for efficient, high-quality LLM fine-tuning.

Overview

Fine-tuning is an art. Optimize:

  • Learning rates - Schedulers, warmup, optimal values
  • LoRA configuration - Rank, alpha, target modules
  • Batch optimization - Size, accumulation, sequence length
  • Precision - FP16, BF16, mixed precision
  • Gradient strategies - Checkpointing, clipping, accumulation
  • Hyperparameter tuning - Grid search, Bayesian optimization
  • Monitoring - WandB, TensorBoard, loss curves
  • Quality - Prevent overfitting, improve convergence

Quick Start

Optimal Default Configuration

from unsloth import FastLanguageModel
from trl import SFTTrainer
from transformers import TrainingArguments

# Load model
model, tokenizer = FastLanguageModel.from_pretrained(
    "unsloth/Llama-3.2-7B-bnb-4bit",
    max_seq_length=2048,
    load_in_4bit=True,
    use_gradient_checkpointing="unsloth"  # Memory efficient
)

# Configure LoRA (optimal defaults)
model = FastLanguageModel.get_peft_model(
    model,
    r=16,                    # LoRA rank (8-64)
    lora_alpha=16,          # Alpha = rank typically works well
    lora_dropout=0,         # 0 for Unsloth (already efficient)
    target_modules=[        # All attention + MLP for best quality
        "q_proj", "k_proj", "v_proj", "o_proj",
        "gate_proj", "up_proj", "down_proj"
    ],
    bias="none",
    use_gradient_checkpointing="unsloth"
)

# Training arguments (optimal defaults)
training_args = TrainingArguments(
    output_dir="./outputs",
    per_device_train_batch_size=2,
    gradient_accumulation_steps=4,        # Effective batch = 2*4 = 8
    num_train_epochs=3,
    learning_rate=2e-4,                   # 2e-4 is a sweet spot
    lr_scheduler_type="cosine",           # Cosine decay
    warmup_ratio=0.03,                    # 3% warmup
    fp16=not torch.cuda.is_bf16_supported(),
    bf16=torch.cuda.is_bf16_supported(),  # BF16 if available
    logging_steps=10,
    optim="adamw_8bit",                   # 8-bit AdamW (memory efficient)
    save_strategy="epoch",
    save_total_limit=3
)

# Train
trainer = SFTTrainer(
    model=model,
    tokenizer=tokenizer,
    train_dataset=dataset,
    max_seq_length=2048,
    args=training_args
)

trainer.train()

Read the full file on GitHub · 1,086 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 1,086 lines · 45 tokens per session scan A ff60f79890e8

Subscribe to this mod's changes

training-optimization is a skill published in the GitHub repository ScientiaCapital/unsloth-mcp-server (2 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 45 tokens to every session and 6,918 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.