Skip to content
Back to skills

Lora Linear Adapter

ASecurity

Create and validate low-rank LoRA adapters for linear layers with merge-equivalent inference.

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
testingpython

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill lora_linear_adapter --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lora Linear Adapter?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lora Linear Adapter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-lora-linear-adapter/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-lora-linear-adapter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: lora_linear_adapter
description: Create and validate low-rank LoRA adapters for linear layers with merge-equivalent inference.
---

# Lora Linear Adapter

## When to use
Use this skill when a future recovery or implementation needs the exact LoRA linear-layer mechanism: frozen W, rank-r matrices A and B, alpha/r scaling, zero-output initialization via B=0, and merge/unmerge equivalence. Do not use it as evidence of full language-model quality by itself.

## 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.

Files in this skill

  • SKILL.md1.4 KB
  • scripts/lora_core.py2 KB
  • tests/test_lora_linear_adapter.py364 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.