Skip to content

Guard/document rotation + packed-INT4 vs future KV cache-shift #71

Description

@geisten

Follow-up to #61 / #65.

geist currently does no KV context-shift / RoPE-rebase (sliding window only masks), so the rotation is safe today. But llama.cpp#21038 had to explicitly add "cache shift support": rotated (post-RoPE) K cannot be re-RoPE'd without first un-rotating it, and packed 4-bit K would need unpack→re-rope→re-pack. If geist ever gains context-shifting, both the rotation and packed-INT4 paths break subtly.

Task: add a ponytail:-style comment at the rotation/packing sites (kv_store.c) and a line in docs/ARCHITECTURE.md noting the constraint, so a future cache-shift feature doesn't silently corrupt the cache. Optionally assert/refuse if a shift is attempted while rotation/INT4 is active.

Impact: latent landmine — zero effect today, subtle corruption the day cache-shift lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions