klyn.math.nn.quantization.QuantizedMatrix.embeddingCPU
method
public embeddingCPU(notnull indices as IList<Long>) as NDArray<Float>
Description

Decodes selected embedding rows on the CPU, not the entire table.

Parameters
ParameterDescription
indicesNon-negative embedding row indices.
Returns

Float matrix with shape [indices.size, columns].

Throws
  • IndexException for an out-of-range row.
  • ValueException inside a GPU execution scope.
Example

embeddings = matrix.embeddingCPU([42l, 99l])