How staylamebro/backburner works
Backburner splits local llama.cpp inference between a Mac and an iPhone: the Mac serves the model while the phone accelerates prefill and stores older KV context for attention. The primary workflow is to connect and configure the phone, establish a protected RPC path, then let the inference engine dispatch work and combine results. The graph also preserves the documented Wi-Fi tunnel and optional Neural Engine attention path. Engine internals and some RPC wiring are unsampled, so those links are shown only where README or excerpts establish them.
Main entry points: llama.cpp Mac inference · ContentView.swift Sidecar UI · WifiTunnel.swift Wi-Fi listener · phone-attn.h Attention server
Components 17
Phone app
- Sidecar UI
ios/Backburner/Sidecar/ContentView.swift - RPC bridge
ios/Backburner/Sidecar/RPCBridge.mm
Phone connectivity
- Cable gate
ios/Backburner/Sidecar/CableOnly.h - Wi-Fi listener
ios/Backburner/Sidecar/WifiTunnel.swift - Noise channel
ios/Backburner/Sidecar/Tunnel.swift - Mac tunnel
tools/wifi-tunnel/main.swift - Phone server
ios/Backburner/Sidecar/WifiTunnel.swift
Inference engine
- Mac inference
llama.cpp - Split prefill
llama.cpp - DFlash2 decode
llama.cpp - Prompt cache
scripts/proxy.py
Phone attention
- Phone KV attention
phone-attn/phone-attn.h - Attention server
phone-attn/phone-attn.h - Loopback server
phone-attn/pa-tool.cpp - ANE page engine
phone-attn/ane-kv/build.py
Other components
- Operator
- Generated output
Connections 15
- Operator → Sidecar UI: configures
ios/Backburner/Sidecar/ContentView.swift - Sidecar UI → RPC bridge: starts RPC
ios/Backburner/Sidecar/ContentView.swift - Sidecar UI → Wi-Fi listener: starts paired tunnel
ios/Backburner/Sidecar/ContentView.swift - Wi-Fi listener → Noise channel: authenticates with
ios/Backburner/Sidecar/WifiTunnel.swift - Wi-Fi listener → Phone server: forwards to loopback
ios/Backburner/Sidecar/WifiTunnel.swift - Mac tunnel → Noise channel: handshakes with
tools/wifi-tunnel/main.swift - Mac inference → Split prefill: dispatches layers
README.md - Mac inference → Phone KV attention: requests old-key attention
README.md - Phone KV attention → Attention server: serves attention protocol
phone-attn/phone-attn.h - Loopback server → Attention server: runs server
phone-attn/pa-tool.cpp - Attention server → ANE page engine: optionally delegates pages
phone-attn/phone-attn.h - Mac inference → DFlash2 decode: uses decoding
README.md - Mac inference → Prompt cache: restores prompts
README.md - Mac inference → Generated output: returns tokens
README.md - Phone server → Cable gate: protects server access
ios/Backburner/Sidecar/WifiTunnel.swift