[Engine] hy4 CUDA/HIP serve always reports draft_n 0
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Đọc engine/src/hy4flash/run/hy4_serve.hip.h, nơi đường dẫn serve của CUDA/HIP định dạng phản hồi DONE, rồi so sánh các bộ đếm của nó với sy_serve.h hoặc hy4_metal_serve.h, những tệp mà issue cho biết đã truyền số lượng yêu cầu. Theo dõi các bộ đếm nào được cung cấp và chấp nhận cho yêu cầu, sau đó xác nhận rằng thời gian API báo cáo các giá trị đó thay vì bằng không, đồng thời log của engine vẫn nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Title: [Engine] hy4 CUDA serve reports draft_n 0 while DFly2 accepts drafts
Area: [Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source? Docker
Reproduction status: Reproduced locally
Strata version: Strata 0.2.18 (build 0.1.64) · strata-hy4 0.1.67 · image ghcr.io/niko1221/strata:0.2.18-cuda13
Graphics card, memory and system: RTX 5090 Laptop GPU 24 GB · driver 595.84 · 94 GB RAM · Ubuntu 24.04.3 · kernel 6.14.0-35-generic
Model, size and settings: Hy4-Flash SQ-64 · 131072 context · vision on · --draft dfly2 · --vram-experts-gb 9.25 · --ram-experts-gb 46.79
What happened
Non-streaming POST /v1/chat/completions on hy4-flash-sq-64 returns
timings.draft_n = 0 and timings.draft_n_accepted = 0 while the engine log
shows DFly2 accepting drafts for that same generation.
First request after this SQ-64 process started:
Response timings:
predicted_n 32, predicted_ms 1319.4, predicted_per_second 24.3,
draft_n 0, draft_n_accepted 0
engine.log for that request:
[spec] K=7 adaptive tree=1 early=0.04: 32 tokens in 14 iterations (12 spec + 2 plain), 2.29 tokens/iteration, total 1319 ms
[spec] verify steps 12: accepted drafts per step 1.417 (verified slots 3.17/step, tree_steps 2, branch_hits 1, prob_iters 0, chain_evals 84, early_exits 1), draft 3.9 ms/step, verify 92.0 ms/step
The [spec] counters in this log are cumulative for the process. The last
request added 128 generated tokens (3253 -> 3381) and 23 verify steps
(734 -> 757); the accepted-draft histogram for that step rose by about 106.
The API timings for these requests stayed at 0.
Expected: draft_n and draft_n_accepted match the drafts this request offered
and accepted. server.py _parse_done copies DONE fields 7 and 8 into
drafts_accepted and drafts_offered.
On main (read 2026-11-26), the CUDA/HIP serve path writes both fields as
literal zeros and still prints the real counts to stderr:
engine/src/hy4flash/run/hy4_serve.hip.h
proto("DONE %d %d %.1f %.1f %s 0 0 %d", made, T0, prompt_ms, decode_ms, finish, start);
spec->report(stderr, ...);
sy_serve.h and hy4_metal_serve.h already pass this request's counters.
Related, not the same bug: #5890 fixed this symptom for Qwen --batch-mtp
in 0.2.17. hy4_serve.hip.h still emits the zeros. This run is strata-hy4 0.1.67.
Smallest steps
1. Run strata-hy4 0.1.67 with --draft dfly2 on Hy4-Flash SQ-64.
2. POST /v1/chat/completions, stream false, max_tokens 32 or 128.
3. Compare timings.draft_n / draft_n_accepted with the [spec] block appended to engine.log for that request.
Logs
strata --version
strata 0.2.18 (build 0.1.64; python 3.12.15)
Engine command:
strata-hy4 --serve --native Hy4-Flash-SQ-64.strata --engram Hy4-Flash-Engram-Q8.strata --max-context 131072 --vision Hy4-Flash-Vision.strata --vram-experts-gb 9.25 --ram-experts-gb 46.79 --draft dfly2
[spec] K=7 adaptive tree=1 early=0.04: 32 tokens in 14 iterations (12 spec + 2 plain), 2.29 tokens/iteration, total 1319 ms
[spec] verify steps 12: accepted drafts per step 1.417 (verified slots 3.17/step, tree_steps 2, branch_hits 1, prob_iters 0, chain_evals 84, early_exits 1), draft 3.9 ms/step, verify 92.0 ms/step
- Ngôn ngữ chính
- C++
- Star
- 11.6k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Niko1221/Strata
-
Strata Web Dashboard GPU widgetĐang mởneeds-format
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Niko1221/Strata#7039 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Niko1221/Strata#7018 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Niko1221/Strata#7014 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 5 ngày
-
needs-format
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Niko1221/Strata#6934 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của Niko1221/Strata
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Missing repro Platform: Android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
software-mansion/react-native-reanimated#11554 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sleepyviper1213/redis#52 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày