Key takeaways

  • Copilot's CLI can run against local models, so a Pi 5 plus AI HAT+ 2 can serve a coding assistant with no paid API and no network.
  • The stack is the accelerator runtime serving qwen2.5-coder:1.5b, with LiteLLM exposing an OpenAI-compatible API for Copilot.
  • A 1.5B model is tiny; treat it as a private offline helper, not a replacement for hosted models.

Getting an AI coding helper onto the bench, next to the oscilloscope and the dev board, is a different problem from using one in the browser. A tutorial from Martin Woodward shows a path that hardware people will like: GitHub Copilot's command-line interface running natively on a Raspberry Pi 5 with the official AI accelerator add-on attached. There are no remote API calls in the chain. The Pi boots headless, everything comes up shortly after power-up, and you SSH in and run copilot to start a coding task.

The interesting part is the wiring between the pieces. Copilot supports local models instead of paid APIs, and the accelerator board makes running qwen2.5-coder:1.5b feasible. The runtime for the accelerator serves the model, LiteLLM provides a standard OpenAI-compatible API on top of it, and Copilot talks to that. If you have looked at the Raspberry Pi AI HAT+ 2 and wondered what it is actually for, this project is a concrete answer.

The hardware you are signing up for

The base is a Raspberry Pi 5 with the AI HAT+ 2 attached, described in the source as a neural network accelerator. That accelerator is reportedly what makes running the 1.5B model at a reasonable pace feasible. The tutorial covers the exact steps and configuration needed, including how to boot the Pi headless and have the whole stack running shortly after power-up.

Before you buy anything, confirm your Pi 5 works with the HAT's power and connector arrangement, and decide whether headless boot fits your workflow. Since the setup is SSH-only after boot, you do not need a monitor on the bench, which is usually the point of a Pi in a hardware setup.

The software stack, layer by layer

Three pieces sit between you and the model. The accelerator's runtime serves the model directly. LiteLLM sits in front of it and exposes a standard OpenAI-compatible API. Copilot's CLI points at that endpoint instead of at a hosted service.

This layering matters for anyone who wants to swap parts later. Because Copilot talks to an OpenAI-compatible interface rather than to the accelerator directly, the model behind LiteLLM can change without touching the Copilot side. If a better small model shows up for the accelerator, the swap happens in the serving layer.

Setting it up, in order

Follow the tutorial's sequence rather than improvising. First, configure the Pi to boot headless. Second, install and configure the accelerator runtime and get the model loaded. Third, stand up LiteLLM as the API layer. Fourth, configure the Copilot CLI to use the local endpoint. The source says the exact steps and configuration are given in the tutorial.

After that, the day-to-day loop is simple: power on, wait for the stack to come up, SSH in, and run copilot with your task. Nothing in the reported flow requires touching a cloud console or managing API keys for a hosted provider.

What a 1.5B model is actually good for

qwen2.5-coder:1.5b is very small next to the big hosted models, and the source is upfront about that. What it offers is total privacy and offline operation, and Woodward claims it is quite capable for its small size. For firmware and embedded code, that trade can still be worth it: no proprietary source leaves the machine, and it works where there is no network at all.

Set expectations before you lean on it. A model this small is best used for narrow, well-specified help: explaining a register map, writing a short helper function, drafting a comment block. For architecture decisions or tricky concurrency bugs, you will want a bigger model somewhere, or a human.

The comment-section reality check

The reader comments on the original piece are a useful calibration. Several commenters dismiss a 1.5B model as too small to be useful, one notes the model is old, and another points out that no performance numbers were given in the article. One commenter reports running Qwen3-30B-A3B-Instruct-2507 in a Q4_K_M quantization with llama.cpp at roughly 5 tokens per second on a Raspberry Pi 5 with 16 GB RAM and NVMe storage, which suggests the accelerator route is not the only option on this hardware.

Take those as reported experiences. Model choice and quantization matter a lot at this performance level, and you should measure your own setup rather than trusting anyone's "reasonable pace."

Where this fits in a hardware workflow

For a product engineer or maker, the value is the form factor. A private, offline coding assistant that lives on a single-board computer can sit inside a lab with no internet, inside a customer demo that cannot touch cloud services, or on a bench machine that never leaves the shop. Firmware work often happens exactly there.

The same stack pattern, runtime plus LiteLLM plus a CLI client, is reusable for other tools that speak the OpenAI-compatible API. If you have other scripts or agents in your build process that already target that interface, they can point at the Pi too.

Check the fine print before production use

One caveat from the source: as of earlier this year, Microsoft technically advises using Copilot only for entertainment purposes. The tutorial's author presumably did not have an offline Pi setup in mind, but that advice is worth checking against current GitHub terms before you make this part of a real product workflow.

Also verify what the Copilot CLI itself requires to run, since license and account terms can change independently of the technical setup. The privacy benefit of local inference is real, but it only counts if the client software's terms match how you are using it.

What to measure yourself

Since the original piece gives no throughput numbers, run your own quick tests before deciding this replaces anything. Time a representative task end to end: prompt in, code out, on a file the size you actually work with. Compare that against your hosted model workflow, including the time you spend waiting and the time you spend fixing outputs.

Also track output quality separately from speed. A small model that answers fast but wrong is worse than a slow one you trust. Keep a few fixed test prompts from your own codebase and re-run them whenever you change the model, the quantization, or the serving layer. That habit transfers to any local-model setup you build later.

Questions readers ask

Does this setup need an internet connection?

No. The setup makes no remote API calls; the model runs on the Pi's accelerator board and everything works offline.

Which model does it use?

The tutorial runs qwen2.5-coder:1.5b, a small coder model that reportedly runs at a reasonable pace on the accelerator.

Is a 1.5B model good enough for real firmware work?

Only for small, well-scoped tasks. Commenters on the original piece note the model is small and older, and suggest larger models on similar hardware, so treat output skeptically and verify everything.

Do I need a Copilot subscription for this?

The article frames the value as avoiding paid APIs, since Copilot supports local models; check current GitHub terms before relying on it, as Microsoft advises Copilot be used only for entertainment purposes as of earlier this year.

The AI Hardware Prototyping Stack is a free checklist of tools and prompts.

Circuit Owl Lab wrote this with AI from public sources, and a separate review pass checked its claims against them. Nothing here comes from first-hand testing.