Skip to content

Restore fine-grained hybrid prefix-cache reuse under EAGLE/MTP #11

Description

@randomvariable

Objective

Verify and, if necessary, fix fine-grained prefix-cache reuse under EAGLE/MTP for hybrid attention plus Mamba models.

Target workloads

  • Qwen hybrid attention/Mamba or Gated-DeltaNet models using EAGLE/MTP
  • Multi-turn prompts with partial prefix-cache hits

References

Context

The fork already has prefix_match_unit, finer hybrid block hashing, and scheduler handling for a Mamba partial-tail boundary. The external patch may therefore be obsolete, partially overlapping, or expose one remaining predecessor-hash case. Reproduce before porting.

Proposed work

  • Build a focused multi-turn EAGLE/MTP regression test where a context-load probe occupies the final hash unit.
  • Measure FullAttention and Mamba computed-token rewind boundaries.
  • Compare current fork behavior with the external predecessor-hash retention heuristic.
  • Apply only the missing bounded metadata change, if a regression remains.

Acceptance criteria

  • Focused tests specify token geometry and assert exact FullAttention match, EAGLE rewind, and Mamba replay boundaries.
  • No stale/reused Mamba state crosses an invalid boundary.
  • Metadata remains bounded per prompt and cache geometry is unchanged.
  • Report cached follow-up TTFT medians over a defined prompt pair and repetition count versus unpatched behavior; do not gate adoption on an unspecified percentage.

Target hardware

  • CUDA sm_121a (GB10 / DGX Spark)
  • ROCm gfx1151 (Strix Halo) — both targets run EAGLE/MTP and hybrid attention

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ideaOptimization idea candidate for evaluation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions