模特教练

其他 社区

技能解读

当前原文的自动摘译,尚未人工审校。

何时使用该技能

当用户请求与该技能的领域和功能匹配时使用。当明确请求此工作流程或工具链时使用。

什么时候不应该使用这个技能

当其他技能更适合该任务时,请勿使用。当请求超出该技能的范围时请勿使用。

1. 监督微调

从 Hugging Face Hub 加载预训练模型 准备数据集进行微调 配置训练参数 处理模型检查点和保存

2.人类反馈强化学习(RLHF)

设置奖励模型 配置 PPO(邻近策略优化)训练 管理奖励数据集 监控训练指标

3.参数高效微调(PEFT)

LoRA(低秩适应)配置 QLoRA 用于量化训练内存高效微调策略

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
通用
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@0-CYBERDYNE-SYSTEMS-0 · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# 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
4. 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

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。