readValues

open override fun readValues(layer: Int, startPos: Int = 0, endPos: Int = currentSeqLen): FloatArray(source)

Read cached values for a layer, dequantized to float.

Returns the value cache for positions [startPos, endPos) as a contiguous float array shaped numHeads, (endPos - startPos), headDim.

Parameters

layer

Layer index

startPos

First token position (inclusive)

endPos

Last token position (exclusive), defaults to currentSeqLen