Repository navigation
loraspectra: Zero-dependency Rust CLI to audit, compress, bake rsLoRA scaling, and orthogonally merge LoRAs before GGUF export #32121
SalyyS1
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
For anyone converting
.safetensorsLoRA adapters to GGUF (convert_lora_to_gguf.py) or serving LoRAs inllama-server(--lora), we built loraspectra, a zero-dependency Rust CLI that inspects, compresses, bakes per-layer scaling, and merges.safetensorsLoRA checkpoints in milliseconds on CPU.Why use
loraspectrabeforeconvert_lora_to_gguf.py?rsLoRA(alpha_patterninto--bake-alpha):If an adapter was trained with
use_rslora=Trueor per-layeralpha_pattern, runningloraspectra compress adapter_model.safetensors -o normalized.safetensors --bake-alpha --rslorafolds the exact per-layer scale factor into1.0) without logit mismatch.merge --mode ortho-svd):Combining multiple LoRA adapters into a single conflict-free
.safetensorsfile before GGUF conversion avoids multi-adapter runtime overhead and KV-cache invalidation inllama-server.--energy 0.99or--policy mp):Truncates Marchenko-Pastur noise singular values using exact Eckart-Young SVD while preserving >99% spectral energy.
Repository & binaries: https://github.com/SalyyS1/loraspectra
If this is helpful for your
llama.cppLoRA pipeline, a star on SalyyS1/loraspectra is much appreciated!All reactions