peft
Use PEFT for parameter-efficient fine-tuning adapters, LoRA and quantized workflows, prompt and soft methods, specialized tuners, save/load/merge operations, training integrations, and PEFT repository development.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- peft
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use PEFT for parameter-efficient fine-tuning adapters, LoRA and quantized workflows, prompt and soft methods, specialized tuners, save/load/merge operations, training integrations, and PEFT repository development.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/repo-provenance.md434 B
- 参考文档references/repo-routing-metadata.json331 B
- 参考文档references/troubleshooting.md1.3 KB
- 参考文档references/workflow-overview.md1.2 KB
03 SKILL.md 正文
PEFT
Use this skill when a task names Hugging Face PEFT, peft, PeftModel, PeftConfig, get_peft_model, LoRA/QLoRA, prompt tuning, adapter checkpoints, adapter merging, PEFT training integrations, or changes to the PEFT repository.
Route By Task
- Core adapter setup: use
sub-skills/adapter-core/SKILL.mdforPeftConfig,TaskType,PeftType,get_peft_model, adapter lifecycle, trainable status, custom model targeting, and low-level injection. - LoRA and quantization: use
sub-skills/lora-and-quantization/SKILL.mdforLoraConfig, QLoRA, DoRA, rsLoRA, PiSSA, CorDA, LoftQ, QALoRA, trainable tokens, and quantized-base compatibility. - Prompt and soft methods: use
sub-skills/prompt-and-soft-methods/SKILL.mdfor prompt tuning, prefix tuning, P-tuning, multitask prompt tuning, CPT, adaption prompt, cartridge, and trainable-token prompt workflows. - Specialized tuners: use
sub-skills/specialized-tuners/SKILL.mdfor IA3, BOFT, OFT, LoHa, LoKr, VeRA/PVeRA, VBLoRA, XLora, FourierFT, HRA/HiRA/SHiRA, RandLoRA, and other non-LoRA/non-prompt method families. - Save, load, merge, and deploy: use
sub-skills/save-load-merge/SKILL.mdfor adapter checkpoint layout,save_pretrained,from_pretrained,AutoPeftModel*,merge_and_unload, hotswap, mixed adapters, Hub/local loading, and conversion. - Training integrations: use
sub-skills/training-and-integrations/SKILL.mdfor Transformers Trainer, Accelerate, FSDP, DeepSpeed, TRL SFT, Diffusers examples, memory-efficient training, andtorch.compilecaveats. - PEFT repository development: use
sub-skills/repo-development/SKILL.mdfor contribution policy, new tuner registration, test selection, style/quality commands, docs, and AI-assisted PR disclosure rules.
Fast Start
- Verify imports with
sub-skills/adapter-core/scripts/check_peft_env.pyin an environment that haspeft,torch,transformers, andaccelerate. - Decide the adapter family before writing training code. LoRA and quantized workflows have different constraints from prompt-learning and specialized tuners.
- Keep base-model loading, adapter construction, training launcher settings, and checkpoint save/merge decisions separate so each can be reviewed.
- Avoid downloading large models in smoke tests. Use config construction, helper scripts, or tiny custom
torch.nn.Modulechecks when possible.
References
references/workflow-overview.mdgives a root-level decision map across adapter lifecycle stages.references/troubleshooting.mdcovers cross-cutting install/import, optional backend, target-module, checkpoint, merge, and training failures.references/repo-provenance.mdrecords the source revision and extraction evidence.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.