Skip to content

astro-weights

astro-weights logo

Small course corrections for open LLMs. Agent proposes small low-rank edits to model weights; edits that hold up under paired tests get saved as plain PEFT LoRA adapters.

Pre-alpha

0.1.0 on PyPI. API changes without notice until 1.0.

Covers edit core (build low-rank edits, save and load as LoRA adapters, apply to transformers models, export as GGUF with model card), difference-of-means directions with gate, eval runner with graders, paired eval statistics.

Install

pip install astro-weights

Applying edits to transformers models needs hf extra (adds torch, transformers, peft):

pip install "astro-weights[hf]"

Where to go

Need Page
First edit, start to finish Tutorial: first edit
Adapter from recipe file, GGUF and card from CLI How-to: build adapter from recipe file
Dense dW as low-rank delta, with known error How-to: convert dense update
Check adapter before shipping How-to: inspect adapter
Edited weights without adapter How-to: save merged weights
llama.cpp adapter, GGUF splice, model card How-to: export GGUF and model card
Direction from paired prompts How-to: find and gate direction
Base vs edit on same items How-to: compare two eval arms
Generate and compare arms on model How-to: run eval end to end
Every public function and type Reference
Why output is LoRA Explanation: why LoRA

Source, issues, changelog: GitHub.