llm-fine-tuning

Fine-tune large language models with QLoRA, Spectrum, and full fine-tuning via TRL and PEFT.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/punkt2/llm-fine-tuning-skill --skill llm-fine-tuning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-fine-tuning
Source: https://github.com/punkt2/llm-fine-tuning-skill/tree/main
Command: npx skills add https://github.com/punkt2/llm-fine-tuning-skill --skill llm-fine-tuning

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Fine-tune large language models efficiently using modern techniques (QLoRA, Spectrum, full fine-tuning) with TRL and PEFT, enabling domain adaptation and customization for specific tasks.

Core Features & Use Cases

  • Supports QLoRA on consumer GPUs with 4-bit quantization and LoRA adapters.
  • Provides Spectrum and full fine-tuning workflows with distributed training support (DeepSpeed ZeRO3, FSDP) and model merging.
  • Covers dataset preparation, training configuration, evaluation, and post-training steps including merging adapters and pushing to hub.

Quick Start

Run the supervised fine-tuning workflow by executing the training script with a YAML config.

Frequently Asked Questions about llm-fine-tuning

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

FAQPage Schema
How do I fine-tune an LLM with QLoRA on a single GPU?

Fine-tune an LLM with QLoRA on a single GPU using 4-bit quantization and LoRA adapters. This approach reduces memory consumption, enabling domain adaptation on consumer hardware without requiring multi-node clusters.

Can I use DeepSpeed ZeRO3 for distributed LLM fine-tuning?

Yes, you can use DeepSpeed ZeRO3 for distributed LLM fine-tuning. It supports Spectrum and full fine-tuning workflows across multi-node clusters, enabling scalable training and model merging for large models.

What is the best way to configure TRL and PEFT for supervised fine-tuning?

The best way to configure TRL and PEFT for supervised fine-tuning is through a YAML-driven configuration. This method streamlines dataset preparation, training setup, and evaluation workflows into a single executable script.

How does Spectrum fine-tuning compare to full parameter training?

Spectrum fine-tuning offers a targeted alternative to full parameter training by selectively updating weights. Both methods are supported, with Spectrum providing efficient domain adaptation while full training maximizes performance improvements.

Do I need to merge LoRA adapters after training to evaluate the model?

Yes, you need to merge LoRA adapters after training to evaluate the model. The workflow includes post-training steps to merge adapters and optionally push the consolidated model to the Hugging Face Hub.

What datasets are required for large language model domain adaptation?

Large language model domain adaptation requires prepared datasets for supervised fine-tuning. The workflow covers dataset preparation, allowing you to customize training data for specific tasks and performance improvements.