GPTConfig class

Constructors

GPTConfig({required int vocabSize, required int maxCtx, required int embedDim, required int numLayers, required int numHeads, int? ffnDim, double dropoutP = 0.0, bool tieWeights = true, bool attnBias = false, Activation activation = Activation.relu, Device device = Device.CPU, int seed = 0})
const

Properties

activation Activation
Feed-forward activation. Defaults to ReLU; GPT-2 uses Activation.geluTanh.
final
attnBias bool
If true, the Q/K/V/output projections carry a learned bias. GPT-2 uses biased attention projections; smaller demos in this repo default to no bias for parameter economy.
final
device Device
final
dropoutP double
final
embedDim int
final
ffnDim int?
final
hashCode int
The hash code for this object.
no setterinherited
maxCtx int
final
numHeads int
final
numLayers int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seed int
final
tieWeights bool
final
vocabSize int
final

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