Concatenate multiple KVCacheEntry objects along a dimension.
Value
A new KVCacheEntry with concatenated key and value tensors.
Returns an empty entry if no valid entries are found.
Examples
if (FALSE) { # \dontrun{
e1 <- KVCacheEntry$new(key = torch_randn(2, 4, 10, 64),
value = torch_randn(2, 4, 10, 64))
e2 <- KVCacheEntry$new(key = torch_randn(3, 4, 10, 64),
value = torch_randn(3, 4, 10, 64))
e_cat <- kv_cache_entry_concat(list(e1, e2), dim = 1)
} # }