Issues / #2431

#2431 Discussion: Parallel slots don't share KV/prefix, and conversation cache prefix reuse falls back to root-ck

open · @TwoAnts · 3 comentarios · En GitHub

Models & quants

Descripción

My use case is hermes agent + strata. Strata is configured with --batch 2 and --max-context 262144.

In long conversations, the main problem I've run into is that after hermes background review reuses the main conversation and iterates a few rounds, when the main conversation continues, the prefix either falls between root-ck and ck1, or takes up another empty slot, causing a long prefill.

I had the agent analyze the latest Strata code and roughly summarize a few possible optimization issues. I see @CC-David-CC is already working on similar optimizations, so I'm just summarizing the situation here based on my understanding.

**Active Parallel slots**

```
slot1   root-ck ... ... ... [ck1, ck2, ck3, ck4, ck5]
slot2   root-ck ... ... ... [ck1, ck2, ck3, ck4, ck5]
...
slotN   root-ck ... ... ... [ck1, ck2, ck3, ck4, ck5]
```

1. No KV-cache sharing across slots, so memory cannot be saved.
2. No prefix sharing across slots, so the same prefix cannot be prefill-accelerated.

**Conversation cache (Parked Slots)**

```
slotX   root-ck ... ... ... [ck1, ck2, ck3, ck4, ck5]
```

3. For a long conversation's slot (whether it's active or parked), prefix reuse falls back to `root-ck` whenever the reused prefix lies between `root-ck` and `ck1`.

En el sitio

Enlaces a install, modelos, releases.