计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
adapter-core【效率与协作】Core PEFT adapter setup, configuration, target module selection, adapter lifecycle, model/layer status diagnostics, custom models, and low-level adapter injection.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about constructing PEFT configs, wrapping a model with adapters, managing adapters after creation, diagnosing adapter state, targeting modules in custom models, or using low-level adapter injection.
peft, torch, transformers, and accelerate without downloading models.PeftConfig, TaskType, PeftType, get_peft_model, PeftModel, and adapter names.torch.nn.Module models.inject_adapter_in_model when a PeftModel wrapper is not desired.../lora-and-quantization/SKILL.md.../prompt-and-soft-methods/SKILL.md.../save-load-merge/SKILL.md.../training-and-integrations/SKILL.md.python scripts/check_peft_env.py from this sub-skill directory to verify imports and local package facts.references/api-reference.md for the core class/function surface and common enum values.references/workflows.md for adapter construction, custom model targeting, lifecycle management, and low-level injection.references/troubleshooting.md when errors mention invalid task types, missing target_modules, unsupported modules, adapter status irregularities, or optional dependency imports.get_peft_model(base_model, peft_config, adapter_name="default") for normal Transformers and custom PyTorch models when PEFT should return a PeftModel wrapper with helper methods.target_modules for custom models unless the method and architecture have a known PEFT default mapping.modules_to_save for non-adapter layers that must remain trainable and be stored with the adapter, such as custom heads or task heads.print_trainable_parameters(), get_model_status(), and get_layer_status() before training when trainable counts, active adapters, or merged/disabled states look surprising.inject_adapter_in_model(peft_config, model, adapter_name=...) only when the caller needs adapter layers in a plain torch.nn.Module and does not need PeftModel helper methods.references/api-reference.md: API inventory, enum usage, config validation, lifecycle helpers, and status helpers.references/workflows.md: practical recipes for standard wrapping, custom modules, target discovery, adapter lifecycle, and low-level injection.references/troubleshooting.md: diagnosis paths for target module, enum, trainability, optional dependency, custom module, and low-level injection failures.scripts/check_peft_env.py: safe local import/config smoke check with --help, JSON output option, and optional CUDA facts.