Record Class GPTConfig
java.lang.Object
java.lang.Record
io.github.kirstenali.deepj.models.gpt.GPTConfig
public record GPTConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int nLayers, int dFF, double initScale, double gradClipNorm)
extends Record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdFF()Returns the value of thedFFrecord component.intdModel()Returns the value of thedModelrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thegradClipNormrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theinitScalerecord component.intReturns the value of themaxSeqLenrecord component.intnHeads()Returns the value of thenHeadsrecord component.intnLayers()Returns the value of thenLayersrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thevocabSizerecord component.
-
Constructor Details
-
GPTConfig
public GPTConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int nLayers, int dFF) -
GPTConfig
public GPTConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int nLayers, int dFF, double initScale, double gradClipNorm) Creates an instance of aGPTConfigrecord class.- Parameters:
vocabSize- the value for thevocabSizerecord componentmaxSeqLen- the value for themaxSeqLenrecord componentdModel- the value for thedModelrecord componentnHeads- the value for thenHeadsrecord componentnLayers- the value for thenLayersrecord componentdFF- the value for thedFFrecord componentinitScale- the value for theinitScalerecord componentgradClipNorm- the value for thegradClipNormrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
vocabSize
public int vocabSize()Returns the value of thevocabSizerecord component.- Returns:
- the value of the
vocabSizerecord component
-
maxSeqLen
public int maxSeqLen()Returns the value of themaxSeqLenrecord component.- Returns:
- the value of the
maxSeqLenrecord component
-
dModel
public int dModel()Returns the value of thedModelrecord component.- Returns:
- the value of the
dModelrecord component
-
nHeads
public int nHeads()Returns the value of thenHeadsrecord component.- Returns:
- the value of the
nHeadsrecord component
-
nLayers
public int nLayers()Returns the value of thenLayersrecord component.- Returns:
- the value of the
nLayersrecord component
-
dFF
public int dFF()Returns the value of thedFFrecord component.- Returns:
- the value of the
dFFrecord component
-
initScale
public double initScale()Returns the value of theinitScalerecord component.- Returns:
- the value of the
initScalerecord component
-
gradClipNorm
public double gradClipNorm()Returns the value of thegradClipNormrecord component.- Returns:
- the value of the
gradClipNormrecord component
-