Skip to content
Back to skills

Lora Training Step

ASecurity

Run a deterministic reduced LoRA training step that updates only low-rank factors and records loss evidence.

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

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Lora Training Step?

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

Security grade badge for Lora Training Step
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-lora-training-step/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-lora-training-step)

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

SKILL.md
---
name: lora_training_step
description: Run a deterministic reduced LoRA training step that updates only low-rank factors and records loss evidence.
---

# LoRA Reduced Training Step

Use this skill when full pretrained model training is blocked but soft-mode recovery permits a mechanism-faithful reduced experiment. It executes an actual optimizer update on LoRA factors over supervised examples. Do not call this a full GLUE, GPT-2, or pretrained-model reproduction.

## Inputs
- Synthetic or resource-derived supervised examples.
- Frozen base weight matrix and LoRA A/B matrices.
- Learning rate, alpha scale, and number of bounded update steps.

## Outputs
- `loss_before` and `loss_after`.
- `params_before` and `params_after` with changed LoRA factors and unchanged base weights.
- Merge-equivalence diagnostics for the trained adapter.

## Workflow
1. Construct examples that expose a task update missing from the frozen base model.
2. Compute predictions with `W0 x + (alpha/r) B A x`.
3. Backpropagate mean-squared error analytically into A and B only.
4. Update A and B with a bounded deterministic gradient step and keep W0 unchanged.
5. Save validator-compatible traces with before/after losses and parameters.

## Validation
Run `python scripts/reduced_training.py --output /tmp/trace.json` or the included tests. The test requires loss reduction, changed LoRA factors, unchanged base weights, and merged inference equivalence.

## Limitations
This is a reduced standard-library proxy for the LoRA mechanism, not training of RoBERTa, DeBERTa, GPT-2, or GPT-3.

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…