Tool for fast edits to large language models
Top 30.6% on sourcepulse
FastEdit provides an efficient method for injecting customized knowledge into large language models (LLMs) via a single command. It targets LLM developers and researchers seeking to update or correct factual information within pre-trained models, offering a significant speed advantage over retraining.
How It Works
FastEdit implements the Rank-One Model Editing (ROME) algorithm. This approach targets specific weight matrices within the transformer architecture, enabling localized updates to factual knowledge without requiring full model retraining. This targeted editing is advantageous for its speed and reduced computational cost compared to fine-tuning or full model updates.
Quick Start & Requirements
pip install pyfastedit
or clone the repository and install requirements (pip install -r requirements.txt
).CUDA_VISIBLE_DEVICES=0 python -m fastedit.editor --data <data_path> --model <model_name> --config <config_name> --template <template_name>
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is marked with a TODO list indicating ongoing development, including plans to implement MEMIT, automatic subject/target identification, and methods to avoid performance degradation in instruction-following models. The current focus appears to be on factual editing rather than broader behavioral changes.
2 years ago
1 day