TP4: DeepSeek-V4.1-Flash at 4.0 bpw on four Strix Halo boxes - do you want it, and how should it be split?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- cpp, zig
- Domain
- backend, distributed-systems, performance
Research direction
Read the proposed pieces and their rough sizes in the issue, starting with the 2D split and world-4 HIP build; the issue does not name source files or tests. The maintainer must first decide whether to upstream TP4, how to split the work, and what acceptance gate to use. If approved, compare TP4 and TP2 prompt-logits on the frozen prompt set and run the serving benchmark.
Written by the indexing model from the issue text.
Description
CONTRIBUTING asks for an issue before a new backend or arithmetic change, so this comes before any pull request.
We have the dsv41 HIP engine running tensor-parallel on four Strix Halo boxes (TP4) on our fork. It serves the
4.0 bpw pack faster than a pair serves the 2.9 bpw pack. Would you take it upstream? If so, how would you like it
split?
What it does
- The 2D split (the four-node layout
prompt2dalready describes for CUDA world 4) is built intonative-hip. - Each rank loads its own TP4 rank files, cut from the TP2 rank files by a reslice tool.
- Collectives run at four ranks over RCCL, or over
rdma_proxywith one QP per peer, pipelined for prompts. serve_libandfirst_lightstart, check and stop a world-4 instance.
Numbers
Bench: your v41bench_tf.py with prompt set v1, run the way the pair was measured (--levels 1,2,3,4,5,6,7,8 --prefill '', 8 categories, temperature 0, thinking off, /v1/completions, replies capped at 200 tokens and 150
for summary). Drafts on. Figures are total tok/s, the mean of the 8 category medians over the passes.
| Chats at once | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| TP4, 4.0 bpw, rdma_proxy (3 passes) | 61.94 | 85.31 | 97.08 | 103.79 | 109.22 | 112.53 | 112.08 | 117.36 |
| Pair, 2.9 bpw, TCP proxy (5 passes) | 48.55 | 63.96 | 73.73 | 77.06 | 80.40 | 83.23 | 88.08 | 91.80 |
| TP4 / pair | 1.28x | 1.33x | 1.32x | 1.35x | 1.36x | 1.35x | 1.27x | 1.28x |
The two rows differ in more than rank count and bits. The pair ran on TCP collectives with an older build of our fork.
TP4 ran on our RDMA transport at four ranks. The TP4 pass-to-pass spread was under 1%; the pair's at 8 chats was 1.3%.
The TP4 instance kept a 4 GiB prompt cache and the pair kept none. That cannot help here, because every bench request
starts with its own tag and no two prompts share more than the template head.
More from the same TP4 instance:
- One chat with drafts, from
serve-rank0.sh bench's stream bench (median of 3): code 84.5 tok/s, prose 48.6 tok/s.
Over RCCL the same instance gave 76.2 and 41.7. - Cold prefill: rdma_proxy first read cold prompts slower than RCCL (about 970 against 1,165 tok/s for one cold
prompt), because a prompt gather moved one slot-sized chunk at a time. With rdma_proxy pipelined at four ranks (up
to 4 chunks in flight,catRankas a partner exchange instead of a four-rank all-gather, 8,704 KiB slots), the
same four boxes read one cold prompt at 1,204 tok/s and a 7,242-token prompt at 1,295 tok/s, against RCCL's 1,165
and 1,273 (medians of 3; the three changes were measured together, in a later window). Decode did not move (code
84.7, prose 48.2 tok/s, one rep). Host tests and the four-rank fault matrix pass with it. - Collectives per decode round, from
TF_DS_COLL_TIME=sync(the timer is in its own PR): 5.6 ms over rdma_proxy at
4.0 bpw, against 10.9 ms over RCCL in a 2.9 bpw TP4 run with the same activation shapes.
Exactness
The first-light check ran at 2.9 bpw, where a pair reference exists. TP4 over RCCL and the TP2 pair, on the same
deploy, gave the same prompt-logits sha256 on 8 of 8 frozen prompts. The set includes a multi-turn prompt with a
system message and two long prompts that cross chunk seams (2,218 and 5,998 tokens). This held in each of four runs.
Getting there needed one fix: a TP4 node's prompt experts had used a different kernel path from TP2's, which split
and folded K differently. With the fix, a node runs the same kernels as a TP2 rank at its own columns. We have not
run a TP4-against-pair exactness check at 4.0 bpw.
The pieces, with rough sizes (lines added, tests included)
- 2D split and the world-4 build for HIP: about 350 lines across build, model and comm. Sparse attention at 16
heads a rank adds about 450 lines (kernel plus check). Putting the prompt experts on TP2's kernel path is about
100 lines. There are also kit entries for the split, mostly a regenerated launch fixture of about 4,000 lines. - TP4 rank files: rank caches at world 4, built and checked on CPU (about 300 lines). A reslice tool cuts TP4
rank files from the TP2 ones, so nobody has to repack from the checkpoint (about 650 lines with its test). - Four-rank collectives on HIP: RCCL
all_gatherandexchangethroughComm.coll(about 550 lines).
rdma_proxyat four ranks with one QP per peer (about 2,000 lines, half of it the test). Two small follow-ups let
the RDMA arm load:TF_DS_COLL=tcpis allowed at world 4 withTF_COLL_KIND=rdma, and each rank gets its own RDMA
device name. Pipelining the four-rankrdma_proxyfor prompts: up to 4 chunks of a gather in flight, one lane
each (TF_COLL_LANES, default 4; decode calls stay on one lane), andcatRankas a partner exchange in the 2D
prompt split. About 430 lines added and 150 removed, in world-4 code only; the kernels,abi.hand the two-rank
path are unchanged. It was measured withCOLL_SLOT_KIB=8704at world 4. - serve and first_light at world 4: per-rank settings and four-box start, check and stop (about 900 lines, some
of which is specific to our setup and would be cut).first_lightalso accepts ranks that name different RDMA
devices. - Smaller: image rows sent to every follower at world 4 (about 130 lines); sf-disk at world 4 (about 470 lines,
optional).
Questions
- Do you want TP4 upstream at all, or should it stay on our fork?
- If you do, is one PR per piece in the order above right? Each would have host tests and its own receipt.
- What gate would you want for it? We used TP4 against TP2 prompt-logits sha256 on a frozen prompt set, plus your
serving bench. We can add teacher-forced top-token checks if you prefer them. - Any constraints on the rank-file format or on the reslice tool's place in
tools/?
(AI-assisted: written with Claude Code.)
- Dominant language
- Zig
- Stars
- 76
- Forks
- 9
- Avg merge
- 21h 59m
- Merged PRs (30d)
- 34
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shoestring-dev/StrixFold
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Shoestring-dev/StrixFold#70 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Shoestring-dev/StrixFold#39 · 8 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Shoestring-dev/StrixFold#28 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 54/100
Shoestring-dev/StrixFold#7 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Shoestring-dev/StrixFold#3 · 1 comment ·
Maintainers usually reply within 1 day
All issues in Shoestring-dev/StrixFold
Similar issues
-
bug done
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
neavo/LinguaGacha#1124 ·
Maintainers usually reply within 1 day
-
module/http Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ballerina-platform/ballerina-library#9868 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
symgraph/GhidrAssistMCP#84 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
open-astro/AlpacaBridge#2606 · 1 comment ·
Maintainers usually reply within 1 day
-
reasons-gate
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
benthomasson/reasonsforge#100 ·
Maintainers usually reply within 1 day