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.
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-changesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/huggingface/peft /tmp/peft && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/peft/.ai/skills/peft-method-changes ~/.gemini/antigravity-cli/skills/peft-method-changesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install peft-method-changes in Antigravity CLI
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
ANo 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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
