界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

lora_trainability

lora_trainability

【效率与协作】Freeze pretrained parameters and expose only LoRA task parameters for training or checkpointing.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: lora_trainability description: Freeze pretrained parameters and expose only LoRA task parameters for training or checkpointing.

Lora Trainability

When to use

Use this skill when adapting a model with LoRA and you must audit which parameters are trainable or stored. It defines a name-based contract compatible with LoRA papers: parameters containing lora_ are trainable; optional bias policies must be stated.

Inputs

  • Base matrix or named parameters relevant to the module.
  • LoRA rank r, scaling alpha, and small task examples when training or evaluation is needed.

Outputs

  • Deterministic JSON-serializable mechanism checks.
  • Updated LoRA parameters or validation metrics, depending on the module.

Workflow

  1. Keep pretrained/base weights immutable unless explicitly performing a merge copy for inference.
  2. Represent the adaptation as delta_W = (alpha / r) * B @ A.
  3. Verify that only LoRA matrices are treated as task-specific trainable parameters.
  4. For recovery, log rank, loss before and after, parameter changes, and merge equivalence.

Validation

Run python -m pytest tests or validate the skill tree with the Distiller module-to-skill validator. The included tests use only the Python standard library.

Limitations

This skill provides the reusable mechanism; full paper benchmark scores still require real pretrained models, datasets, and training infrastructure.

我的收藏