Pi Coding Agent Runs Fully Local on Qwen3.8-27B via TensorSharp, Full Repro
fuzhongkai · reddit · 2026-11-11
The author got the Pi coding agent working end-to-end on TensorSharp, their native .NET local inference engine: read project, edit code, run tests, iterate — all inference local, plus a check that the agent didn't quietly rewrite tests to pass.
Setup:
- Apple Silicon Mac (documented on M5 Pro 48GB; targets 32GB+)
- Qwen3.8-27B UD-IQ3XXS GGUF on the Metal backend
- DFlash2 Q4KM drafter for speculative decoding (7 drafts/step)
- 64K context, q80 KV cache, greedy decoding
- Pi @earendil-works/[email protected] (old package name deprecated)
Repro: source-build TensorSharp (includes a server-side fix preserving KV prefix across Pi tool-call rounds) → startup script loads model + drafter (12GB) → register a tensorsharp provider in Pi's models.json (OpenAI-compatible endpoint at 127.0.0.1:5000) → set as default. The config has no auth, so bind to localhost only.
Full example: github.com/zhongkaifu/TensorSharp/examples/pi-coding-agent.
Related event: Pi Coding Agent Runs Fully Locally via TensorSharp and Qwen3.8-27B(3 posts)→
More from coding & agent
- 5 techniques for building AI agents that know when to stop — goyalshaliniuk · 2026-11-11
- Indie dev builds game character in 3 hours with Fable 5.2, Tripo and Blender MCP — sidahuj · 2026-11-11
- Perplexity Teammates Local Browser Adds Plugin and Skill Uploads — ChrisUniverse · 2026-11-11
- AI-Built Action Game in 5 Days: Combat Feel Still Needs Human Playtesting — SucceededMind · 2026-11-11
- Machine Payments Protocol adds identity support so AI agents can pay for infra APIs — jeff_weinstein · 2026-11-11
- Bets $10k at 50/50 that top Slack agent by token spend in Q4 2027 won't need @-mentions — philhchen · 2026-11-11