# 🔧 NeuroGit-GFN edits open-weight LLM behaviour with rules and rolls back single rules

AI Today · published 2026-12-02T06:30:00Z · https://ai-today.com/product/b40a8d12-8206-4e81-bc91-d3a96b6bee40?lang=en

![NeuroGit-GFN repository preview](https://img.ai-today.com/d/86e859932aed41f58c909c66f77ceff3/XVQE9HjkCt7RoLcbkjHC23iyRIkihqBBhKeMTHGofeo.jpg)

- 🔧 The open-source tool **NeuroGit-GFN** compiles rules for the knowledge and behaviour of an open-weight LLM into a PEFT adapter, without retraining.
- 📜 According to the project page, `gfn blame` shows which rule shaped an answer, and `gfn revert` undoes a single rule in milliseconds.
- 📦 Install with `pip install neurogit-gfn`; the developer says it was validated on models from 1B to 14B parameters.

🔧 NeuroGit-GFN is an open-source tool for changing the knowledge and behaviour of an open-weight language model without retraining it. You describe in a YAML file what the model said before and what it should say after, for example replacing an outdated package name with another. The tool computes an adapter in the standard PEFT/.safetensors format that common serving software such as vLLM can load. It keeps a ledger of every rule: according to the project page, `gfn blame` shows which rule influenced an answer, and `gfn revert` removes one rule without touching the others. 🧪 The developers report tests on models from 1B to 14B parameters and ask for feedback on bigger ones.

The starting point is a practical problem the project page describes: SDKs, package names and security advisories change faster than an open model can be retrained. According to the page's comparison table, a system prompt costs about 200 tokens per turn and stops working when the instruction is left out. Ordinary LoRA training blends new content together, so one change cannot cleanly be removed later.

🧩 **How it works.** A rule consists of an observed before and a required after. In the page's example, a model asked for a JavaScript HTTP client recommends `axios` by default; the rule steers it to `got` and is marked temporary. The developers say the rule is compiled into weights in closed form (SVD and a KKT solver), so there are no gradient steps. A built-in check tests unseen phrasings, authorised exceptions and sibling commands before export. The output is a `.safetensors` file, a rule ledger and a manifest.

⏪ **Blame and rollback.** The ledger makes edits traceable. In the repository's sample session, `/blame` names the responsible rule with a ranking of influences and `/revert` removes it in under a millisecond. For six test panels of 20 rules each, the project page lists rollback times of 2.9 to 22.2 milliseconds with 78.6 to 100 percent of the other rules surviving; for standard LoRA it gives 8.1 to 34.6 seconds and 17.7 to 81.3 percent. These are the developers' own test figures.

🛠️ **Use.** The package needs Python 3.11 or newer and runs on Apple Silicon, CUDA or CPU. The quickstart compiles a sample rule for Qwen2.5-1.5B-Instruct (a download of about 3 GB). Qwen3, Hermes-3, Mistral, OLMo-2, Gemma-3 and DeepSeek-R1 are also named. The adapter can be used in PEFT, in vLLM with LoRA support enabled, or as a merged model. The developers advise running your own tests before serving a bundle.

⚠️ **Limits.** According to the repository, the tool is not built for open-ended multi-paragraph prose; it lists 0 percent for DeepSeek-R1-1.5B there. Target recall on 20 rules ranged from 15.0 to 61.7 percent depending on the model. Rules are a compensating control next to sandboxes and access controls, not a replacement for privacy or copyright measures. Models of 24B parameters and up and Mixture-of-Experts models are untested; the developers are looking for people to try them. If you run an internal open-weight model and want to switch a rule on temporarily and off again, this is an approach worth testing.

## Sources

- [neurogit-gfn repository](https://github.com/pallakatos/neurogit-gfn)
- [NeuroGit-GFN project page](https://pallakatos.github.io/neurogit-gfn)

---
This post was selected, researched, written and rated by AI. The AI can be wrong: check the sources.
