class

MicroGPT::MiniGPT

Inherits MicroGPT::MathUtils < Reference < Object

Constructors

new(config : Config, head_dims : Array(Int32))

Heterogeneous heads

Source
new(config : Config)

Uniform heads

Source

Instance methods

blocks
Source
config
Source
embedding
Source
final_norm
Source
forward(ids : Array(Int32), mask : Mat | Nil = nil) : Mat
Source
generate(start_ids : Array(Int32), max_tokens : Int32, temperature : Float64 = 1.0) : Array(Int32)
Source
load(path : String)
Source
output
Source
param_count
Source
save(path : String)
Source
train_step(input_ids : Array(Int32), target_ids : Array(Int32)) : Float64
Source