Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
lora_merge_latency【部署与运维】Merge LoRA low-rank factors into a dense weight and verify deployment-equivalent inference.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when deploying or validating LoRA without extra inference latency. It consumes a base weight and trained factors and emits a merged dense matrix plus equivalence checks.
W0, A, B, alpha, and test inputs.
Merged weight W, unmerged-vs-merged maximum error, and optional restored base weight.
Compute W = W0 + (alpha/r) BA, run the ordinary dense layer, compare it with the unmerged LoRA forward pass, and record a tight numerical tolerance.
Run the included tests or validate the skill tree with tests.
Merging one adapter at a time is appropriate for single-task batches; mixed adapters may require unmerged dynamic routing.