public abstract class
Embedding
Represents the embedding for a given embedder head. Typically used in embedding tasks.
One and only one of the two 'floatEmbedding' and 'quantizedEmbedding' will contain data, based on whether or not the embedder was configured to perform scala quantization.
Public Constructors
Public Methods
static Embedding | |
static Embedding |
createFromProto(EmbeddingsProto.Embedding proto)
Creates an
Embedding object from an ERROR(/EmbeddingsProto.Embedding) protobuf message. |
abstract float[] |
floatEmbedding()
Floating-point embedding.
|
abstract int |
headIndex()
The index of the embedder head these entries refer to.
|
abstract Optional<String> |
headName()
The optional name of the embedder head, which is the corresponding tensor metadata name.
|
abstract byte[] |
quantizedEmbedding()
Quantized embedding.
|