Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

peft-method-changes

Skill by huggingface

Guides contributors through changing an existing PEFT method without breaking saved checkpoints. It covers forward changes, parameters and buffers, state_dict logic and config defaults. It is aimed at maintainers and contributors to the Hugging Face PEFT library.

  • Score 86
  • 22k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install peft-method-changes

Built from the published package, never by AI.

git clone --depth 1 https://github.com/huggingface/peft /tmp/peft && mkdir -p ~/.claude/skills && cp -r /tmp/peft/.ai/skills/peft-method-changes ~/.claude/skills/peft-method-changes

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install peft-method-changes in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill is a checklist for modifying an existing PEFT method in ways that could invalidate checkpoints users already trained. It applies when a change affects the forward method, adds or removes parameters or buffers, changes state_dict creation or loading, or changes config options or their defaults. Examples include rewriting forward for speed or memory, swapping a quantization backend, or making a checkpoint smaller.

The skill lists the steps to take. These are unit tests, the regression test for old checkpoints, checks that new config defaults reproduce earlier behavior, and a MetaMathQA benchmark run on main and on the branch. It also describes a dedicated testing script that compares outputs across dtypes and with and without merging. Results are reported in the pull request description. It is written for contributors to the PEFT library.

Written from the project's SKILL.md and checked against it.

What it can do

  • Unit and regression testingRuns pytest for the method and the regression test for old checkpoints.
  • State dict compatibilityRequires reliable detection and fixing of old state_dict structures when they change.
  • Config default checksConfirms that new config fields default to the previous behavior.
  • MetaMathQA benchmark comparisonCompares training loss and other metrics between main and the change branch.
  • Dedicated output testing scriptChecks that outputs stay the same across dtypes, with and without merging.
  • Pull request reporting checklistLists the test results and attachments to include in the PR description.

What you need

  • A checkout of the PEFT repository with pytest available
  • A CUDA GPU for the MetaMathQA benchmark

Try asking

  • Check whether my change to the LoRA forward method keeps old checkpoints working
  • Review my new config field and confirm its default matches the old behavior
  • Write a PR checklist for my PEFT state_dict change with the required tests

Good to know

  • Forward compatibility with older PEFT versions is not required
  • Changes that are only numerically different may need just a release note
  • The MetaMathQA benchmark requires a CUDA GPU
  • The dedicated testing script is not added to the repository

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .ai/skills/peft-method-changes/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md10 KB

Alternatives to peft-method-changes

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

peft-method-changes: common questions

When do I need these backward compatibility precautions for a PEFT change?

They are needed when a change affects the forward method, parameters or buffers, state_dict logic, or config options and defaults of an existing PEFT method. Adding a new method or a new non-default option does not need them.

Does the new PEFT version have to load checkpoints from older versions?

No. The source states that forward compatibility is not a requirement, so older PEFT versions do not need to load checkpoints made with newer versions.

Is the dedicated testing script added to the PEFT repository?

No. The source says the script is not added to the repository, but it should be attached to the pull request for others to run and for documentation.

How do I install peft-method-changes?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is peft-method-changes free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is peft-method-changes safe to use?

It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to peft-method-changes?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

peft-method-changes Install

Add to stack

Loading.