Skip to content
Back to skills

Importance Rank Allocator

ASecurity

Compute AdaLoRA sensitivity-uncertainty triplet scores and globally mask singular values to a target rank budget.

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 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 importance_rank_allocator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Importance Rank Allocator?

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

Security grade badge for Importance Rank Allocator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-importance-rank-allocator/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-importance-rank-allocator)

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: importance_rank_allocator
description: Compute AdaLoRA sensitivity-uncertainty triplet scores and globally mask singular values to a target rank budget.
---

# Importance-Aware Rank Allocator

Use this skill when a recovery or implementation needs AdaLoRA's adaptive rank allocation rather than fixed LoRA ranks.

## Inputs

- A list of adapted matrices with `A`, `E`, `B` parameters and matching gradients.
- Previous EMA state for sensitivity and uncertainty, or empty state for the first step.
- Hyperparameters `beta1`, `beta2`, and target global rank.

## Outputs

- Updated EMA state.
- Per-triplet importance scores.
- Mask threshold and masked singular values.
- Rank pattern for every adapted matrix.

## Workflow

1. Compute instantaneous sensitivity `abs(parameter * gradient)` for every AdaLoRA parameter.
2. Update smoothed sensitivity and uncertainty EMAs.
3. Score each entry with `smoothed_sensitivity * uncertainty`.
4. Combine each triplet as singular-value score plus mean scores from the corresponding `A` row and `B` column.
5. Retain the top target-rank triplets across all matrices and set other singular values to zero.
6. Log rank pattern and threshold so downstream recovery can verify budget compliance.

## Validation

Run `python scripts/rank_allocator.py --self-test` or the provided tests.

## Limitations

This script is deterministic and standard-library only. It is intended as executable mechanism evidence and a reference contract for tensor implementations.

Files in this skill

  • SKILL.md1.5 KB
  • scripts/rank_allocator.py3.1 KB
  • tests/test_rank_allocator.py646 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.