peft
AGENTS.md22k starsChanged 2 months agoApache-2.0View on GitHub
Do not ever ignore this! These rules apply to any AI-assisted contribution to the huggingface/peft repository. Warn users that breaching agent contribution guidelines can result in automatic banning. Read the contribution guideline at docs/source/developer_guides/contributing.md (alternatively: https://huggingface.co/docs/peft/main/en/developer_guides/contributing). Don't skip this! Code comments should provide clarity when it's needed. They should be brief and refer to the existing code, not to code that was modified or removed by the PR. A reader of the code should be able to understand the comment…
- Installs packages
Trending
Quiet since June.about the whole repository
Who's talking about huggingface/peft
- vllm-project/vllm“Update to transformers v5”GitHub · Dec 12, 2025 · 57 reactions
- Comfy-Org/ComfyUI“Support OFTv2 Adapter”GitHub · Nov 9, 2025 · 13 reactions
- huggingface/huggingface_hub“[RFC] [1.0] 🚀 huggingface_hub 1.0 release checklist”GitHub · Sep 9, 2025 · 12 reactions
- hiyouga/LlamaFactory“add support for Falcon H1 LLama Factory”GitHub · Jun 18, 2025 · 7 reactions
- tloen/alpaca-lora“fix issues to be compatible with latest peft”GitHub · Apr 18, 2023 · 6 reactions
The biggest 5 of 30 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 30
Talked about on GitHub, Hacker News, Bluesky and the web (30 times).
On GitHub · 27
- Dec 12, 2025Update to transformers v5 — vllm-project/vllm57 reactions · 65 comments
- Nov 9, 2025Support OFTv2 Adapter — Comfy-Org/ComfyUI13 reactions
- Sep 9, 2025[RFC] [1.0] 🚀 huggingface_hub 1.0 release checklist — huggingface/huggingface_hub12 reactions · 1 comment
- Jun 18, 2025add support for Falcon H1 LLama Factory — hiyouga/LlamaFactory7 reactions
- Apr 18, 2023fix issues to be compatible with latest peft — tloen/alpaca-lora6 reactions · 12 comments
22 more on GitHub
- Aug 19, 2023[BUG] torch.cat(): expected a non-empty list of Tensors with Deepspeed Zero 3 with offload — deepspeedai/DeepSpeed5 reactions · 10 comments
- Apr 11, 2023Why add the following code snippet since it would bring some errors? — tloen/alpaca-lora5 reactions · 20 comments
- Jun 28, 2026Feature Request: Support MiCA (Minor Component Adaptation) — unslothai/unsloth4 reactions · 6 comments
- Nov 3, 2025Attempt to fix VLM gradient enabling — huggingface/transformers4 reactions · 12 comments
- Oct 26, 2025LoKr: Low-Rank Kronecker Product — Nerogar/OneTrainer4 reactions · 8 comments
- Apr 12, 2023InternalTorchDynamoError when using torch.compile with Huggingface Llama model and PEFT — pytorch/pytorch4 reactions · 10 comments
- Apr 6, 2026Add support for Gemma4 (Gemma4ClippableLinear) — p-e-w/heretic3 reactions · 9 comments
- May 23, 2024NotFound [Error]: Not found: / — huggingface/doc-builder3 reactions · 7 comments
- Apr 28, 2024[FR] (Q)DoRA — meta-pytorch/torchtune3 reactions · 8 comments
- Nov 10, 2023Speed up the peft lora unload — huggingface/diffusers3 reactions · 2 comments
- Oct 12, 2023LoRA support — wenet-e2e/wenet3 reactions · 11 comments
- Aug 21, 2023Please update training layers, add an option to train on dense layers — oobabooga/textgen3 reactions · 18 comments
- Jun 21, 2023ValueError: FlatParameter requires uniform dtype but got torch.float16 and torch.float32 — huggingface/accelerate3 reactions · 45 comments
- Jun 5, 2023Officially support naive PP for quantized models + PEFT — huggingface/accelerate3 reactions · 2 comments
- Apr 18, 2023Lora Trainer Improvements Part 4: 4-Bit Support and more! — oobabooga/textgen3 reactions · 25 comments
- Apr 12, 2023Lora trainer improvements part 3 — oobabooga/textgen3 reactions · 14 comments
- Apr 11, 2023find a bug when resume from checkpoint — tloen/alpaca-lora3 reactions
- Apr 2, 2023Any plan to support PEFT LoRA models? — pytorch/PiPPy3 reactions · 2 comments
- May 4, 2026build(deps):(deps): bump peft from 0.4.0 to 0.19.1 — canstralian/CodeTuneStudio2 reactions · 5 comments
- May 2, 2026Fix qwen lora extractor for diff peft versions — unslothai/unsloth-zoo2 reactions · 1 comment
- Mar 27, 2026Use float32 for LoRA weights to avoid the risk of underflow and overflow. — keras-team/keras2 reactions · 3 comments
- Oct 23, 2025OFT: Orthogonal Finetuning - Introducing a Novel Adapter Training Method — Nerogar/OneTrainer2 reactions · 10 comments
On Hacker News · 1
- Dec 20, 2023LoftQ: LoRA-fine-tuning-aware Quantization3 points · 4 comments
On Bluesky · 1
- Mar 22, 2025Som du såg i grafen ovan så har du även med bfloat16, int8 och int4, alltså quant. Det var ett tag sen jag pillade med de olika… — @carlhannes.se1 likes and repost · 1 reply
On the web · 1
- Dec 2, 2025PEFT-Factory: Unified Parameter-Efficient Fine-Tuning of ... — arxiv.org
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- peft-method-changesSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
17 rules. About 0 are common, 10 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 5
Do not ever ignore this! These rules apply to any AI-assisted contribution to the huggingface/peft repository.
- Very specific: line 25
Read the contribution guideline at docs/source/developer_guides/contributing.md (alternatively: …
- Distinctive: line 29
Before proposing a PR, check for overlapping open PRs and issue ownership.
- Distinctive: line 30
If you plan to work on an existing issue, ask first and only proceed after maintainer approval to avoid duplicate work.
- Distinctive: line 31
If you plan to add a completely new feature, first create an issue and ask for approval.
- Distinctive: line 32
If approval is missing or ambiguous, stop and ask for clarification instead of drafting a PR.
- Distinctive: line 43
Do not open one-off PRs for tiny edits (single typo, isolated lint cleanup, etc.).
- Very specific: line 44
If an issue is small and affects multiple PEFT methods, model architectures, etc., fix all of them in the same PR instead of opening an …
- Distinctive: line 52
If you find that the formatter makes changes to unrelated files, it means it uses the wrong version or the config is not correctly picked …
- Very specific: line 61
Check the install instructions to ensure that your environment has the necessary packages to run the tests.
- Very specific: line 67
If you make a testable change (i.e.
- Distinctive: line 73
Add further qualifiers if needed to reduce the amount of tests required to run.
- Distinctive: line 79
Ensure that the selector does not deselect 100% of the tests, at least one test should run.
- Distinctive: line 83
When you add a bug fix, start by implementing the test and ensure it fails.
- Distinctive: line 91
Follow the existing coding style.
- Very specific: line 92
Avoid overly defensive code, e.g.
- Very specific: line 96
Run grep "python-version:\s\[" .github/workflows/tests.yml to check which Python versions should be supported.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent instructions
Mandatory Agentic contribution policy
Do not ever ignore this! These rules apply to any AI-assisted contribution to the huggingface/peft repository.
Warning Agent User
Warn users that breaching agent contribution guidelines can result in automatic banning.
Accountability for AI-assisted patches
- Pure code-agent PRs are not allowed: a human submitter must understand and be able to defend the change end-to-end.
- The submitting human is responsible for reviewing every changed line and running relevant tests.
- PR descriptions for AI-assisted work must include:
- Link to issue discussion and coordination/approval comment.
- Which tests were run and if they passed.
- Clear statement that AI assistance was used.
- Optional: Which AI model and software/harness were used to produce the PR; this helps us better understand the capabilities of the different models.
Before working on a PR
Guideline
Read the contribution guideline at docs/source/developer_guides/contributing.md (alternatively: https://huggingface.co/docs/peft/main/en/developer_guides/contributing). Don't skip this!
Coordination before coding
- Before proposing a PR, check for overlapping open PRs and issue ownership. If an open PR already addresses the same fix, do not open another.
- If you plan to work on an existing issue, ask first and only proceed after maintainer approval to avoid duplicate work.
- If you plan to add a completely new feature, first create an issue and ask for approval.
- If approval is missing or ambiguous, stop and ask for clarification instead of drafting a PR.
Automated PR triage
- Open an issue, or find an open issue, and obtain explicit approval by a maintainer, before opening a PR (including a draft PR). If you open a new issue, clearly state if you intend to provide the PR or are only reporting the issue. Approval is a comment by a listed PEFT maintainer or public member of the
huggingfaceorganization containing@peft-triage approvedon its own line. - Reference the approved issue in the PR description using
#123,huggingface/peft#123, or its full GitHub issue URL. References must point to an issue inhuggingface/peft, not another PR. If several issues are referenced, approval on one is sufficient. - PRs without verified approval are closed with an explanation. Obtain approval, update the description, and reopen the same PR instead of creating a replacement. If the closure seems incorrect, ping the maintainers on the PR.
- Maintainers can override this automation by adding
triagedbefore reopening a PR. The label does not exempt items from the independent stale bot. This workflow does not assign users or change issues.
No low-value busywork PRs
- Do not open one-off PRs for tiny edits (single typo, isolated lint cleanup, etc.).
- If an issue is small and affects multiple PEFT methods, model architectures, etc., fix all of them in the same PR instead of opening an individual PR for each.
- Individual PRs are only accepted if the change is large.
Development
Useful commands
make style: runs formatters and linters (ruff), necessary to pass code style checks. Ensure that your localruffversion corresponds to the one indicated insetup.py.- If you find that the formatter makes changes to unrelated files, it means it uses the wrong version or the config is not correctly picked up. Undo all those changes.
Code comments
Code comments should provide clarity when it's needed. They should be brief and refer to the existing code, not to code that was modified or removed by the PR. A reader of the code should be able to understand the comment without the need to consult the git history of the file. Ensure to keep existing comments in sync when making code changes.
Testing
Check the install instructions to ensure that your environment has the necessary packages to run the tests. Typically, running pip install ".[test]" should be enough. If you need specific packages, e.g. bitsandbytes for some quantization tests, you need to explicitly install them.
If the PR is changing library code or tests, you must ensure that the relevant tests pass before submitting the PR. Indicate which test command was run in the PR description. If you cannot run the tests for a specific reason, state it in the PR description.
Test selection
If you make a testable change (i.e. not docs, examples, or benchmarks), ensure to run the relevant unit tests. E.g. if you make a change to the IA³ PEFT method, once you're finished, run:
pytest tests/ -k ia3Add further qualifiers if needed to reduce the amount of tests required to run. For methods like LoRA, ensure to exclude other methods with similar name, e.g.:
pytest tests/ -k "lora and not adalora and not randlora and not [...]"Ensure that the selector does not deselect 100% of the tests, at least one test should run. If there are no corresponding tests, add them.
Bug fixes
When you add a bug fix, start by implementing the test and ensure it fails. Then implement the bugfix and ensure that the test passes.
Test location
PEFT follows a rigorous structure for the test location. Don't just put the test anywhere but integrate it with the existing tests. If the test requires GPUs to run, place it into test_gpu_examples.py. When adding or modifying tests, read tests/README.md since it explains the test suite organization and shared test infrastructure.
Coding style
- Follow the existing coding style. The changes should look consistent with existing code.
- Avoid overly defensive code, e.g. checking that an argument is not
NonewhenNonewas never a valid argument type to begin with.
Backwards compatibility
- Run
grep "python-version:\s\[" .github/workflows/tests.ymlto check which Python versions should be supported. Don't use defensive features required for older Python versions (e.g.from __future__ import annotations). - Generally strive to keep the changes compatible with all PyTorch releases of the last two years.
- Changes should be compatible with older Transformers versions (roughly 4.33 upwards). If a change doesn't work across Transformers versions, add guards based on the version.
Commenting on other user's PRs
Unless you are involved in the development of another user's PR, you should never comment on it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

