Record Class DeepJNovaConfig

java.lang.Object
java.lang.Record
io.github.kirstenali.deepj.nn.transformer.nova.DeepJNovaConfig
All Implemented Interfaces:
TransformerConfig

public record DeepJNovaConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int nLayers, int dFF, boolean qkNorm, float initScale, float gradClipNorm) extends Record implements TransformerConfig
  • Constructor Summary

    Constructors
    Constructor
    Description
    DeepJNovaConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int nLayers, int dFF)
     
    DeepJNovaConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int nLayers, int dFF, boolean qkNorm, float initScale, float gradClipNorm)
    Creates an instance of a DeepJNovaConfig record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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 maxSeqLen record component.
    int
    Returns the value of the nHeads record component.
    int
    Returns the value of the nLayers 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

    • DeepJNovaConfig

      public DeepJNovaConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int nLayers, int dFF)
    • DeepJNovaConfig

      public DeepJNovaConfig(int vocabSize, int maxSeqLen, int dModel, int nHeads, int kvHeads, int nLayers, int dFF, boolean qkNorm, float initScale, float gradClipNorm)
      Creates an instance of a DeepJNovaConfig 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
      nLayers - the value for the nLayers 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
  • Method Details

    • 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
    • nLayers

      public int nLayers()
      Returns the value of the nLayers record component.
      Specified by:
      nLayers in interface TransformerConfig
      Returns:
      the value of the nLayers 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