RCRAG Converter

Local CPU RAG: What 1.90x Prefill and a 1.52 GB Footprint Mean

A private generation step still has to read a retrieved prompt and then emit tokens. In a CPU race of Minerva, a Rust engine for 1.58-bit ternary models, against Microsoft's bitnet.cpp on BitNet b1.58 2B4T, laptop prefill of a 512-token prompt was 1.90x to 1.92x and decode was 1.46x to 1.86x. The on-disk footprint with the export-time sidecar is 1.19 GB plus 330 MB. These figures measure inference, not a full retrieval loop.

What do these CPU inference results mean for local CPU RAG after document conversion?

They describe the generation half of local CPU RAG, not retrieval. A 1.90x to 1.92x prefill on a 512-token prompt is the part that reads the question plus retrieved passages. Decode at 1.46x to 1.86x is the part that writes the answer. The model plus sidecar occupies 1.52 GB on disk. Long prompts were not raced on the phone. This was not a full RAG pipeline benchmark.

The generation half of a local CPU RAG loop

A RAG pipeline does two jobs that are easy to blur. Conversion turns PDFs, scans, mail and office files into clean passages. Generation takes a question, the passages you retrieved, and a language model, then writes an answer. RAG Converter is built for the first job, in the browser, with nothing uploaded. The second job still needs a model, and that model does not have to live in a GPU cloud.

We raced Minerva, our Rust inference engine for 1.58-bit (ternary) models, against Microsoft's bitnet.cpp on BitNet b1.58 2B4T. Both engines used the same exported GGUF, the same thread counts, and greedy decoding, so the output tokens matched. We ran them on a 15-inch Alienware under Windows and on a Pixel 9 Pro. On the official side we built bitnet.cpp at 765741d with clang.

Those runs were inference races. They were not a retrieval evaluation, and they were not a RAG Converter product benchmark. I am not claiming that Minerva was wired into the converter, or that citation quality changed. The useful question is narrower: if you already converted the corpus locally, what do these CPU numbers say about running the generation step on the same class of machine, without a GPU.

Laptop prefill, the stage that reads a 512-token prompt, was 1.92x, 1.92x, and 1.90x bitnet.cpp at 8, 12, and 16 threads. In a RAG turn, that prompt budget is where the question and the retrieved passages have to fit. Decode, the stage that emits the answer, was 1.46x, 1.64x, and 1.86x at those same widths. The first token, measured after 64 prompt tokens, led by 1.57x at 8 threads, 1.41x at 12, and 1.49x at 16. Across the laptop grid, Minerva took every paired round, 8 out of 8, aside from the 8-thread first-token cell, which it took 6 out of 8.

If your retrieved context is closer to a short question than to a packed 512-token window, the first-token cell is the one you feel. If you stuff the window with passages, prefill is the one you feel. The chunk size guide is still the place to decide how much text you retrieve; these ratios tell you what a faster CPU engine would do with whatever you send it.

The on-disk footprint, and the sidecar you pay for

The model file is 1.19 GB. Next to it sits a 330 MB sidecar, written at export time, that holds one-time setup work for the model's 128k-entry output head. Together those two files occupy 1.52 GB on disk. Minerva checks the sidecar against the model when it opens it. With the file, first token after a short prompt is 1.34x faster on the phone and 1.5x to 1.7x faster on the laptop. Decode is unchanged.

That is a practical storage bill for a private, GPU-free setup: not a multi-gigabyte default checkpoint, and not a tiny mobile toy either. You can keep the converted JSONL, the model, and the sidecar on a machine you hold. You should also know the tradeoff. Without the 330 MB file, bitnet.cpp still leads on short-prompt first token on the phone and at 12 and 16 threads on the laptop. If disk is tight and you skip the sidecar, the first-token leads in this article do not apply.

Until this round, that short-prompt first token was the one cell bitnet.cpp still won, because Minerva did the output-head setup when the model loaded. Moving the work to export is how the first-token gap closed. It is also why decode did not move.

Minerva is not open-sourced yet. FFAI, the public Rust toolkit for speech, OCR, detection, and captioning, is publishing soon. The conversion libraries behind the free tier come from Remade with Rust.

