Skip to content

apr serve (0.69.1) has no prompt-prefix reuse on the qwen35 CUDA path: an identical ~850-token prompt costs 11.0 s on both runs (ollama: 8.2k tok/s uncached, 37k cached) #4214

Open

Description

@noahgift

Measured 2026-09-24 on lambda-labs (RTX 4090) by the local-Qwen prototype (infra PMAT-1009). Receipt: infra branch feat/local-qwen35-recon, docs/audits/LQW-001/2026-09-24-qwen35-4b-apr-vs-ollama.md.

  • apr v0.69.1 CUDA release asset, apr serve run --gpu, unsloth/Qwen3.5-4B-GGUF Q4_K_M (sha256 00fe7986…11a4), /v1/chat/completions, temp 0.
  • The same ~850-token prompt sent twice took 11.0 s to first token both times. The second request reused nothing.
  • Reference: ollama 0.34.2 with the same base weights gives 37108 tok/s prefill on the identical repeat.

Related: #3553 (the prefix-cache counter is exposed nowhere, so this can't be read from /metrics), #3596 (prefill one token at a time).

Acceptance: a repeated identical prompt on the qwen35 path skips the prefill of its shared prefix, and the test shows the cached TTFT is a fraction of the uncached one. The test must go red with the fix reverted.

Activity

  1. added this to the 0.71.0 milestone on Sep 24, 2026
  2. noahgift commented on Sep 24, 2026

    @noahgift
    ContributorAuthor

    RC1 7ff50ec2a evidence (infra-76 receipt /mnt/nvme-raid0/tmp/rc1-llama/RC1-RECEIPT.md): turn 2 logs [qwen35] batched prefill: … from position 0 with 1076, 4215 and 31909 tokens, so the whole conversation is re-prefilled every turn. llama-server on the same prompt reuses the prefix and prefills 22 tokens. At 32k that is ~14–15 s of TTFT per turn that llama.cpp does not pay.

  3. added 7 commits that reference this issue on Sep 24, 2026
  4. noahgift commented on Sep 25, 2026

    @noahgift
    ContributorAuthor

    Parked by APR-EPIC-001: over E2 budget (rank 16/23). Reopen = pull. Applied by aprender-d1: claude+agy both said close, apr shadow row recorded (handoff/close-quorum-2026-09-25.json).

  5. modified the milestones: 0.71.0, backlog on Sep 25, 2026
  6. added
    parkedClosed over epic budget (APR-EPIC-001 rule 5). Reopen = pull.
    on Sep 25, 2026
  7. added 5 commits that reference this issue on Sep 26, 2026
  8. noahgift commented on Oct 15, 2026

    @noahgift
    ContributorAuthor

    Reopened (pull): 0.73 llama.cpp parity row under #3598, owner aprender-df, fresh branch from main 8f601ca. Done-when: a repeated-prefix shot shows timings.prompt_n < prompt_tokens on apr, measured the way #5305's pp/tg harness measures it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    parkedClosed over epic budget (APR-EPIC-001 rule 5). Reopen = pull.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions