TP4: DeepSeek-V4.1-Flash at 4.0 bpw on four Strix Halo boxes - do you want it, and how should it be split?

Đang mở
#57 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
18/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, zig

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 prompt2d already describes for CUDA world 4) is built into native-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_proxy with one QP per peer, pipelined for prompts.
  • serve_lib and first_light start, 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, catRank as 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)

  1. 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.
  2. 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).
  3. Four-rank collectives on HIP: RCCL all_gather and exchange through Comm.coll (about 550 lines).
    rdma_proxy at 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=tcp is allowed at world 4 with TF_COLL_KIND=rdma, and each rank gets its own RDMA
    device name. Pipelining the four-rank rdma_proxy for prompts: up to 4 chunks of a gather in flight, one lane
    each (TF_COLL_LANES, default 4; decode calls stay on one lane), and catRank as a partner exchange in the 2D
    prompt split. About 430 lines added and 150 removed, in world-4 code only; the kernels, abi.h and the two-rank
    path are unchanged. It was measured with COLL_SLOT_KIB=8704 at world 4.
  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_light also accepts ranks that name different RDMA
    devices.
  5. 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.)

Ngôn ngữ chính
Zig
Star
76
Fork
9
Merge trung bình
21 giờ 59 phút
Pull request đã merge (30 ngày)
34

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Shoestring-dev/StrixFold

Tất cả issue của Shoestring-dev/StrixFold

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.