peft-fine-tuning

Train LoRA/QLoRA adapters for parameter-efficient fine-tuning of large language models.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/MarbleSodas/Mavis --skill peft-fine-tuning-marblesodas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: peft-fine-tuning
Source: https://github.com/MarbleSodas/Mavis/tree/main/optional-skills/mlops/peft
Command: npx skills add https://github.com/MarbleSodas/Mavis --skill peft-fine-tuning-marblesodas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires peft, transformers, torch, bitsandbytes, and includes references (resource) components.

What problem does it solve?

Parameter-efficient fine-tuning (PEFT) removes the need to retrain entire large language models by letting you adapt a model while training only a tiny fraction of its parameters.

Core Features & Use Cases

  • LoRA/QLoRA adapter training: Train adapters (often <1% of parameters) for efficient instruction tuning, domain adaptation, and style/task specialization.
  • Multi-adapter serving: Load multiple adapters on one base model and switch at runtime for different tasks without duplicating the full model.
  • Memory-efficient 70B+ workflows: Use QLoRA with 4-bit quantization (bitsandbytes) to fit large models on constrained GPU memory.
  • Deployment-ready merging: Merge adapters into the base model for inference to eliminate adapter overhead.
  • Use case: You want to fine-tune a 70B instruction model for a specific domain on a single 24GB GPU, then serve multiple task adapters by switching between them dynamically.

Quick Start

Install the PEFT stack and start training a LoRA or QLoRA adapter for your target causal language model on your dataset using HuggingFace Transformers.

Frequently Asked Questions about peft-fine-tuning

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

FAQPage Schema
How do I fine-tune a 70B LLM on a single 24GB GPU?

You can fine-tune a 70B LLM on a single 24GB GPU using QLoRA with 4-bit quantization via bitsandbytes, which drastically reduces memory requirements for parameter-efficient fine-tuning.

What is parameter-efficient fine-tuning with LoRA adapters?

Parameter-efficient fine-tuning with LoRA adapters involves training less than 1% of a model's parameters to adapt large language models for instruction tuning or domain adaptation without retraining the entire network.

Can I load multiple LoRA adapters on one base model for serving?

Yes, you can load multiple LoRA adapters on a single base model and switch between them dynamically at runtime for different tasks without duplicating the full model weights.

Does HuggingFace PEFT work with bitsandbytes for 4-bit quantization?

HuggingFace PEFT works with bitsandbytes for 4-bit quantization to enable QLoRA training, allowing large models to fit under constrained GPU memory and compute budgets.

How do I merge trained LoRA adapters into a base model for inference?

You can merge trained LoRA adapters into the base model for deployment-ready inference, which eliminates adapter overhead and consolidates the adapted weights into a single model.

What is the best way to adapt a causal language model for domain specialization?

The best way to adapt a causal language model for domain specialization is using HuggingFace PEFT with transformers to train LoRA or QLoRA adapters efficiently under limited compute budgets.