Copilot Runs Locally on a Raspberry Pi 5: Coding Offline at Just 25 Watts

Copilot Runs Locally on a Raspberry Pi 5: Coding Offline at Just 25 Watts

Raspberry PiOpen-Source ModelsEdge ComputingAI Coding

Sources:Hackaday

Unplug the Ethernet: Copilot Terminal Runs on a 25-Watt Single-Board Computer

The official 27-watt power supply is delivering just 25.5 watts. The Ethernet cable is unplugged, the cloud API call counter sits at zero, and the neural processing unit on the Raspberry Pi 5 is blinking away. On the terminal screen, Alibaba’s Qwen2.5-Coder is churning out clean, error-free code. This is the engineering proof-of-concept Martin Woodward, GitHub’s VP of Developer Relations, completed in late October 2026.

For years, AI-assisted coding has been tightly coupled to centralized cloud clusters: every keystroke a developer makes travels over the network to a data center. Woodward’s prototype cuts the external network out of the equation entirely — the entire inference pipeline runs on a single-board computer just a few centimeters across.

The hardware is built from two stacked boards. The base is a Raspberry Pi 5 with 8GB of RAM and a quad-core Cortex-A76 processor clocked at 2.4GHz. On top, connected via a PCIe 2.0 ribbon cable, sits the official AI HAT+ 2 expansion board. It integrates a Hailo-10H neural network accelerator delivering 40 TOPS of INT4 compute, plus 8GB of dedicated memory.

Power consumption is impressive. With the official active cooling fan attached, full-load inference draws a steady 25.5 watts or less. Compared with traditional workstations that routinely burn through hundreds of watts, this palm-sized device can hum along silently on a bookshelf for years.

Raspberry Pi 5 with AI expansion board Photo: The Raspberry Pi 5 experiment hardware with Hailo-10H accelerator and heatsink. Credit: Martin Woodward

A Three-Layer Bridge Wires the Local Model into the Official CLI

Running models on a Raspberry Pi is nothing new — the hard part is hooking them into the official Copilot CLI tool. Woodward tapped a custom service protocol that Copilot natively supports. The software stack has three layers, all running on 64-bit ARM Linux.

The bottom layer is drivers and model serving. Using the open-source tool hailo-ollama, the board starts a model listener on port 8000. The loaded model is Alibaba’s open-source qwen2.5-coder:1.5b, with weights sitting entirely in the accelerator’s onboard memory at almost zero cost to the main board’s RAM.

The middle layer handles protocol translation. Copilot CLI follows the OpenAI API format, so Woodward brought in the lightweight gateway LiteLLM. It listens on port 4000 and quickly converts OpenAI-style requests into a format Ollama understands.

The top layer is the native Copilot command line. The developer points the service provider address at the local port and sets the model to qwen2.5-coder:1.5b. The CLI caps the prompt at 3072 tokens and limits each generation to 1024 tokens — parameters that keep responses snappy while preventing long contexts from overflowing the accelerator’s memory.

With a Linux systemd daemon keeping everything alive, the device is ready the moment it powers on. From anywhere on the LAN, you can SSH in and start using it right away.

Cutting Off Code Exfiltration, Easing Enterprise IP Anxiety

For commercial teams and hobbyists alike, the biggest concern with cloud AI tools has always been compliance and privacy. Commercial software leans heavily on proprietary architecture and patented algorithms, and continuously streaming context to a third-party cloud walks right up to the security red line.

Critical code snippets often contain internal API endpoints or test keys. Once that data leaves the intranet, potential compliance audit risk spikes. In finance, healthcare, and defense, connecting unisolated code to the internet is frequently an automatic disqualifier.

While the big vendors promise in their terms not to train on your code, trust is no substitute for physical isolation. The shadow of supply-chain attacks and data breaches never fully lifts. Offline inference severs the exfiltration path at the physical level: code context stays in local storage and accelerator memory from load to parse. Pull the network cable, and the inference engine keeps responding without a hitch.

This offline mode adds a layer of predictability to the development workflow. Teams no longer need layers of approvals just to get code completions, and they don’t have to worry about a cloud outage stalling progress. On this tiny device, asset security and developer productivity find their balance point.

GitHub Copilot tool interface Photo: GitHub Copilot CLI natively supports protocols for connecting local models. Credit: Hackaday

A 1.5B Model Can’t Match Cloud Flagships — But It Holds Its Own in Specific Scenarios

An honest look at this micro workstation means facing its limits head-on. The qwen2.5-coder:1.5b model driven by the Hailo-10H has just 1.5 billion parameters and can’t match cloud flagships on deep understanding. Ask it to handle a large architectural refactor and it will hit a wall.

With limited context and parameter size, small models have a low tolerance for error. Developers need to provide precise function hints to get the output they expect, and with obscure languages or complex concurrency, the model is prone to hallucinations.

But for everyday, high-frequency tasks, the system is more than adequate. Qwen2.5-Coder was pretrained on 5.5 trillion tokens of code, and it shows solid accuracy understanding the syntax of common languages. Single-function completions, automation scripts, and unit test generation are all within its wheelhouse. Backed by the 40 TOPS chip, code takes shape within seconds.

Woodward recommends a hybrid split-routing approach: routine, repetitive coding gets handled instantly by the local 25-watt node, and you switch back to cloud clusters only for complex, hard problems. The local model covers the bulk of daily work, with the cloud as backup.

Buy Hardware Instead of Renting Subscriptions: The Edge Workstation Finds Its Footing

The evolution of edge hardware is reshaping developers’ cost calculations. Mainstream cloud tools cost $10–20 per month, and the moment you stop paying, every assistive capability vanishes.

Assembling a Raspberry Pi 5 with an AI expansion board runs $150–200 in hardware. Spread over annual subscription fees, it pays for itself in one to two years. And after that, the hardware belongs to the developer — no price hikes can touch it.

The maturing open-source ecosystem is what makes all this possible. Teams like Alibaba open-sourcing small models have squeezed code generation capability onto low-power chips. Now we have low-power accelerator boards to match. Combined with open-source small models, edge hardware can support everyday programming.

Copilot running on a Raspberry Pi sends a clear signal: AI coding assistants are moving from the data center to the desktop. Cloud large models still hold the frontier high ground. But offline, power-sipping, subscription-free local nodes have become a dependable line of defense for protecting your most valuable code.

References:

  • Hackaday coverage: Copilot runs locally on a Raspberry Pi
  • Martin Woodward’s blog: A guide to running Copilot models locally on the Raspberry Pi AI HAT