class

MicroGPT::TrigramTable

Inherits Reference < Object

Constructors

new(data : Array(Int32), vocab_size : Int32)
Source

Instance methods

lookup(input_ids : Array(Int32)) : Mat

Lookup: returns [seq_len, vocab_size] matrix of trigram distributions At pos 0, falls back to uniform (no previous context)

Source
vocab_size
Source