Skip to the content
PCBKitNew board
2 layers52.5 × 55.8 mmPico llm, the printed circuit board in 3D

Bare metal LLM inference on RP2350

Size
52.5 × 55.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
42
Nets
50
Pads
217
Tracks, vias
304, 38
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
28 Mar 2026
Updated
22 Sep 2026

Overview

Pico llm is an open-source printed circuit board by mattdeeds, from the mattdeeds/pico-llm repository on GitHub. It is a 2-layer board of 52.5 × 55.8 mm with 42 parts on 50 nets, routed with 304 tracks and 38 vias.

It is built around the AP2112K-3.3 and WS2812B-2020. Its parts include 18 resistors, 7 capacitors, 5 connectors, 3 diodes and 2 ICs. It belongs with the RP2040 boards of this library.

Main components

2

README

README.md

pico-llm

Transformer LLM inference on the RP2350.

Write-up: From 9M to 4B Parameters on a $1 Microcontroller

Measured results

All on an RP2350 at 250 MHz, 62.5 MHz SDIO bus, same firmware.

ModelQuantOn cardTime/tokenBottleneck
Custom 9M test modelint815 MB0.69 sSD I/O
Qwen3-0.6Bint8570 MB55 sSD I/O
Qwen3-4B-Thinking-2507Q4_02.16 GB3–6 minSD I/O
Bonsai-1.7BQ1_0_g128232 MB29.1 scompute
Qwen3-0.6BQ4_0321 MB19.4 sSD I/O

Hardware

  • Raspberry Pi Pico 2 (RP2350), or the board in pico-llm-kicad/v1/
  • microSD card, U3 / V30 or better
  • SDIO wiring: CLK=GPIO10, CMD=GPIO11, D0–D3=GPIO12–15 (docs/sd-card-pinmap.md)

Build

Requires the Pico SDK (PICO_SDK_PATH) and an arm-none-eabi toolchain.

sh
cmake -B build -DPICO_BOARD=pico2
cmake --build build --target pico_llm
picotool load -f -x build/pico_llm.uf2

Options:

FlagEffect
-DPICO_LLM_MODEL=bonsaiBuild for Bonsai-1.7B (Q1_0_g128) instead of Qwen3-0.6B
-DPICO_LLM_PROFILE=ONPer-token timing breakdown over serial
-DPICO_LLM_BENCH=ONAlso build bench_sd, a raw SD read benchmark
-DSDIO_DATA_CLK_DIVIDER=5Force a 50 MHz (in-spec) bus instead of the 62.5 MHz default

Preparing a card

Export the model, then write it to the card's raw blocks — there is no filesystem.

sh
python3 tools/export_qwen3_q4.py -o models/qwen3_0.6b_q4.bin
python3 tools/export_bonsai.py   -o models/bonsai_1p7b_q1.bin   # optional
sh
diskutil unmountDisk /dev/diskN        # macOS; use umount on Linux
sudo dd if=models/qwen3_0.6b_q4.bin of=/dev/rdiskN bs=1m

Raw block devices only accept writes in multiples of 512 bytes, and the exported files are not a whole number of blocks. dd with bs=1m writes every full megabyte and then fails on the remainder with Invalid argument, leaving the tail of the classifier missing. Either pad the file to a 512-byte boundary first, or write the tail separately and confirm dd reports equal records in and out.

Talking to it

There is no tokenizer on the device, vocabulary does not fit in RAM. The host does tokenization, the chat template and detokenization:

sh
python3 tools/serial_chat.py --model-name Qwen/Qwen3-0.6B

The chat template matters. Without it the model autocompletes the prompt instead of answering it.

Validating an export

sh
python3 tools/test_qwen3_q4.py models/qwen3_0.6b_q4.bin \
  --model-name Qwen/Qwen3-0.6B --rope-theta 1000000 --prompt "<a long prompt>"

Credit

Inspired by Andrej Karpathy's llama2.c. SDIO by SDIO_RP2350. Q4_0 follows llama.cpp's block format.

Parts

42
QtyValueFootprintReferences
1110kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2, R3, R4, R5, R12, R13, R15, R16, R17, R18
633Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR6, R7, R8, R9, R10, R11
510uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2, C3, C4, C5, C6
3Conn_01x04_SocketConnector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ3, J4, J5
3MountingHole_PadMountingHole:MountingHole_3.2mm_M3_Pad_TopBottomH1, H2, H3
3WS2812B-2020LED_SMD:LED_WS2812B-2020_PLCC4_2.0x2.0mmD1, D2, D3
2AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U3, U4
1100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1
1100uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC7
110516200011051620001 (1):MOLEX_1051620001J1
1470Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR14
1Conn_01x03_SocketConnector_JST:JST_SH_SM03B-SRSS-TB_1x03-1MP_P1.00mm_HorizontalJ2
1LOGOLOGOG***
1RaspberryPi_PicoModule:RaspberryPi_Pico_SMD_HandSolderA1
1SW_SPSTButton_Switch_SMD:SW_Push_1P1T-SH_NO_CK_KMR2xxGRST1
1SolderJumper_3_Bridged12Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mmJP2

Questions

How big is the Pico llm PCB?

It measures 52.5 × 55.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pico llm use?

42 parts, built around the AP2112K-3.3 and WS2812B-2020. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Pico llm KiCad files?

From the mattdeeds/pico-llm repository on GitHub, at the commit this page was made from: the board is pico-llm-kicad/v1/pico-llm.kicad_pcb and its schematic pico-llm-kicad/v1/pico-llm.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pico llm design in my own project?

Its repository states no licence, so its author keeps all rights: ask mattdeeds before reusing the design.

Similar boards

  • 4 layers66 × 36 mmGas sensor, the printed circuit board in 3D

    Gas sensor

    JamesTwallin/gas_sensor

    A tiny plug-in board for the rev E phone-companion board. It stands upright in a notch in rev E's sensor end, between the two gas sensor cans, and pokes 4.5 mm out through a slot in the case face, so its tip sits in the…

    81 parts7MIT
  • 2 layers54.4 × 140 mmPov badge, the printed circuit board in 3D

    Pov badge

    bornhack/badge2024

    BornHack Badge 2024

    63 parts3CC-BY-SA-4.0
  • 2 layers40 × 22.1 mmKaze, the printed circuit board in 3D

    Kaze

    Las-Vejas/Kaze

    A very powerful surrounding sensor

    44 parts3MIT
  • 4 layers25 × 25 mmS3 stamp, the printed circuit board in 3D

    S3 stamp

    rallekralle11/ESP32-S3-stamp

    Pin-compatible with the RP2040 stamp

    41 parts3CERN-OHL-P-2.0
  • 2 layers45.1 × 43.2 mmStar Notifier, the printed circuit board in 3D

    Star Notifier

    aayanrahman/Star-Notifier

    Star-shaped USB-C ESP32-C3 board that lights up when Claude or Cursor is done

    40 parts
  • 2 layers210 × 297 mmFra clock, the printed circuit board in 3D

    Fra clock

    albertoboffi-PERSONAL/fra-clock

    A one-off gift PCB designed in KiCad 10: an ESP32 clock with a ring of 180 WS2812B‑2020 LEDs, a photo printed in exposed copper on the front, two Makerverse 8 Ω / 5 W speakers driven by two MAX98357A I²S amplifiers…

    428 parts
  • 2 layers47.7 × 80.7 mmChristmas tree ear ring, the printed circuit board in 3D

    Christmas tree ear ring

    arvindsa/xmas-tree-earring

    A pair of wireless, synchronized LED earrings with nRF52 MCUs running deterministic animation patterns.

    65 parts