Skip to content

Expose Torch PD producer cache and chunk controls for reproducible serving #241

Closed

Description

@gspark-etri

Problem

Torch PD always enables producer prefix caching, even when decoder prefix caching is off. The serving CLI cannot request a genuinely uncached producer for reproducibility or controlled benchmarks.

Evidence

#240: Qwen3-0.6B GPU PD BF16 concurrent output matches serial8/12 with35072producer cache-hit tokens. A process-local cache-off control yields12/12 with zero producer hits; FP32 with cache enabled also yields12/12. The default may remain useful for throughput, but its policy must be explicit and controllable.

Scope

Add an explicit opt-out flag for the in-process Torch prefill producer, preserving the existing default and decoder policy. Forward it through the HTTP validation harness. Add actual tiny-model factory tests verifying repeated requests reuse prefixes by default and do not reuse them when disabled. No automatic accuracy/performance claim and no change to vendor/subprocess engines.

Done when

The public CLI reproduces the cache-off GPU control, existing defaults remain intact, and tests verify actual prefill cache behavior.

Owner

Codex implementation; maintainer review/merge.

Measured scope update

The producer chunk default2048 also differs from standalone chunk256. Qwen3-0.6B BF16 cache-off PD still differs from native at2K; matching producer chunk256 restores all3 native/PD serial comparisons. Expose --pd-prefill-chunk with the existing default2048 and reject nonpositive sizes before loading a model. Verify actual chunk boundaries with a tiny real model. This keeps producer reproducibility settings explicit without changing defaults.

Activity

  1. changed the title [-]Expose Torch PD producer prefix-cache opt-out for reproducible serving[/-] [+]Expose Torch PD producer cache and chunk controls for reproducible serving[/+] on Oct 23, 2026
  2. gspark-etri commented on Oct 30, 2026

    @gspark-etri
    CollaboratorAuthor

    Fixed by #281, squash-merged into optimus-rm.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions