executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
core-lora-apiIntegrate loralib into PyTorch modules, select trainable adapter parameters, save or load LoRA-only checkpoints, and control merge behavior safely.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the user wants to replace PyTorch layers with LoRA counterparts, adapt a custom model, inspect trainable parameters, or serialize only the low-rank update.
nn.Linear, nn.Embedding, or a supported convolution with a LoRA
layer.MergedLinear when one projection stores multiple logical projections,
such as a fused QKV matrix.lora_A/lora_B keys, wrong rank/scaling, or unexpected
eval-time weight changes.python -m pip install loralib.import loralib as lora and replace only the modules that should
receive a low-rank update.r, normally choose lora_alpha explicitly, and decide
whether the module should merge its update during eval().lora.mark_only_lora_as_trainable(model, bias="none") before creating
the optimizer. Use the same bias policy when calling lora.lora_state_dict.strict=False.Run the shared smoke helper before changing a custom model. From this sub-skill directory, use:
python ../../scripts/check_lora_core.py --json
lora.Linear: ordinary dense layers; set fan_in_fan_out=True when the
stored weight uses transposed Conv1D-style layout.lora.Embedding: low-rank update to an embedding table. Its API has no
dropout argument.lora.MergedLinear: fused projections; enable_lora selects which equal-
width slices get adapters. The list length must divide out_features.lora.Conv1d, lora.Conv2d, lora.Conv3d: convolution wrappers. Keep
kernel_size an integer for this repository implementation.../nlu-glue-adaptation/SKILL.md.../nlg-gpt2-adaptation/SKILL.md.Use this sub-skill when the user asks to:
nn.Module and keep the base checkpoint format;eval() and train();lora_state_dict() output for different bias= policies; orMergedLinear instead of two separate
linear wrappers.Before returning, confirm all of the following when they apply:
mark_only_lora_as_trainable;lora_state_dict;strict=False for adapter-only checkpoints; andmerge_weights is enabled.