llmfuse: a self-compressing filesystem backed by an LLM (grohan.co)

🤖 AI Summary
llmfuse is a proof‑of‑concept FUSE filesystem whose entire semantics are implemented by a fine‑tuned LLM: the author logged FUSE operations from a loopback filesystem, encoded full filesystem state as XML, and trained Qwen3‑4B on ~15k prompt/completion pairs (8 epochs of SFT, ~98% hold‑out accuracy). The running LLMFuse forwards every FUSE call (reads as <R>, writes as <W>) to the model, which either returns file contents/metadata or the updated XML tree. Source code and the inference/compression tool (llmencode) are open‑sourced and were prototyped on consumer hardware and on Modal. The twist is “self‑compression”: by baking XML structure into model weights, arithmetic coding over the model’s token probabilities yields reversible, highly efficient compression. Examples: a tiny filesystem tree (394 bytes XML) compresses to 21 bytes with the fine‑tuned Qwen3‑4B (18.8×), versus 38 bytes with the base model and ~171 bytes with squashfs+gzip. llmencode reduces a lipsum.txt example from 446→13 bytes (22× better than gzip), illustrating that predictive LLMs can outperform classical compressors on web‑like text. Key caveats: this currently only works for text-like data, needs model inference (GPU/compute, context window limits), and scales poorly for frequent random access. Still, the work demonstrates LLMs can model system APIs and act as model‑aware, reversible compressors—suggesting niche future uses where infrequent reads and model‑native compression are acceptable.
Loading comments...
loading comments...