More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    PEFT: LoRA and QLoRA Fine-Tuning

    1

    Fine-tune 7B–70B models by training under 1% of parameters: choose LoRA, QLoRA, or another adapter method, configure it, avoid the silent failures, and serve the result.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    PEFT: LoRA and QLoRA Fine-Tuning

    PEFT: LoRA and QLoRA Fine-Tuning

    Example session with this skill installed

    I have a 13B open model and one 16 GB GPU. I want it to extract structured fields (vendor, date, total, line items) from invoices as JSON. I have about 4,000 labeled examples. Tell me the method, the configuration, and the plan — and what could go wrong.

    • Read your context and instructions
    • Compiled the peft

    Method call: QLoRA. A 13B base in bf16 needs ~26 GB — it does not fit in 16 GB even frozen, because activations still need room. At 4-bit NF4 the base drops to roughly 8 GB, leaving space for activations with gradient checkpointing on. Full fine-tuning was never an option on this card, and the task is narrow and format-driven, which is the adapter sweet spot.

    Configuration: NF4 base, bf16 compute, r=16, alpha=32, targets q_proj, v_proj, k_proj, o_proj plus the MLP projections (extraction needs the model to actually read numbers differently, not just sound different — a knowledge-touching task). Learning rate 2e-4, 2 epochs, best checkpoint by eval loss, not last.

    Data plan: your 4,000 examples get one fixed template — invoice text in, JSON out, byte-identical in training, eval, and inference. Split off 400 as held-out eval before training. Score the set against the readiness rubric first: real invoices (not synthetic filler) and a consistent JSON key order are the two criteria most likely to cost you points.

    Before training: load the 4-bit base alone and have it produce a few extractions zero-shot. If the quantized base is already incoherent, stop — that is the QLoRA collapse failure mode and no adapter fixes it.

    Eval: exact-match field accuracy on the 400 held-out invoices, plus a 20-prompt general spot check for forgetting. The trap to refuse: judging by training loss while eval format differs from your production prompt.

    Serving: single task, so merge and deploy one model — but keep the ~25 MB adapter file versioned with its data version. Your next 4,000 invoices should cost you a retrain of the adapter, not a new project.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Full fine-tuning updates every weight and stores optimizer state for all of them — which is why it needs datacenter hardware. Parameter-efficient fine-tuning freezes the base model and trains a small delta instead: a LoRA adapter for an 8B model is about 15 MB instead of 16 GB, trains in hours on one GPU, and can be swapped at inference time without reloading the base. This skill walks the whole job. A decision tree first checks that PEFT is even the right tool — narrow task and limited memory point to adapters; massive domain shift points to full fine-tuning; tiny models should just be fully trained. The method menu compares LoRA, QLoRA, LoHA/LoKr, IA³, bottleneck adapters, and prompt tuning with when each one wins. A decision table then maps your situation — model size, GPU memory, task type — to a concrete starting configuration: rank, alpha, target modules, learning rate. The seven-step run protocol covers setup, freezing the prompt template (the step whose absence causes the most common silent failure), data splitting, training with eval-loss monitoring, honest evaluation including a forgetting check, and the merge-versus-hot-swap serving decision. It also includes a memory-estimation guide so runs don't die to OOM an hour in, a config template, a data readiness rubric, a worked example (an 8B support-style adapter on a single 24 GB card), edge cases, and the failure modes worth knowing: dead adapters, format mismatch, QLoRA quantization collapse, and catastrophic forgetting.

    • Expect a small quality gap versus full fine-tuning on most tasks, larger on tasks far from the base model's pretraining.
    • Memory figures are planning estimates; exact usage depends on implementation, sequence length, and batch shape.
    • It does not cover distributed full-model training or reinforcement-learning fine-tuning methods.
    • Method names and defaults reflect the widely used open-source PEFT library conventions; other frameworks differ in details.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 24 days ago

    Permissions

    No special permissions declared or detected

    Listed24 days ago
    Updated21 days ago

    What's inside

    Frequently Asked Questions

    If the base model fits in your VRAM in bf16 with room for activations, plain LoRA. If it doesn't fit, QLoRA — the 4-bit base is what makes 70B-class training possible on a single card. The skill's decision table maps model size and memory to the call.

    For style and format tasks, 1,000–10,000 quality examples is the working range, with a held-out eval split from the start. More data doesn't rescue an inconsistent format — the readiness rubric scores that before you train.

    You can merge, but never throw the adapter away. Merging is one-way; the small adapter file, versioned with its data, is what lets you retrain, audit, or roll back later.

    New in LLM Ops