model_finetuning

Fine-tune LLMs with SFT, DPO, and PPO/GRPO using HuggingFace Transformers and datasets.

43|11|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/vuralserhat86/antigravity-agentic-skills --skill model-finetuning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model_finetuning
Source: https://github.com/vuralserhat86/antigravity-agentic-skills/tree/main/skills/model_finetuning
Command: npx skills add https://github.com/vuralserhat86/antigravity-agentic-skills --skill model-finetuning

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires trl, transformers, datasets, peft, accelerate, torch, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of adapting pre-trained Large Language Models (LLMs) to specific tasks or human preferences, improving their performance and alignment beyond general capabilities.

Core Features & Use Cases

  • Instruction Tuning (SFT): Fine-tune models to follow instructions effectively.
  • Preference Alignment (DPO): Align model outputs with human preferences using Direct Preference Optimization.
  • Reward Optimization (PPO/GRPO): Train models using reinforcement learning to maximize a reward signal, suitable for complex tasks or human feedback.
  • Reward Model Training: Develop models that can score the quality of LLM generations.
  • Use Case: You have a base LLM and want it to generate more helpful and harmless responses according to user feedback. This Skill provides the tools to fine-tune the model using techniques like SFT for instruction following and DPO for preference alignment.

Quick Start

Use the model_finetuning skill to fine-tune a Qwen2.5-0.5B model using SFT with the provided dataset.

Frequently Asked Questions about model_finetuning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fine-tune an LLM to follow specific instructions using SFT?

Supervised fine-tuning (SFT) adapts a pre-trained LLM to follow instructions by training on labeled datasets. This Skill implements SFT using HuggingFace Transformers and datasets to effectively tune base models like Qwen2.5-0.5B for specific tasks.

What is the best way to align LLM outputs with human preferences using DPO?

Direct Preference Optimization (DPO) aligns LLM outputs with human preferences without requiring a separate reward model. This Skill provides DPO implementation to train models to generate more helpful and harmless responses based on user feedback data.

Can I use HuggingFace Transformers and datasets for reinforcement learning with PPO or GRPO?

Yes, you can use HuggingFace Transformers and datasets for reinforcement learning. This Skill supports reward optimization using PPO and GRPO, enabling complex RLHF pipelines and reward model training to maximize specific reward signals.

Do I need PyTorch and TRL to set up an RLHF pipeline for LLM alignment?

Yes, setting up an RLHF pipeline requires PyTorch and TRL along with HuggingFace Transformers. This Skill integrates these dependencies to provide comprehensive model adaptation capabilities including SFT, DPO, and reward model training.

How does reward model training work for scoring LLM generations?

Reward model training develops models that score the quality of LLM generations by learning from human feedback. This Skill enables building reward models that provide optimization signals for PPO or GRPO reinforcement learning algorithms.