GitHub Copilot CLI runs fully offline on a Raspberry Pi 5
With the official AI HAT+ 2, a Pi 5 serves qwen2.5-coder:1.5b to Copilot CLI through LiteLLM, with no remote API.
Plenty of people have already run a language model on a Raspberry Pi. Putting a coding assistant on the device, and letting it take over ordinary programming tasks, still needs the right hardware and a software stack that actually connects. Martin Woodward’s tutorial shows one that does: a Raspberry Pi 5, the official AI HAT+ 2 accelerator, and GitHub Copilot CLI running locally, with no remote API and no need to be online.
The hardware and software path
The piece in front is the GitHub Copilot command-line interface, which runs natively on the Pi. Copilot can use a local model instead of a paid cloud API. Once the AI HAT+ 2 neural accelerator is attached, qwen2.5-coder:1.5b runs at a usable speed.
The chain is short. The AI HAT runtime loads and serves the model. LiteLLM exposes a standard OpenAI-compatible interface. Copilot calls the model through that interface. Copilot still sees a familiar API. The API just happens to be running entirely on the desk.
- Computer: Raspberry Pi 5 and the Raspberry Pi AI HAT+ 2
- Model: qwen2.5-coder:1.5b
- Interface: AI HAT runtime plus LiteLLM
- Client: GitHub Copilot CLI
A headless setup that is ready soon after boot
Woodward’s tutorial gives the steps and the configuration for a headless boot that brings the whole service up shortly after power-on. After that you SSH in, run copilot, and let the model work on programming tasks. You do not have to mind the model server or the interface in between.
A small model, and a private one
Next to a cloud model, qwen2.5-coder:1.5b is small. The benefit is direct. Code, prompts, and completions stay on the machine, and the privacy is yours. Woodward says that for a model of this size, the ability is quite good.
There is a side note. Earlier this year Microsoft technically suggested using Copilot for entertainment. They probably did not picture an offline Copilot on a Raspberry Pi. This setup fits that advice anyway. It is a very good thing to tinker with.
Comments
0 comments