Skip to content
Back to skills

Svd Adaptation Layer

ASecurity

Implement AdaLoRA SVD-style low-rank linear updates with frozen base weights and active-rank scaling.

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
testingpythontesting

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 svd_adaptation_layer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Svd Adaptation Layer?

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

Security grade badge for Svd Adaptation Layer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-svd-adaptation-layer/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-svd-adaptation-layer)

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: svd_adaptation_layer
description: Implement AdaLoRA SVD-style low-rank linear updates with frozen base weights and active-rank scaling.
---

# SVD Adaptation Layer

Use this skill when reconstructing or testing AdaLoRA-style parameter-efficient adaptation for a linear layer without depending on the original paper repository.

## Inputs

- Base weight as a row-major matrix `[out_features][in_features]` and optional bias.
- Trainable low-rank state: `A` with shape `[rank][in_features]`, `E` singular values, and `B` with shape `[out_features][rank]`.
- Batch input vectors `[batch][in_features]`, scaling alpha, and active-rank denominator.

## Outputs

- Adapted linear outputs.
- Active rank and update matrix metadata.

## Workflow

1. Treat the base weight as immutable.
2. Count nonzero singular values to determine active rank unless an explicit rank denominator is supplied.
3. Compute the base linear output.
4. Compute the SVD-like update `B @ (diag(E) @ A)` and add `x @ update.T * alpha / active_rank`.
5. If rank is zero or all singular values are zero, return exactly the base linear output.

## Validation

Run `python scripts/svd_layer.py --self-test` or validate the skill tree with `validate_skill_tree.py --run-tests`.

## Limitations

The bundled script uses standard-library arithmetic for deterministic recovery tests. Production model integrations should map this contract to tensor libraries while preserving the same parameter semantics.

Files in this skill

  • SKILL.md1.4 KB
  • scripts/svd_layer.py1.8 KB
  • tests/test_svd_layer.py675 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.