CRITICAL: BatchQuantizedKVCache _idx corruption during finalize and state operations #45
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug 1: finalize() does not update _idx after rolling
finalize()rolls cache tensors but does not update_idx, causing _idx to drift from actual valid token positions.Bug 2: state setter uses tensor allocated size instead of actual token count
The state setter sets
_idx = self.keys[0].shape[2]which is the allocated size, not the actual token count.Impact
Fix
File
omlx/cache/batch_quantized_cache.py