← all repositories

jianghoucheng/AlphaEdit

AlphaEdit implements null-space constrained parameter projection for editing large language models while preserving their existing knowledge.

446 stars Python Language ModelsML Frameworks
AlphaEdit
Velocity · 7d
+0.7
★ / day
Trend
steady
star history

AlphaEdit is a model editing technique for language models that projects parameter perturbations onto the null space of key matrices to minimize disruption to preserved knowledge. It removes output error related to existing knowledge from the editing objective, allowing the model to focus on knowledge updates without trade-off. The method maintains invariant hidden representation distributions after edits, enabling post-edited LLMs to handle both knowledge update and preservation simultaneously. The codebase includes experiments for editing models like Llama3-8B-instruct on counterfact datasets.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.