TransformerDecoder class
A Transformer Decoder model.
This model takes a target sequence and encoder output, and produces logits for the next token in the target sequence.
Constructors
Properties
-
blocks
→ List<
TransformerDecoderBlock> -
final
- blockSize → int
-
final
- embedSize → int
-
final
- encoderEmbedSize → int
-
final
- finalLayerNorm → LayerNorm
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lmHead → Layer
-
final
- numHeads → int
-
final
- numLayers → int
-
final
-
positionEmbeddings
→ List<
ValueVector> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tokenEmbeddings
→ List<
ValueVector> -
final
- vocabSize → int
-
final
Methods
-
forward(
List< int> idx, List<ValueVector> encoderOutput) → List<ValueVector> - The forward pass for the Transformer Decoder model.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parameters(
) → List< Value> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
zeroGrad(
) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited