Skip to content

[Bounty #12] Position-shifted prompt reuse · engine (CacheSlide) #93

Closed as not planned

Description

@zeekay

Umbrella HIP: HIP-1345: Agent-Aware Model Serving and Cache Reuse (hanzoai/hips)
Bounty Class: Research + Implementation Bounty

Objective & Acceptance Test

Reuse KV from unchanged tool and system prompt segments even when absolute prompt token positions shift. Compare correctness, TTFT, and GPU memory against ordinary prefix caching (hanzoai/engine#51).

Scope & Canonical Architecture

Wave 1 Priority #1! Paper authors reported 3.11-4.3x latency reduction in their environment (NOT a Hanzo claim until reproduced). Must enforce HIP-1345 §1 per-tenant cache_salt and kv_computed_tokens bounds.

Canonical stack boundaries MUST stay intact (vfs -> hanzoai/s3 -> visor, Cloud owning lifecycle & billing, Enso routing models, Zen generating outputs, Kai returning structured non-generative decisions). Reported figures in referenced FAST/conference papers belong strictly to the original authors' environments and MUST NOT be treated as Hanzo expectations until reproduced here.

Research-to-PR Acceptance Contract (0 of 6 requirements)

  • 1. Paper & License Audit: Link primary paper/code, summarize design, and verify license compatibility (prefer Apache-2.0/MIT for production merges; clean-room implementation or research-only report otherwise) and patent restrictions.
  • 2. Matched Baselines: Provide reproducible upstream baseline and identical Hanzo baseline scripts/configs.
  • 3. Falsifiable Hypothesis: Document target metrics and expected failure modes up front.
  • 4. Deliverable: Submit bounded implementation PR (Implementation Bounty) or documented reproducible experiment including valid negative results (Research Bounty).
  • 5. Evidence & Safety: Include correctness, concurrency, multi-tenant isolation, security, and regression tests appropriate to the subsystem.
  • 6. Measurements & HIP Update: Publish raw before/after measurements, methodology, and status update against HIP-1345.

Activity

  1. added
    help wanted
    wave-1
    on Nov 16, 2026
  2. breezesamuel commented on Nov 17, 2026

    @breezesamuel
    Contributor

    Claiming this bounty (Wave 1 Priority #1 - CacheSlide / FAST'26 position-shifted prompt reuse).

    Plan against the 6-point acceptance contract:

    1. Paper & license audit: link + summarize the CacheSlide design (FAST '26); verify license/patent posture before any production merge; clean-room implementation only, no reference code copied.
    2. Matched baselines: ordinary prefix caching in hanzo-paged-attn / hanzo-kv-fabric (see Persistent, shareable prefix caches for multi-turn agents #51) as the baseline; identical scripts/configs for both runs.
    3. Falsifiable hypothesis: TTFT improvement on multi-turn agent traces where tool/system segments are stable but absolute token positions shift (target >=1.5x); documented failure modes: intra-segment token drift, cross-tenant hash collisions, epoch-fence violations, kv_computed_tokens overcounting.
    4. Deliverable: bounded implementation PR in hanzo-kv-fabric - segment-indexed KV block directory keyed by content hash + per-tenant cache_salt (HIP-1345 section 1 enforced), with kv_computed_tokens bounds checked at admission. Canonical stack boundaries untouched.
    5. Evidence & safety: exact position-shift fixtures (correctness), concurrent-admission tests, multi-tenant isolation tests (cross-tenant salt collision attempts), and regression tests against plain prefix caching.
    6. Measurements & HIP update: raw before/after TTFT/memory numbers, methodology, and a HIP-1345 status update.

    Starting now; will open a draft PR early so progress is visible.

  3. breezesamuel commented on Nov 17, 2026

    @breezesamuel
    Contributor

    Draft PR submitted: #100 -- fabric-level segment reuse per HIP-1345 section 1.1/1.2, 6 unit tests + CPU bench demo showing 14/14 hits vs 0/896 baseline. Scheduler integration is the follow-up PR.

  4. zeekay commented on Nov 21, 2026

    @zeekay
    MemberAuthor

    Duplicate of #85; continue there. Open PRs are retargeted.

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

    bountyhelp wantedperfresearchwave-1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions