Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计未展示

fine-tuning-customization微调定制

Agent Skill

fine-tuning-customization 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

423

周安装

18

GitHub Stars

公开资料未说明

下载量

148
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:fine-tuning-customization(微调定制)
来源仓库:https://github.com/yonatangross/skillforge-claude-plugin
仓库路径:skills/fine-tuning-customization
安装命令:
npx skills add yonatangross/skillforge-claude-plugin --skill "fine-tuning-customization"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add yonatangross/skillforge-claude-plugin --skill "fine-tuning-customization"

简介

发现并安装 AI 代理的技能,聚焦模型微调与个性化定制。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中优化特定任务表现。
  • 提供参数配置建议与效果评估方法,辅助模型迭代调优。
  • 安装命令:npx skills add yonatangross/skillforge-claude-plugin --skill "fine-tuning-customization
  • 使用时需确保数据来源合法,避免侵犯知识产权或隐私条款

SKILL.md

name
fine-tuning-customization
description
LLM fine-tuning with LoRA, QLoRA, DPO alignment, and synthetic data generation. Efficient training, preference learning, data creation. Use when customizing models for specific domains.
version
1.0.0
tags
[fine-tuning, lora, qlora, dpo, synthetic-data, rlhf, 2026]
context
fork
agent
llm-integrator
author
OrchestKit
user-invocable
false

Fine-Tuning & Customization

Customize LLMs for specific domains using parameter-efficient fine-tuning and alignment techniques.

Unsloth 2026: 7x longer context RL, FP8 RL on consumer GPUs, rsLoRA support. TRL: OpenEnv integration, vLLM server mode, transformers 5.0.0+ compatible.

Decision Framework: Fine-Tune or Not?

ApproachTry FirstWhen It Works
Prompt EngineeringAlwaysSimple tasks, clear instructions
RAGExternal knowledge neededKnowledge-intensive tasks
Fine-TuningLast resortDeep specialization, format control

Fine-tune ONLY when:

  1. Prompt engineering tried and insufficient
  2. RAG doesn't capture domain nuances
  3. Specific output format consistently required
  4. Persona/style must be deeply embedded
  5. You have ~1000+ high-quality examples

LoRA vs QLoRA (Unsloth 2026)

CriteriaLoRAQLoRA
Model fits in VRAMUse LoRA
Memory constrainedUse QLoRA
Training speed39% faster
Memory savings75%+ (dynamic 4-bit quants)
QualityBaseline~Same (Unsloth recovered accuracy loss)
70B LLaMA<48GB VRAM with QLoRA

Quick Reference: LoRA Training

from unsloth import FastLanguageModel
from trl import SFTTrainer

# Load with 4-bit quantization (QLoRA)
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="unsloth/Meta-Llama-3.1-8B",
    max_seq_length=2048,
    load_in_4bit=True,
)

# Add LoRA adapters
model = FastLanguageModel.get_peft_model(
    model,
    r=16,              # Rank (16-64 typical)
    lora_alpha=32,     # Scaling (2x r)
    lora_dropout=0.05,
    target_modules=[
        "q_proj", "k_proj", "v_proj", "o_proj",  # Attention
        "gate_proj", "up_proj", "down_proj",      # MLP (QLoRA paper)
    ],
)

# Train
trainer = SFTTrainer(
    model=model,
    tokenizer=tokenizer,
    train_dataset=dataset,
    max_seq_length=2048,
)
trainer.train()

DPO Alignment

from trl import DPOTrainer, DPOConfig

config = DPOConfig(
    learning_rate=5e-6,  # Lower for alignment
    beta=0.1,            # KL penalty coefficient
    per_device_train_batch_size=4,
    num_train_epochs=1,
)

# Preference dataset: {prompt, chosen, rejected}
trainer = DPOTrainer(
    model=model,
    ref_model=ref_model,  # Frozen reference
    args=config,
    train_dataset=preference_dataset,
    tokenizer=tokenizer,
)
trainer.train()

Synthetic Data Generation

async def generate_synthetic(topic: str, n: int = 100) -> list[dict]:
    """Generate training examples using teacher model."""
    examples = []
    for _ in range(n):
        response = await client.chat.completions.create(
            model="gpt-4o",  # Teacher
            messages=[{
                "role": "system",
                "content": f"Generate a training example about {topic}. "
                          "Include instruction and response."
            }],
            response_format={"type": "json_object"}
        )
        examples.append(json.loads(response.choices[0].message.content))
    return examples

Key Hyperparameters

ParameterRecommendedNotes
Learning rate2e-4LoRA/QLoRA standard
Epochs1-3More risks overfitting
LoRA r16-64Higher = more capacity
LoRA alpha2x rScaling factor
Batch size4-8Per device
Warmup3%Ratio of steps

Anti-Patterns (FORBIDDEN)

# NEVER fine-tune without trying alternatives first
model.fine_tune(data)  # Try prompt engineering & RAG first!

# NEVER use low-quality training data
data = scrape_random_web()  # Garbage in, garbage out

# NEVER skip evaluation
trainer.train()
deploy(model)  # Always evaluate before deploy!

# ALWAYS use separate eval set
train, eval = split(data, test_size=0.1)
trainer = SFTTrainer(..., eval_dataset=eval)

Detailed Documentation

ResourceDescription
references/lora-qlora.mdParameter-efficient fine-tuning
references/dpo-alignment.mdDirect Preference Optimization
references/synthetic-data.mdTraining data generation
references/when-to-finetune.mdDecision framework

Related Skills

  • llm-evaluation - Evaluate fine-tuned models
  • embeddings - When to use embeddings instead
  • rag-retrieval - When RAG is better than fine-tuning
  • langfuse-observability - Track training experiments

Capability Details

lora-qlora

Keywords: LoRA, QLoRA, PEFT, parameter efficient, adapter, low-rank Solves:

  • Fine-tune large models on consumer hardware
  • Configure LoRA hyperparameters
  • Choose target modules for adapters

dpo-alignment

Keywords: DPO, RLHF, preference, alignment, human feedback, preference data Solves:

  • Align models to human preferences
  • Create preference datasets
  • Configure DPO training

synthetic-data

Keywords: synthetic data, data generation, teacher model, distillation Solves:

  • Generate training data with LLMs
  • Implement teacher-student training
  • Scale training data quality

when-to-finetune

Keywords: should I fine-tune, fine-tune decision, customize model Solves:

  • Decide when fine-tuning is appropriate
  • Evaluate alternatives to fine-tuning
  • Assess data requirements

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.14%
按下载量换算39

OpenCode

22.74%
按下载量换算34

Antigravity

16.34%
按下载量换算24

Gemini CLI

13.06%
按下载量换算19

windsurf

7.14%
按下载量换算11

trae

3.6%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills