appendK method
Append [N_new, headDim] K and V for a single KV head. Returns
the updated concatenated tensor (also stored in the cache).
Implementation
Tensor appendK(int kvHead, Tensor newK) {
final prev = k[kvHead];
final next = prev == null
? newK
: TensorConcat.concat([prev, newK], axis: 0);
k[kvHead] = next;
return next;
}