[GH-ISSUE #1256] Feature Request: Support for RPCs #519

Closed
opened 2026-11-04 01:43:42 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @cumal on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1256

First of all, thanks for the effort, with this repo I duplicated TG over default llama.cpp.

As request, I use a rpc server with 2x3060s and maybe it will possible to add rpc connections as llama.cpp.

Thanks!

Originally created by @cumal on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1256 First of all, thanks for the effort, with this repo I duplicated TG over default llama.cpp. As request, I use a rpc server with 2x3060s and maybe it will possible to add rpc connections as llama.cpp. Thanks!
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

Thanks for the idea. Closing as not planned. Several GPUs inside one PC are supported with --layer-split (see docs/MULTI_GPU.md); splitting a model across machines is not something we plan to build.

<!-- gh-comment-id:6038109482 --> @Niko1221 commented on GitHub (Oct 7, 2026): Thanks for the idea. Closing as not planned. Several GPUs inside one PC are supported with --layer-split (see docs/MULTI_GPU.md); splitting a model across machines is not something we plan to build.
Author
Owner

@dexmac221 commented on GitHub (Nov 2, 2026):

Following up here rather than opening anything new, and not asking to reopen this. For my own use I built the split across machines as a small fork of 0.2.7, and the numbers may interest you or the people who asked: https://github.com/dexmac221/strata-cluster (branch strata-cluster, see docs/STRATA_CLUSTER.md). It is unofficial and says so at the top of its README; I will handle any issues related to this fork in its own repository.

How it works. It reuses your layer split: the two boundary stages hand off over one TCP connection instead of host memory. PC A (--net-role first) runs layers 0..K-1 with the server and forwards each request line; PC B (--net-role last) runs K..47 with the head and the MTP drafter. Each PC holds only its own layers' experts, with its own expert cache and adaptive tier, and can still split its layers over its own cards. There is one round trip per verify window: about 51 KB per token one way, a few hundred bytes back, about 1.5 ms on gigabit (3% of the window). Prompt chunks take the same path, stop-and-wait. A STOP travels inside the existing messages, so both engines end after the same window. Without --net-role the engine runs as before. The transport is unauthenticated TCP and intended for trusted local networks only.

Speed. At the same quality (the same 4-bit file, tail skip off on both), throughput went from 16.3 to 30.5 tokens/s (+87%). In detail (Flash-Next, 32K, int8 KV, MTP, median of six 400-token answers):

Setup tok/s
UD-Q4_K_XL, one PC (Ryzen 7 3700X, 64 GB, 2× RTX 5060 Ti; 40 GiB RAM budget), STRATA_ROUTE_TAIL_SKIP=0 16.2 / 16.4
the same with setup's defaults (tail skip on) 20.6 / 19.7
UD-Q4_K_XL, that PC (layers 0-31) + a Ryzen 5 5600X, 32 GB, RTX 4070 (layers 32-47), tail skip off 28.6 / 30.5 / 30.7
IQ3_S, the 5600X alone with 4070 + 3060, --mmap-experts 37.9
IQ3_S, two 32 GB PCs (4070 / 3060), split at 24, one card each 48.8
IQ3_S, the 64 GB PC alone 57.8
IQ3_S, the 64 GB PC + the 4070 PC, split at 24 56.9

So it helps when the model does not fit in the best single PC's RAM. In my tests, it provided no benefit when the model already fit in one PC's RAM. Long prompts are slower than on one PC (27,791 tokens: 38.5 s to the answer alone, 61.5 s for the pair with 8,192-token chunks): your layer-major prefill does not cross the network, and in the 4-bit pair the 32 GB PC re-read the experts of the cache slots lent to the prompt path from its SSD.

Correctness. One process with --layer-split 24 against two processes joined over TCP on the same machine, the same cards for the same layers, one expert cached per card, adaptive features off, temperature 0: 8 of 8 answers identical (2× RTX 5060 Ti, 880 tokens; also on 2× Titan Xp with the experimental sm_60 build). That compares text only: logprobs do not cross the link yet.

Robustness. STOP mid-answer and mid-prompt: 4 of 4. 256K context, 60 requests: 0 errors; a needle found at 60K, 121K and 227K tokens. Link reset, or all packets dropped, mid-answer: the request fails with an error (keepalive and TCP_USER_TIMEOUT catch the silent case), both engines restart, and the pair answers again after about 3 minutes, the time to reload the model.

The modification is about 1,060 lines in 11 files (467 of them the link and its unit test), Linux only, written with Claude's help and tested on my machines. I don't expect it to be merged. If anything I say about Strata itself is wrong (defaults, docs), I would be glad to hear it. The full write-up, with the method and every number: https://medium.com/towards-artificial-intelligence/two-home-pcs-one-125b-model-splitting-stratas-layers-over-gigabit-ethernet-5fe7eadbb751

And thank you for Strata. It is remarkable software: it runs a 125B model at usable speed on PCs I already had, and its layer split was clean enough that this fork stayed small.

<!-- gh-comment-id:6576922309 --> @dexmac221 commented on GitHub (Nov 2, 2026): Following up here rather than opening anything new, and not asking to reopen this. For my own use I built the split across machines as a small fork of 0.2.7, and the numbers may interest you or the people who asked: https://github.com/dexmac221/strata-cluster (branch `strata-cluster`, see `docs/STRATA_CLUSTER.md`). It is unofficial and says so at the top of its README; I will handle any issues related to this fork in its own repository. **How it works.** It reuses your layer split: the two boundary stages hand off over one TCP connection instead of host memory. PC A (`--net-role first`) runs layers 0..K-1 with the server and forwards each request line; PC B (`--net-role last`) runs K..47 with the head and the MTP drafter. Each PC holds only its own layers' experts, with its own expert cache and adaptive tier, and can still split its layers over its own cards. There is one round trip per verify window: about 51 KB per token one way, a few hundred bytes back, about 1.5 ms on gigabit (3% of the window). Prompt chunks take the same path, stop-and-wait. A STOP travels inside the existing messages, so both engines end after the same window. Without `--net-role` the engine runs as before. The transport is unauthenticated TCP and intended for trusted local networks only. **Speed.** At the same quality (the same 4-bit file, tail skip off on both), throughput went from 16.3 to 30.5 tokens/s (+87%). In detail (Flash-Next, 32K, int8 KV, MTP, median of six 400-token answers): | Setup | tok/s | |---|---| | UD-Q4_K_XL, one PC (Ryzen 7 3700X, 64 GB, 2× RTX 5060 Ti; 40 GiB RAM budget), `STRATA_ROUTE_TAIL_SKIP=0` | 16.2 / 16.4 | | the same with setup's defaults (tail skip on) | 20.6 / 19.7 | | UD-Q4_K_XL, that PC (layers 0-31) + a Ryzen 5 5600X, 32 GB, RTX 4070 (layers 32-47), tail skip off | 28.6 / 30.5 / 30.7 | | IQ3_S, the 5600X alone with 4070 + 3060, `--mmap-experts` | 37.9 | | IQ3_S, two 32 GB PCs (4070 / 3060), split at 24, one card each | 48.8 | | IQ3_S, the 64 GB PC alone | 57.8 | | IQ3_S, the 64 GB PC + the 4070 PC, split at 24 | 56.9 | So it helps when the model does not fit in the best single PC's RAM. In my tests, it provided no benefit when the model already fit in one PC's RAM. Long prompts are slower than on one PC (27,791 tokens: 38.5 s to the answer alone, 61.5 s for the pair with 8,192-token chunks): your layer-major prefill does not cross the network, and in the 4-bit pair the 32 GB PC re-read the experts of the cache slots lent to the prompt path from its SSD. **Correctness.** One process with `--layer-split 24` against two processes joined over TCP on the same machine, the same cards for the same layers, one expert cached per card, adaptive features off, temperature 0: 8 of 8 answers identical (2× RTX 5060 Ti, 880 tokens; also on 2× Titan Xp with the experimental sm_60 build). That compares text only: logprobs do not cross the link yet. **Robustness.** STOP mid-answer and mid-prompt: 4 of 4. 256K context, 60 requests: 0 errors; a needle found at 60K, 121K and 227K tokens. Link reset, or all packets dropped, mid-answer: the request fails with an error (keepalive and `TCP_USER_TIMEOUT` catch the silent case), both engines restart, and the pair answers again after about 3 minutes, the time to reload the model. The modification is about 1,060 lines in 11 files (467 of them the link and its unit test), Linux only, written with Claude's help and tested on my machines. I don't expect it to be merged. If anything I say about Strata itself is wrong (defaults, docs), I would be glad to hear it. The full write-up, with the method and every number: https://medium.com/towards-artificial-intelligence/two-home-pcs-one-125b-model-splitting-stratas-layers-over-gigabit-ethernet-5fe7eadbb751 And thank you for Strata. It is remarkable software: it runs a 125B model at usable speed on PCs I already had, and its layer split was clean enough that this fork stayed small.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#519
No description provided.