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
/
RoPE
Ro
PE
class
RoPE
(
val
dimension
:
Int
,
val
base
:
Float
=
10000.0f
,
val
scaling
:
RoPEScaling
?
=
null
)
:
Module
(
source
)
Members
Constructors
Ro
PE
Link copied to clipboard
constructor
(
dimension
:
Int
,
base
:
Float
=
10000.0f
,
scaling
:
RoPEScaling
?
=
null
)
Properties
base
Link copied to clipboard
val
base
:
Float
dimension
Link copied to clipboard
val
dimension
:
Int
inv
Freq
Link copied to clipboard
val
invFreq
:
FloatArray
requires
Grad
Link copied to clipboard
var
requiresGrad
:
Boolean
scaling
Link copied to clipboard
val
scaling
:
RoPEScaling
?
Functions
apply
Link copied to clipboard
fun
apply
(
input
:
Tensor
,
startPosition
:
Int
=
0
,
sequenceLength
:
Int
?
=
null
)
:
Tensor
apply
In
Place
Link copied to clipboard
fun
applyInPlace
(
token
:
Tensor
,
position
:
Int
)
:
Tensor
apply
Rows
In
Place
Link copied to clipboard
fun
applyRowsInPlace
(
rows
:
Tensor
,
startPosition
:
Int
)
:
Tensor
forward
Link copied to clipboard
open
override
fun
forward
(
input
:
Tensor
)
:
Tensor
forward
Into
Link copied to clipboard
open
fun
forwardInto
(
input
:
Tensor
,
out
:
Tensor
)
:
Tensor
invoke
Link copied to clipboard
operator
fun
invoke
(
input
:
Tensor
)
:
Tensor
parameters
Link copied to clipboard
open
override
fun
parameters
(
)
:
List
<
Tensor
>