模型 Trainer
- 作者仓库星标 0
- 作者仓库 nano-core
Model Trainer Skill
When to use this skill
- Use when the user request matches this skill's domain and capabilities.
- Use when this workflow or toolchain is explicitly requested.
When not to use this skill
- Do not use when another skill is a better direct match for the task.
- Do not use when the request is outside this skill's scope.
Overview
This skill helps you train and fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face infrastructure.
Core Capabilities
1. Supervised Fine-Tuning
- Load pre-trained models from Hugging Face Hub
- Prepare datasets for fine-tuning
- Configure training arguments
- Handle model checkpointing and saving
2. Reinforcement Learning from Human Feedback (RLHF)
- Set up reward models
- Configure PPO (Proximal Policy Optimization) training
- Manage reward datasets
- Monitor training metrics
3. Parameter-Efficient Fine-Tuning (PEFT)
- LoRA (Low-Rank Adaptation) configuration
- QLoRA for quantized training
- Memory-efficient fine-tuning strategies
4. Training Infrastructure
- Hugging Face Jobs integration
- Multi-GPU training setup
- Distributed training configuration
- Resource optimization
Usage Instructions
Basic Fine-Tuning
- Choose a base model from Hugging Face Hub
- Prepare your training dataset
- Configure training arguments
- Set up the trainer with appropriate parameters
- Monitor training progress and metrics
RLHF Training
- Set up a reward model
- Prepare preference datasets
- Configure PPO training parameters
- Run training with appropriate safety constraints
- Evaluate model performance
PEFT Training
- Choose PEFT method (LoRA/QLoRA)
- Configure adapter parameters
- Set up memory-efficient training
- Save and load adapter weights
Dependencies
- transformers
- trl
- datasets
- accelerate
- peft
- bitsandbytes (for quantization)
- wandb (for experiment tracking)
Best Practices
- Start with small learning rates for fine-tuning
- Use appropriate batch sizes based on available memory
- Implement gradient clipping for stable training
- Save checkpoints regularly
- Monitor training metrics closely
- Use appropriate evaluation metrics for your use case
Integration Notes
- Works seamlessly with Hugging Face Hub for model storage
- Supports integration with Weights & Biases for experiment tracking
- Compatible with various model architectures (BERT, GPT, T5, etc.)
- Can be used with custom datasets and evaluation metrics
- 流狐分类
- 通用
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @0-CYBERDYNE-SYSTEMS-0 · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Use when the user request matches this skill's domain and capabilities. Use when this workflow or toolchain is explicitly requested.
Do not use when another skill is a better direct match for the task. Do not use when the request is outside this skill's scope.
This skill helps you train and fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face infrastructure.
Core Capabilities
Load pre-trained models from Hugging Face Hub Prepare datasets for fine-tuning Configure training arguments
Set up reward models Configure PPO (Proximal Policy Optimization) training Manage reward datasets
# Model Trainer Skill
## When to use this skill
- Use when the user request matches this skill's domain and capabilities.
- Use when this workflow or toolchain is explicitly requested.
## When not to use this skill
- Do not use when another skill is a better direct match for the task.
- Do not use when the request is outside this skill's scope.
## Overview
This skill helps you train and fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face infrastructure.
## Core Capabilities
### 1. Supervised Fine-Tuning
- Load pre-trained models from Hugging Face Hub
- Prepare datasets for fine-tuning
- Configure training arguments
- Handle model checkpointing and saving
### 2. Reinforcement Learning from Human Feedback (RLHF)
- Set up reward models
- Configure PPO (Proximal Policy Optimization) training
- Manage reward datasets
- Monitor training metrics
### 3. Parameter-Efficient Fine-Tuning (PEFT)
- LoRA (Low-Rank Adaptation) configuration
- QLoRA for quantized training
- Memory-efficient fine-tuning strategies
### 4. Training Infrastructure
- Hugging Face Jobs integration
- Multi-GPU training setup
- Distributed training configuration
- Resource optimization
## Usage Instructions
### Basic Fine-Tuning
1. Choose a base model from Hugging Face Hub
2. Prepare your training dataset
3. Configure training arguments
4. Set up the trainer with appropriate parameters
5. Monitor training progress and metrics
### RLHF Training
1. Set up a reward model
2. Prepare preference datasets
3. Configure PPO training parameters
4. Run training with appropriate safety constraints
5. Evaluate model performance
### PEFT Training
1. Choose PEFT method (LoRA/QLoRA)
2. Configure adapter parameters
3. Set up memory-efficient training
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> When to use this skill → When not to use this skill → Overview → Core Capabilities → 1. Supervised Fine-Tuning → 2. Reinforcement Learning from Human Feedback (RLHF)
要点 -> 原文未标出关键词
文件/命令 -> LoRA/QLoRA
内容 SHA-256 -> 110521ef90fe
原文结构
适用与边界
原文中的明确线索
LoRA/QLoRA