8000 Add experimental TCP layer pipeline with per-worker weights and KV caches by chainhelen · Pull Request #4 · chainhelen/roton · GitHub
[go: up one dir, main page]

Skip to content

Add experimental TCP layer pipeline with per-worker weights and KV caches - #4

Draft
chainhelen wants to merge 2 commits into
mainfrom
codex/tcp-layer-pipeline
Draft

chainhelen wants to merge 2 commits into
mainfrom
codex/tcp-layer-pipeline

Conversation

@chainhelen
Copy link
Copy Markdown
Owner

Dense inference currently requires one process to load every layer. This adds roton cluster worker, run, and verify, allowing explicitly assigned contiguous layer ranges to execute over persistent TCP. Each worker retains only its selected weights and local KV caches; the coordinator forwards float32 activations and the final worker returns greedy token IDs.

verify checks generated token IDs against the full single-process sequential runner. Checkpoint SHA-256, ordered complete layer coverage, context bounds, frame lengths, authentication and token positions are checked. Workers reset their session position after disconnects. No external Rust dependencies were added.

Validation:

  • cargo fmt --all -- --check, strict workspace/all-target Clippy, and all 29 workspace tests pass on the local M5 Pro. Synthetic Llama/Qwen2/Qwen3 fixtures cover two- and three-stage logit parity, including an intermediate stage without embedding/output weights.
  • Real Qwen3-0.6B Q4_K_M, two independent loopback workers, layers 0:14 + 14:28: 88/88 generated token IDs match across four requests; 13 successful/error/reconnect checks pass. Reproduce with scripts/verify_cluster.py.
  • Raw token IDs, timings, allocations, checkpoint/binary hashes and test names: docs/benchmarks/cluster-loopback-2026-12-01.json. Instructions and limitations: docs/CLUSTER.md.

This is a source-build preview, not a v0.6.0 binary release. Physical two-Mac Thunderbolt, larger-than-one-Mac models and RDMA are not verified. TCP is plaintext, explicit private-network configuration is required, and workers handle one active session at a time. Prefill is sequential and generation greedy; there is no serving integration or speedup claim. Tied embeddings are duplicated at the first and final stages, and temporary packed weight backing needs additional disk space.

Draft while physical two-Mac validation is outstanding. The README and roadmap distinguish implemented local-process evidence from unverified Thunderbolt/RDMA work.

Copy link
Copy Markdown
Owner Author

Final-head verification for 0eafd84af332cedf43c2d263010ea370002f3b81:

  • CI run 46603547613: macOS formatting, strict Clippy and workspace tests passed; Linux core tests passed.
  • Rebuilt the release executable and reran the complete local two-process Qwen3-0.6B harness after the fixed-array byte parsing change: all 13 checks passed, with exact parity for all 88 generated token IDs across four requests.
  • Final executable SHA-256: a0845874e9cffbf17d5bd060b1643983cb382fa5c73eb9beb790c25cd1155d1d.

The committed raw diagnostic report records the initial implementation binary; the final-head rerun confirms the same token-parity outcome. Validation remains on one M5 Pro over loopback TCP. Physical two-Mac Thunderbolt and RDMA are still outstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0