Kotensor
Toggle table of contents
1.2.0
jvm
Target filter
jvm
Switch theme
Search in API
Skip to content
Kotensor
Kotensor
/
io.kotensor.core
/
KVCache
KVCache
class
KVCache
(
val
numLayers
:
Int
,
val
numHeads
:
Int
,
val
maxSequenceLength
:
Int
,
val
headDim
:
Int
)
(
source
)
Members
Constructors
KVCache
Link copied to clipboard
constructor
(
numLayers
:
Int
,
numHeads
:
Int
,
maxSequenceLength
:
Int
,
headDim
:
Int
)
Properties
head
Dim
Link copied to clipboard
val
headDim
:
Int
keys
Link copied to clipboard
val
keys
:
FloatArray
length
Link copied to clipboard
var
length
:
Int
max
Sequence
Length
Link copied to clipboard
val
maxSequenceLength
:
Int
num
Heads
Link copied to clipboard
val
numHeads
:
Int
num
Layers
Link copied to clipboard
val
numLayers
:
Int
remaining
Link copied to clipboard
val
remaining
:
Int
size
In
Bytes
Link copied to clipboard
val
sizeInBytes
:
Long
values
Link copied to clipboard
val
values
:
FloatArray
Functions
advance
Link copied to clipboard
fun
advance
(
count
:
Int
)
copy
From
Link copied to clipboard
fun
copyFrom
(
source
:
KVCache
,
length
:
Int
)
offset
Link copied to clipboard
fun
offset
(
layer
:
Int
,
head
:
Int
,
position
:
Int
)
:
Int
reset
Link copied to clipboard
fun
reset
(
)