Skip to content

perf(serve): Qwen3.5 tensor-core prefill projections (RCA-SRV-001 fix 1) #4483

Open

Description

@noahgift

Weight GEMM runs as f32-pedantic dequant+sgemm with 0 tensor-core kernels. That is 78% of the gap at mid context and 55% at long context. SRV-FIX-001 (aprender-41): APR_QWEN35_PREFILL_GEMM=f16 gives prefill 1.8x at 2.2k tokens and 1.7x at 30k, with 5/5 prompts identical. Root: the pin_float_gemv test-isolation tolerance became the production precision policy (gdn_prefill_ops.rs:7-11). Owner: aprender-41.

Source: RCA-SRV-001 (docs/findings/rca-srv-001-five-whys.md, branch rca/srv-001 @f2b57c8bd, aprender-76, measured on RTX 4090). Epic: 0.71 E2 Verbs Are Fast (#3598). Acceptance: a measured delta on the PRM-S1 v2 set against llama.cpp, with the pinned binary (version+sha) and an e2e quality falsifier (greedy text identical, or a stated tolerance).

Activity

  1. added this to the 0.71.0 milestone on Sep 26, 2026
  2. noahgift commented on Oct 9, 2026

    @noahgift
    MemberAuthor

    Acceptance receipt on the RTX 4090 (sm_89), on a main binary: apr 0.70.3, 3824eba424 = main acd599e52a + docs, sha256 eb417ad9…8944. PRM-S1 v2 set a4910a65…, 200 items, Qwen3.5-4B-Q4_K_M, llama.cpp d1d3c3396, identical prompt ids on every leg.

    Receipt: docs/audits/prm-001/s1-v2/4483/lambda-4090/RECEIPT.md on branch wprod/4483-tc-prefill (commit 13f57be8b1). The branch also moves the gx10 receipt in from the stale branch. No PR yet: the PR cap is full.

    leg prefill p50 ms vs llama.cpp wall p50 ms vs llama.cpp
    f16 (default) 1030 1.68× 3801 1.74×
    f32 (same binary) 2473 4.04× 5265 2.40×
    llama.cpp 611 1 2189 1
    • f32/f16 prefill, paired per item: p50 2.42 (min 1.69, max 3.50). The f16 gap to llama.cpp grows with context, from 1.24× at 2k to 2.40× at 32k.
    • Quality falsifier, with the tolerance stated as "verdict identical on every item": met, 200/200 (39 Fail / 161 Pass on both legs). Output token count matches on 177/200, so greedy text is not bit-identical. A second f16 pass matches the first on 200/200, so the differences come from precision, not noise.
    • Engaged: the f16 log has fp16 prefill weights prewarmed: 6807 MiB; the f32 log has no prewarm line.
    • apr prefill time comes from the server's batched prefill log lines, because main has no SRV-TIM-001 timings on the Qwen3.5 route (APR-OBS-001: dogfood observability (OBS-00 + row checklist) #4487). The pairing rule and per-row TSVs are in the receipt.

    Not covered by this fix: at ctx 36864 on 24 GB, the 27B fp16 cache does not fit (46445 MiB needed, 7223 MiB free). Its prefill stays on f32, with no tensor core. The 9B fits (13196 MiB). A per-call fp16 dequant leg would cover the 27B; that is a candidate follow-up, not filed.

    Agent: aprender-wprodmodels

  3. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    merged into #5305 (master ticket for epic #3598; triage rule 7b, 2026-10-14). It is a checklist row there; reopen this issue when work on it starts or its PR opens.

  4. modified the milestones: 0.71.0, 0.73.0 on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions