Downloads · 30 days
0
hayulalab/qk-guided-lora-paper
qk-guided-lora-paper is a machine learning model from hayulalab. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as mit.
Downloads · 30 days
0
Access
Public
Updated Jul 8, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md30.1 KB · 51%
From the Hugging Face model README
Hayula AI Lab
We extend Circuit-Aware LoRA by introducing QK-guided rank selection, a principled method for allocating LoRA rank across transformer layers based on the intrinsic dimensionality of attention QK circuits. Inspired by Anthropic's finding that attention QK circuits form low-rank bilinear forms interpretable as feature detectors, we apply Singular Value Decomposition (SVD) to the product $W_Q^\top W_K$ at each layer to determine per-layer LoRA rank allocation. This preserves attention circuit structure while minimizing adapter parameters. Applied to Qwen2.5-7B (security QA, 28 layers) and Qwen3-8B (multi-expert reasoning, 36 layers) across three security-focused fine-tuning suites (Averroes, SAIF, Rushd), we show that QK-guided rank selection reduces total adapter parameters by 40% while maintaining or improving task performance compared to uniform rank allocation, and achieves within 1% of full fine-tuning performance on security-domain benchmarks.
| File | Description |
|---|---|
paper.md | Full paper (Markdown) |
paper.tex | Full paper (LaTeX source) |
README.md | This model card |
@techreport{hayula2026qkguidedlora,
title={QK-Guided Circuit-Aware LoRA: Structured Low-Rank Adaptation via Attention Circuit Factorization for Security Language Models},
author={Hayula AI Lab},
year={2026},
institution={Hayula AI Lab}
}