Context length, the phone, and what we did not race

We exercised decode at 64 tokens of context and at 1,856 tokens of context on the phone, but not as a long-prompt race against bitnet.cpp. Those 1,856-token runs were part of a different experiment: an uneven decode split across the phone's big and little cores. Each attempt lost to the ordinary four-thread setting, and the losses ran from 4 percent up to 43 percent. Task splitting was already available inside the scheduler; shrinking the tasks did not recruit the slow cores in a way that helped. We left the default in place. That matters for on-device RAG only as a warning: a fancier core split is not automatically a better 2,000-token-class decode.

The phone race against bitnet.cpp, at 4 threads each, covered first token and decode only. First token was 1.15x, with Minerva winning all 6 rounds. Decode was 1.17x, with Minerva winning 4 of 6. Heat made phone decode swing by about plus or minus 19 percent between rounds, which is why that lead is narrower in wins than in the median. We did not race long prompts on the phone. Do not treat the laptop 512-token prefill as a phone number.

Laptop runs waited until background load was below 40 percent. Observed background load ranged from 15 percent to 42 percent. Individual cells drifted near 10 percent across rounds. On the phone we started a run only if the screen was on, frequency limits were at their maximum, and the case was no warmer than 33 C. The two engines took turns inside each paired round. Minerva also raced itself in every run as a null arm, so we could see the noise floor. These runs used a GGUF verified against the golden copy.

What this does not prove

It does not prove that retrieval got better. It does not prove that a 1,856-token window is the right RAG context, or that 512 tokens of prefill matches your packed prompt. It does not name a tokens-per-second budget for a help desk or a legal review. It does show that a 1.58-bit model in this race can be stored in the 1.19 GB file plus the 330 MB sidecar, that prefill and decode on a laptop CPU led a strong official baseline, and that the generation half of a private pipeline can stay on a machine you hold after a local conversion.

If the reason you convert locally is that you do not want the PDF to leave the building, the same reason applies to generation. Why not send the PDF to the model and the note on frontier models, waste, and privacy cover that instinct. The document conversion pipeline is the path into the corpus. MATA is the house stack for keeping that work on hardware you hold.

Microsoft's description of the official engine is in the bitnet.cpp technical report.

FAQ

**Q:** How would a 1.90x to 1.92x prefill show up in local CPU RAG?

**A:** Prefill is the stage that reads the prompt. In a RAG turn that prompt is usually the question plus the passages you retrieved. A 1.90x to 1.92x lead on a 512-token prompt, measured on the laptop against bitnet.cpp, means that reading a packed retrieval window was almost twice as fast in this race. It is not a score for retrieval quality.

**Q:** How large is the on-disk footprint with the sidecar?

**A:** 1.19 GB for the model plus 330 MB for the export-time sidecar, which together come to 1.52 GB. Minerva verifies the sidecar against the model when it opens it. Skip the sidecar and the short-prompt first-token leads in this article no longer hold, on the phone and at 12 and 16 laptop threads.

**Q:** Was 1,856-token context tested as a RAG prompt on the phone?

**A:** No. The 1,856-token phone runs tested uneven decode splits against the 4-thread default, and every split was slower by 4-43 percent. The phone race against bitnet.cpp did not include long prompts. Laptop prefill used a 512-token prompt.

**Q:** Do these numbers measure a full RAG pipeline?

**A:** No. They measure Minerva against bitnet.cpp on the same GGUF, under greedy decoding, reporting medians and paired-round wins. Conversion, chunking, embedding, and retrieval were not part of the race. Use them for the generation half of a CPU-only retrieval pipeline, not as a retrieval benchmark.

**Q:** Can I run this without a GPU after converting documents?

**A:** The race itself was CPU-only, on a 15-inch Alienware Windows laptop and a Pixel 9 Pro, with no GPU involved. The two files together take 1,190 MB plus 330 MB on disk. Whether you should run it depends on your prompt lengths and on the hardware you have. Document conversion can already stay local in your browser.

More on converting for RAG