Fine Tuning Peft

Adapting pretrained LLMs to tasks/domains cost-effectively via supervised fine-tuning (SFT) and parameter-efficient fine-tuning (PEFT). Use when deciding fine-tune vs prompt/RAG, or when running LoRA, QLoRA, DoRA, (IA)³, prefix/prompt/P-tuning; building SFT/instruction-tuning data; setting rank/alpha/target modules; doing 4-bit NF4 + paged-optimizer training; chat templates, packing, completion-only loss masking; merging adapters and multi-LoRA serving; and the memory math for what fits on one GPU. Covers the HF PEFT + Transformers/TRL stack, Axolotl, Unsloth, Llama-Factory, torchtune, NeMo, and bitsandbytes. For distributed/full pretraining see [[training-frameworks]]; for preference/RL post-training (DPO/PPO/GRPO) see [[rl-rlhf-frameworks]]; for serving adapters see [[serving-frameworks]]/[[gke-inference-gateway]].

sanjeevrg89 Updated

File contents

sanjeevrg89/arete/tree/main/skills/fine-tuning-peft commit 319cdd013c

Frequently asked questions

npx skillmds@latest add sanjeevrg89/fine-tuning-peft