Return a sliced copy of the KV cache.
(cache: DynamicCache, start: Optional[int], end: Optional[int])
| 264 | |
| 265 | |
| 266 | def _slice_functional(cache: DynamicCache, start: Optional[int], end: Optional[int]) -> DynamicCache: |
| 267 | """Return a sliced copy of the KV cache.""" |
| 268 | copied = _copy_cache(cache) |
| 269 | return _slice_inplace(copied, start, end) |
| 270 | |
| 271 | |
| 272 | def _concat_tensors( |
no test coverage detected