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

    Constructors
    Constructor
    Description
    DeepJLoopConfig(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 a DeepJLoopConfig record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Dimensions for the grouped-query attention and bias-free SwiGLU blocks also used by Nova.
    int
    Returns the value of the codaLayers record component.
    int
    Returns the value of the coreLayers record component.
    float
    Returns the value of the coreResidualScale record component.
    int
    dFF()
    Returns the value of the dFF record component.
    int
    Returns the value of the dModel record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
     
    float
    Returns the value of the gradClipNorm record component.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the initScale record component.
    int
    Returns the value of the kvHeads record component.
    int
    Returns the value of the loops record component.
    int
    Returns the value of the maxSeqLen record component.
    int
    Returns the value of the nHeads record component.
    int
     
    int
    Returns the value of the preludeLayers record component.
    boolean
    Returns the value of the qkNorm record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the vocabSize record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a DeepJLoopConfig record class.
      Parameters:
      vocabSize - the value for the vocabSize record component
      maxSeqLen - the value for the maxSeqLen record component
      dModel - the value for the dModel record component
      nHeads - the value for the nHeads record component
      kvHeads - the value for the kvHeads record component
      preludeLayers - the value for the preludeLayers record component
      coreLayers - the value for the coreLayers record component
      codaLayers - the value for the codaLayers record component
      loops - the value for the loops record component
      dFF - the value for the dFF record component
      qkNorm - the value for the qkNorm record component
      initScale - the value for the initScale record component
      gradClipNorm - the value for the gradClipNorm record component
      coreResidualScale - the value for the coreResidualScale record component
  • Method Details

    • nLayers

      public int nLayers()
      Specified by:
      nLayers in interface TransformerConfig
    • executedLayers

      public int executedLayers()
    • backbone

      public DeepJNovaConfig backbone()
      Dimensions for the grouped-query attention and bias-free SwiGLU blocks also used by Nova.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • vocabSize

      public int vocabSize()
      Returns the value of the vocabSize record component.
      Specified by:
      vocabSize in interface TransformerConfig
      Returns:
      the value of the vocabSize record component
    • maxSeqLen

      public int maxSeqLen()
      Returns the value of the maxSeqLen record component.
      Specified by:
      maxSeqLen in interface TransformerConfig
      Returns:
      the value of the maxSeqLen record component
    • dModel

      public int dModel()
      Returns the value of the dModel record component.
      Specified by:
      dModel in interface TransformerConfig
      Returns:
      the value of the dModel record component
    • nHeads

      public int nHeads()
      Returns the value of the nHeads record component.
      Specified by:
      nHeads in interface TransformerConfig
      Returns:
      the value of the nHeads record component
    • kvHeads

      public int kvHeads()
      Returns the value of the kvHeads record component.
      Returns:
      the value of the kvHeads record component
    • preludeLayers

      public int preludeLayers()
      Returns the value of the preludeLayers record component.
      Returns:
      the value of the preludeLayers record component
    • coreLayers

      public int coreLayers()
      Returns the value of the coreLayers record component.
      Returns:
      the value of the coreLayers record component
    • codaLayers

      public int codaLayers()
      Returns the value of the codaLayers record component.
      Returns:
      the value of the codaLayers record component
    • loops

      public int loops()
      Returns the value of the loops record component.
      Returns:
      the value of the loops record component
    • dFF

      public int dFF()
      Returns the value of the dFF record component.
      Specified by:
      dFF in interface TransformerConfig
      Returns:
      the value of the dFF record component
    • qkNorm

      public boolean qkNorm()
      Returns the value of the qkNorm record component.
      Returns:
      the value of the qkNorm record component
    • initScale

      public float initScale()
      Returns the value of the initScale record component.
      Specified by:
      initScale in interface TransformerConfig
      Returns:
      the value of the initScale record component
    • gradClipNorm

      public float gradClipNorm()
      Returns the value of the gradClipNorm record component.
      Specified by:
      gradClipNorm in interface TransformerConfig
      Returns:
      the value of the gradClipNorm record component
    • coreResidualScale

      public float coreResidualScale()
      Returns the value of the coreResidualScale record component.
      Returns:
      the value of the coreResidualScale record component