Table of Contents

Interface ITokenEmbedding<T>

Namespace
AiDotNet.Interfaces
Assembly
AiDotNet.dll

Exposes token embedding lookup for models that maintain a token embedding table.

public interface ITokenEmbedding<T>

Type Parameters

T

The numeric type used for computations.

Methods

GetTokenEmbeddings(IReadOnlyList<int>)

Retrieves embeddings for the provided token IDs.

Matrix<T> GetTokenEmbeddings(IReadOnlyList<int> tokenIds)

Parameters

tokenIds IReadOnlyList<int>

Token IDs to lookup.

Returns

Matrix<T>

A matrix where each row corresponds to a token embedding.