llm-fine-tuning

Set up QLoRA, LoRA, and full fine-tuning infrastructure with Hugging Face TRL and Axolotl.

46|4|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/BagelHole/DevOps-Security-Agent-Skills --skill llm-fine-tuning-bagelhole
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-fine-tuning
Source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/tree/main/infrastructure/local-ai/llm-fine-tuning
Command: npx skills add https://github.com/BagelHole/DevOps-Security-Agent-Skills --skill llm-fine-tuning-bagelhole

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides the infrastructure and code to fine-tune Large Language Models (LLMs) using various techniques like QLoRA, LoRA, and full fine-tuning, enabling customization for specific domains and tasks.

Core Features & Use Cases

  • QLoRA/LoRA Fine-Tuning: Efficiently fine-tune large models on consumer-grade GPUs.
  • Distributed Training: Supports DeepSpeed and FSDP for multi-node, multi-GPU training.
  • Dataset Preparation: Guides on preparing datasets for instruction tuning, DPO, or RLHF.
  • Model Export: Merging LoRA adapters and exporting models for serving.
  • Use Case: Fine-tune an open-source LLM on your company's internal documentation to create a specialized chatbot that can answer employee questions accurately.

Quick Start

Use the llm-fine-tuning skill to set up QLoRA fine-tuning for a Llama 3.1 model using the provided Axolotl configuration.

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 consumer-grade GPUs?

Fine-tune an LLM with QLoRA on consumer-grade GPUs by loading quantized base models and applying low-rank adapters. This Skill configures Hugging Face TRL and Axolotl to efficiently train large models with limited VRAM.

What is the best way to set up distributed training for LLMs using DeepSpeed?

Set up distributed training for LLMs using DeepSpeed or FSDP for multi-node, multi-GPU execution. This Skill configures the infrastructure to handle distributed training workloads and accelerate full fine-tuning processes.

How do I prepare datasets for instruction tuning and DPO?

Prepare datasets for instruction tuning and DPO by formatting conversational or paired preference data. This Skill provides scripts to transform raw datasets into compatible formats for Hugging Face TRL training.

Can I use Axolotl to train a Llama model and export it for deployment?

Use Axolotl to train a Llama model and export it for deployment by merging LoRA adapters into the base weights. This Skill handles the training execution and model export for serving.

Does full fine-tuning offer advantages over LoRA for domain customization?

Full fine-tuning updates all model weights for maximum domain adaptation, unlike LoRA which only trains adapters. This Skill supports both methods, allowing customization for specific tasks depending on compute resources.

Why does QLoRA training require bitsandbytes and accelerate?

QLoRA training requires bitsandbytes for model quantization and accelerate to manage device mapping. This Skill utilizes these dependencies to enable efficient fine-tuning on limited hardware.