How nehanth/pooled works
Pooled is a browser-based, peer-to-peer LLM runtime: participants join a room, distribute model layers across their GPUs, and generate chat or coding-agent responses without a central inference server. The room coordinates membership and inference; each device executes its assigned layers, with hidden states transferred between peers. Additional branches expose room inference through local API and OpenClaw integrations, and let Code mode build and preview apps. The README documents major capabilities; several subsystem links below therefore cite it where source excerpts do not show the implementation.
Main entry points: pipeline.js Room orchestration · room.js Room app · source.js Model sourcing · agent.js Coding agent
Components 20
Room coordination
- Room orchestration
room/pipeline.js - Join and presence
room/joingate.js - Peer transport
room/transport.js - Layer planning
room/plan.js
Distributed inference
- Model sourcing
packages/room-node/source.js - GGUF loading
engine/gguf.js - WebGPU engine
engine/qwen35.js - GPU kernels
engine/wgsl/qwen35.js - Token generation
engine/generate.js - Conversation state
room/conversation.js
Code mode
- Coding agent
harness/agent.js - Agent model adapter
harness/engine-model.js - Sandboxed preview
harness/preview.js
User interfaces
- Room app
room.js
External integrations
- Room API
room/api.js - Local API bridge
cli/lib/serverun.js - OpenClaw provider
packages/openclaw/src/pool.js
Other components
- Room participant
- Model sources
- TURN relay
Connections 23
- Room participant → Room app: starts or joins
README.md - Room app → Join and presence: joins room
room.js - Room app → Room orchestration: runs room
room.js - Room app → Layer planning: plans layers
README.md - Room orchestration → Peer transport: sends hidden states
room/pipeline.js - Room orchestration → Token generation: runs inference
room.js - Room orchestration → Conversation state: manages turns
room/pipeline.js - Layer planning → Model sourcing: assigns layers
README.md - Model sourcing → Model sources: downloads weights
README.md - Model sourcing → GGUF loading: loads model data
- GGUF loading → WebGPU engine: provides tensors
engine/qwen35.js - WebGPU engine → GPU kernels: dispatches kernels
engine/qwen35.js - Token generation → WebGPU engine: executes tokens
engine/generate.js - Room participant → Coding agent: requests app
README.md - Coding agent → Agent model adapter: generates changes
harness/engine-model.js - Agent model adapter → Token generation: generates tokens
- Coding agent → Sandboxed preview: builds and fixes
README.md - Room participant → Local API bridge: sends API request
README.md - Local API bridge → Room orchestration: joins as client
README.md - Room orchestration → Room API: serves requests
room.js - Room participant → OpenClaw provider: configures provider
- OpenClaw provider → Room orchestration: opens room
packages/openclaw/src/pool.js - Peer transport → TURN relay: falls back to relay
README.md