class

ConstructionKit::EmbeddingTableExec

Inherits ConstructionKit::ExecutableNode < Reference < Object

Embedding table — learnable lookup table

Constructors

new(id : String, vocab_size : Int32, d_model : Int32)
Source

Instance methods

adam
Source
adam_mats
Source
backward(output_grads : Hash(String, MicroGPT::Mat)) : Hash(String, MicroGPT::Mat)

Backward pass: receive gradients for outputs, return gradients for inputs

Source
d_table
Source
forward(inputs : Hash(String, Tensor)) : Hash(String, Tensor)

Forward pass: read named inputs, produce named outputs

Source
param_count
Source
table
Source
update(lr : Float64)

Update trainable parameters

Source
weight_mats

Weight access for serialization / checkpoint

Source