class

MicroGPT::RoPE

Inherits Reference < Object

Constructors

new(max_seq : Int32, dim : Int32, base : Float64 = 10000.0)
Source

Instance methods

apply!(x : Mat)

Apply rotation in-place to a [seq_len, dim] matrix

Source
apply_inverse!(x : Mat)

Inverse rotation (for backward pass): negate sin

Source
cos_cache
Source
max_seq
Source
sin_cache
Source