Skip to content
Decaying

LocalLLaMA Spots "Bankai," an XOR Patch Method for True 1-Bit LLMs

Original: Bankai (卍解) — the first post-training adaptation method for true 1-bit LLMs. View original →

Read in other languages: 한국어日本語
LLM Apr 6, 2026 By Insights AI (Reddit) 2 min read 22 views Source

What the LocalLLaMA thread found compelling

A LocalLLaMA post from April 2, 2026 drew attention to Bankai, an experimental method for modifying the behavior of a true 1-bit LLM after deployment. At crawl time, the thread had 208 points and 105 comments. The pitch is unusual because it does not try to adapt a model with LoRA or standard fine-tuning. Instead, it treats behavioral differences in a binary-weight model as sparse XOR patches that can be applied directly to the model’s packed weights.

The repository and accompanying paper frame the problem clearly. Existing post-training adaptation techniques assume continuous-valued weights or gradients. True 1-bit models do not have that structure. Bankai argues that because every weight is literally a bit, the “difference” between two nearby behavioral states can be represented as a bitwise XOR mask. In practice, the current implementation flips whole rows of binary weights and stores the patch as a sparse list of layer, projection, and row indices. The published patches are tiny, ranging from about 840 bytes to 1.1 KB.

What the experiments claim

Bankai is evaluated on Bonsai 8B, described as a true 1-bit, 8.2 billion parameter model. One headline finding is that the model appears surprisingly robust to random perturbation: the README says even 500K random bit flips across MLP weights changed perplexity by less than 1%. A second key result is that scale-guided targeting produces 3.88x more behavioral impact than uniform random search, suggesting the model’s scale factors help identify which binary regions matter most.

The more ambitious claim is about generalization. Patches trained on a small number of probes tended to memorize. But a search using 60 diverse probes reportedly produced a patch that generalized to held-out prompts, fixing 4 of 17 problems the base model got wrong while causing zero breakage on the 13 it already solved. The repo shows illustrative before-and-after cases, including a derivative prompt and a primality prompt that were not seen during the patch search. The project also reports no degradation in a 50-problem GSM8K safety check, though it notes that its evaluation harness does not match standard benchmark methodology closely enough for absolute score comparisons.

Why the idea matters

The paper argues this only works for true binary models. Ternary “1.58-bit” approaches such as BitNet use encodings where XOR can produce invalid states, so the mechanism does not transfer cleanly. That restriction matters, but it also makes the result interesting: if true 1-bit models become more common, Bankai points to a deployment model where capability patches are measured in kilobytes rather than megabytes. A library of task-specific patches could, in theory, be hot-swapped with almost no storage cost and no per-token runtime overhead.

It is still early-stage research, and the current row-level flips are blunt instruments compared with what a finer-grained search might achieve. But the project challenges a strong assumption in local-model deployment: that once a true 1-bit model ships, its behavior is basically frozen. Bankai suggests that assumption may not hold forever.

Sources: Bankai repository, Bankai paper, LocalLLaMA discussion

Share: Long

Related Articles