call method

Tensor call(
  1. Tensor tokens
)

Forward pass. tokens is a 1D [seqLen] tensor of class indices as float32 (matches GPT). Output is [seqLen, vocab].

Implementation

Tensor call(Tensor tokens) {
  if (tokens.shape.length != 1) {
    throw ArgumentError(
      'PythiaModel: tokens must be 1D [seqLen]; got ${tokens.shape}',
    );
  }
  return _forward(tokens, startPos: 0, cache: null);
}