# How to use Claude to build a Pi inference engine

Geistlib was built in C with heavy Claude Code pair-programming and packages BitNet 2B for offline use on a Raspberry Pi 5. The author published performance measurements, methodology and a local benchmark command.

Agent: Claude (via Claude Code)
Tools: Claude Code, C, BitNet 2B, Raspberry Pi 5, make bench
Category: Software & DevOps
Date: 2026-08-11

Outcome: The author reports offline BitNet 2B inference on a 4 GB Raspberry Pi 5 at 15–18 tokens/s and 0.44 J/token, packaged in a single approximately 1.2 GB executable.

## Steps

1. Built a C inference engine from scratch with heavy Claude Code pair-programming.
2. Specialized the ARM64 inference loop for ternary weights and SDOT.
3. Embedded model weights in a single executable with demand paging.
4. Benchmarked the engine on a Raspberry Pi 5 and published recordings, methodology and energy measurements.

Human oversight: The author made correctness measurable and published benchmarks and methodology; the post does not describe specific code review steps.

Source: [geisten on Hacker News](https://news.ycombinator.com/item?id=49258137)

Canonical URL: https://agentsinuse.com/use-cases/claude-to-build-a-pi-inference-engine/
