From 074bac844714b3a011d1cf6ebc40c169b10d1aef Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Thu, 1 May 2025 13:45:32 -0700 Subject: [PATCH] kvcache: Log batch size if we can't find a slot In some cases, we can't find a cache slot when using sliding window attention. It would be helpful in this (and other cases) to know what the batch size is. Bug #10127 --- kvcache/causal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvcache/causal.go b/kvcache/causal.go index ea07932cd..9bc1d5da2 100644 --- a/kvcache/causal.go +++ b/kvcache/causal.go @@ -239,7 +239,7 @@ func (c *Causal) findStartLoc() (int, error) { } } - return 0, fmt.Errorf("%w (length: %v)", ErrKvCacheFull, len(c.cells)) + return 0, fmt.Errorf("%w (cache: %v batch: %v)", ErrKvCacheFull, len(c.cells), c.curBatchSize) } func (c *Causal) updateSlidingWindow() {