Record Class DeepJLoopConfig
java.lang.Object
java.lang.Record
io.github.kirstenali.deepj.nn.transformer.loop.DeepJLoopConfig
- All Implemented Interfaces:
TransformerConfig
public record DeepJLoopConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int preludeLayers, int coreLayers, int codaLayers, int loops, int dFF, boolean qkNorm, float initScale, float gradClipNorm, float coreResidualScale)
extends Record
implements TransformerConfig
Unique layer counts and the number of fully differentiated recurrent passes.
-
Constructor Summary
ConstructorsConstructorDescriptionDeepJLoopConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int preludeLayers, int coreLayers, int codaLayers, int loops, int dFF) DeepJLoopConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int preludeLayers, int coreLayers, int codaLayers, int loops, int dFF, boolean qkNorm, float initScale, float gradClipNorm, float coreResidualScale) Creates an instance of aDeepJLoopConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbackbone()Dimensions for the grouped-query attention and bias-free SwiGLU blocks also used by Nova.intReturns the value of thecodaLayersrecord component.intReturns the value of thecoreLayersrecord component.floatReturns the value of thecoreResidualScalerecord component.intdFF()Returns the value of thedFFrecord component.intdModel()Returns the value of thedModelrecord component.final booleanIndicates whether some other object is "equal to" this one.intfloatReturns the value of thegradClipNormrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of theinitScalerecord component.intkvHeads()Returns the value of thekvHeadsrecord component.intloops()Returns the value of theloopsrecord component.intReturns the value of themaxSeqLenrecord component.intnHeads()Returns the value of thenHeadsrecord component.intnLayers()intReturns the value of thepreludeLayersrecord component.booleanqkNorm()Returns the value of theqkNormrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thevocabSizerecord component.
-
Constructor Details
-
DeepJLoopConfig
public DeepJLoopConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int preludeLayers, int coreLayers, int codaLayers, int loops, int dFF) -
DeepJLoopConfig
public DeepJLoopConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int preludeLayers, int coreLayers, int codaLayers, int loops, int dFF, boolean qkNorm, float initScale, float gradClipNorm, float coreResidualScale) Creates an instance of aDeepJLoopConfigrecord class.- Parameters:
vocabSize- the value for thevocabSizerecord componentmaxSeqLen- the value for themaxSeqLenrecord componentdModel- the value for thedModelrecord componentnHeads- the value for thenHeadsrecord componentkvHeads- the value for thekvHeadsrecord componentpreludeLayers- the value for thepreludeLayersrecord componentcoreLayers- the value for thecoreLayersrecord componentcodaLayers- the value for thecodaLayersrecord componentloops- the value for theloopsrecord componentdFF- the value for thedFFrecord componentqkNorm- the value for theqkNormrecord componentinitScale- the value for theinitScalerecord componentgradClipNorm- the value for thegradClipNormrecord componentcoreResidualScale- the value for thecoreResidualScalerecord component
-
-
Method Details
-
nLayers
public int nLayers()- Specified by:
nLayersin interfaceTransformerConfig
-
executedLayers
public int executedLayers() -
backbone
Dimensions for the grouped-query attention and bias-free SwiGLU blocks also used by Nova. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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.- Specified by:
vocabSizein interfaceTransformerConfig- Returns:
- the value of the
vocabSizerecord component
-
maxSeqLen
public int maxSeqLen()Returns the value of themaxSeqLenrecord component.- Specified by:
maxSeqLenin interfaceTransformerConfig- Returns:
- the value of the
maxSeqLenrecord component
-
dModel
public int dModel()Returns the value of thedModelrecord component.- Specified by:
dModelin interfaceTransformerConfig- Returns:
- the value of the
dModelrecord component
-
nHeads
public int nHeads()Returns the value of thenHeadsrecord component.- Specified by:
nHeadsin interfaceTransformerConfig- Returns:
- the value of the
nHeadsrecord component
-
kvHeads
public int kvHeads()Returns the value of thekvHeadsrecord component.- Returns:
- the value of the
kvHeadsrecord component
-
preludeLayers
public int preludeLayers()Returns the value of thepreludeLayersrecord component.- Returns:
- the value of the
preludeLayersrecord component
-
coreLayers
public int coreLayers()Returns the value of thecoreLayersrecord component.- Returns:
- the value of the
coreLayersrecord component
-
codaLayers
public int codaLayers()Returns the value of thecodaLayersrecord component.- Returns:
- the value of the
codaLayersrecord component
-
loops
public int loops()Returns the value of theloopsrecord component.- Returns:
- the value of the
loopsrecord component
-
dFF
public int dFF()Returns the value of thedFFrecord component.- Specified by:
dFFin interfaceTransformerConfig- Returns:
- the value of the
dFFrecord component
-
qkNorm
public boolean qkNorm()Returns the value of theqkNormrecord component.- Returns:
- the value of the
qkNormrecord component
-
initScale
public float initScale()Returns the value of theinitScalerecord component.- Specified by:
initScalein interfaceTransformerConfig- Returns:
- the value of the
initScalerecord component
-
gradClipNorm
public float gradClipNorm()Returns the value of thegradClipNormrecord component.- Specified by:
gradClipNormin interfaceTransformerConfig- Returns:
- the value of the
gradClipNormrecord component
-
coreResidualScale
public float coreResidualScale()Returns the value of thecoreResidualScalerecord component.- Returns:
- the value of the
coreResidualScalerecord component
-