Embedding class

Represents the embedding for a given embedder head. Typically used in embedding tasks.

One and only one of 'floatEmbedding' and 'quantizedEmbedding' will contain data, based on whether or not the embedder was configured to perform scala quantization.

Inheritance

Constructors

Embedding.float(Float32List floatEmbedding, {required int headIndex, String? headName})
Instantiates a floating point Embedding object with fake values for testing.
Embedding.quantized(Uint8List quantizedEmbedding, {required int headIndex, String? headName})
Instantiates a quantized Embedding object with fake values for testing.

Properties

floatEmbedding Float32List?
Floating-point embedding. null if the embedder was configured to perform scalar-quantization.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
headIndex int
The index of the embedder head to which these entries refer.
no setteroverride
headName String?
The optional name of the embedder head, which is the corresponding tensor metadata name.
no setteroverride
isFloat bool
True if this embedding came from an embedder that was not configured to perform scalar quantization.
no setterinherited
isQuantized bool
True if this embedding came from an embedder configured to perform scalar quantization.
no setterinherited
length int
Length of this embedding.
no setteroverride
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
quantizedEmbedding Uint8List?
Scalar-quantized embedding. null if the embedder was not configured to perform scalar quantization.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
type EmbeddingType
Indicator for the type of results in this embedding.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited