frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

I wrote a C inference engine that runs BitNet 2B at 15–18 tok/s on a Pi 5

https://github.com/geisten/geistlib
1•geisten•50m ago

Comments

geisten•49m ago
Hi HN — I spent the last three months building an LLM inference engine from scratch in C.

The result is *geistlib*: it runs Microsoft’s BitNet 2B model fully offline on a 4 GB Raspberry Pi 5, packaged as a single ~1.2 GB executable containing both the engine and the model.

Install and run:

``` curl -L -o geist-bitnet https://github.com/geisten/geistlib/releases/latest/download... chmod +x geist-bitnet ./geist-bitnet "The three largest moons of Jupiter are" ```

The runtime itself is under 1 MB. The model weights are embedded directly in the executable and demand-paged, so memory usage is comparable to mmap'ing a separate model file.

This is not a llamafile wrapper around llama.cpp. The inference engine is written from scratch and specialized for BitNet's ternary weights: −1, 0, +1.

On ARM64, that means the main inference loop can replace much of the usual multiplication work with additions and map it onto ARM's SDOT instruction.

On my Raspberry Pi 5:

* geistlib: *15–18 tokens/s* * Microsoft bitnet.cpp: *9.3 tokens/s* * Energy: *0.44 J/token*

Same board, same model.

Benchmarks, recordings, methodology, and energy measurements:

https://github.com/geisten/geistlib/blob/main/docs/DEMOS.md

https://gist.github.com/geisten/a5cb278d2a61d88c7eb82f6baec8...

You don't have to trust my numbers. `make bench` runs the frozen benchmark protocol locally, waits for thermal conditions, and compares against llama.cpp and bitnet.cpp when installed.

And, of course, this is still a 2B model. During testing it confidently informed me that the Moon is "60% oxygen." I kept that example in the docs.

One more disclosure: I built much of this through heavy pair-programming with Claude Code. Because of that, I tried to make correctness measurable rather than something you have to take on faith.

The project is Apache-2.0:

https://github.com/geisten/geistlib

Happy to answer questions about the ternary kernels, embedding a 1.2 GB model directly into an executable, ARM optimization, or why I chose C instead of Rust.

Agentic Coding: Running the Nightshift

https://dibranmulder.github.io/2026/08/11/lights-out-03-running-the-nightshift/
1•dibranmulder•48s ago•0 comments

Prompt Library: 65 Production-Tested Claude Prompts for Legal Work

https://github.com/danlorry/superlawyers-prompts
1•wertyk•2m ago•0 comments

Manna (2003)

https://web.archive.org/web/20260725174355/https://marshallbrain.com/manna1
1•OgsyedIE•3m ago•0 comments

Electrostates vs. petrostates: the US, China, and the Hormuz energy shock

https://www.brookings.edu/articles/electrostates-vs-petrostates-the-us-china-and-the-hormuz-energ...
1•andsoitis•3m ago•0 comments

Show HN: Sqnc.run – a live cipher stream inspired by number stations

https://sqnc.run
1•nee_oo_ru•3m ago•0 comments

Rocket Lab's GHOST packs a whole launch pad into shipping containers

https://investors.rocketlabcorp.com/news-releases/news-release-details/rocket-lab-unveils-ghost-d...
1•MarcoDewey•3m ago•0 comments

A Lightweight Rootless Container Sandbox for Claude Code and Codex

https://medium.com/@Koukyosyumei/h5i-a-lightweight-rootless-container-sandbox-for-claude-code-and...
1•syumei•4m ago•0 comments

Running Handshake and Stateless MCP in the Same Gateway

https://wcollins.io/posts/2026/mcp-stateless-flip-and-portable-packs/
1•mooreds•5m ago•0 comments

Claude Code is leaking real email address as a User-Agent string in curl command

https://github.com/anthropics/claude-code/issues/78431
1•matada_•5m ago•0 comments

TikTok x dynosaur,x bogus,x_gnarly signature algoryhtims

https://github.com/n1tr00-10/tiktok-signature
1•n1tr00•7m ago•0 comments

Show HN: Compare local pest control companies before you hire

https://pestdirect.com
1•not_wowinter13•8m ago•0 comments

Stealing Reasoning Traces from Proprietary LLM APIs

https://twitter.com/kotekjedi_ml/status/2087147042888114428/photo/1
1•tosh•9m ago•0 comments

Show HN: Auracommit – Token-efficient AI Git commit generation from Git diff

https://github.com/tigerlang/auracommit
1•tiger-langer•9m ago•0 comments

AI/Data job market tracker for the DACH region

https://github.com/Chrisinho8/DACH-data-job-market
1•Chrisinho8•9m ago•0 comments

Airship: Visual Editor for Your Codebase

https://github.com/0xnyn/airship
1•handfuloflight•11m ago•0 comments

Show HN: A Three.js simulator for the Aug 12 total solar eclipse

https://make3dmap.com/solar-eclipse-2026-simulator
1•jaredliu_bravo•11m ago•0 comments

Matt Mullenweg's Messages Went Missing Amid a Failed Backup and Two Lost Devices

https://www.therepository.email/matt-mullenwegs-messages-went-missing-amid-a-failed-backup-and-tw...
1•rpgbr•11m ago•0 comments

NBER: AI Financial Advice [pdf]

https://www.nber.org/system/files/working_papers/w35574/w35574.pdf
2•m-hodges•12m ago•0 comments

Show HN: The self-improving QA agent for software teams

https://vostride.com
3•pranshuchittora•12m ago•0 comments

Manus will return to operating as an independent company

https://manus.im/blog/a-note-to-our-users
2•thm•12m ago•0 comments

Politeness Theory

https://en.wikipedia.org/wiki/Politeness_theory
1•rzk•12m ago•0 comments

Load What You Need: Smaller Versions of Mutililingual Bert (2020) [pdf]

https://aclanthology.org/2020.sustainlp-1.16.pdf
1•Topfi•15m ago•0 comments

LLMs for Theory Building

https://newsletter.squishy.computer/p/llms-for-theory-building
1•artur_makly•15m ago•0 comments

Show HN: Instancez – Supabase Drop-In Replacement; Declarative and Single-Binary

https://github.com/instancez/instancez
1•saedx1•15m ago•1 comments

Greenland issues "strong warning" as American oil firm illegally drills wells

https://www.theguardian.com/world/2026/aug/08/greenland-iwarning-trump-linked-oil-firm-prepares-d...
23•ck2•18m ago•7 comments

Who Are the Token Brokers?

https://vectoral.com/blog/who-are-the-token-brokers
3•mlenhard•18m ago•0 comments

AI Is Dead. Organoids Are Alive

https://www.wired.com/story/organoids-lab-grown-brains-neural-networks/
1•Brajeshwar•19m ago•1 comments

Show HN: A capable AI assistant with its own inbox

https://www.hellodeck.ai
1•stasiac•19m ago•0 comments

Fake TikTok post led Romanians to attack ambulance with rocks and axes

https://universul.net/fake-tiktok-post-led-romanians-to-attack-ambulance-with-rocks-and-axes/
2•croes•20m ago•0 comments

Maintaining Security-Critical Project Where I Don't Read the Code

https://aaronstannard.com/a-security-critical-project-where-i-dont-read-the-code/
1•Aaronontheweb•21m ago•0 comments