Interface AdamParamsConfig.Builder

  • Method Details

    • learningRate

      AdamParamsConfig.Builder learningRate(Double learningRate)

      The learning rate for the optimizer. Must be greater than 0.

      Parameters:
      learningRate - The learning rate for the optimizer. Must be greater than 0.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • beta1

      The exponential decay rate for the first moment estimates.

      Parameters:
      beta1 - The exponential decay rate for the first moment estimates.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • beta2

      The exponential decay rate for the second moment estimates.

      Parameters:
      beta2 - The exponential decay rate for the second moment estimates.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • eps

      A small constant added to the denominator for numerical stability.

      Parameters:
      eps - A small constant added to the denominator for numerical stability.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • weightDecay

      AdamParamsConfig.Builder weightDecay(Double weightDecay)

      The weight decay (L2 regularization) coefficient.

      Parameters:
      weightDecay - The weight decay (L2 regularization) coefficient.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • gradClipNorm

      AdamParamsConfig.Builder gradClipNorm(Double gradClipNorm)

      The maximum gradient norm for gradient clipping. Gradients are scaled down if their norm exceeds this value.

      Parameters:
      gradClipNorm - The maximum gradient norm for gradient clipping. Gradients are scaled down if their norm exceeds this value.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • loraPlusLrRatio

      AdamParamsConfig.Builder loraPlusLrRatio(Double loraPlusLrRatio)

      The learning rate multiplier for LoRA+ B matrices relative to A matrices. When set, B matrices use learningRate * loraPlusLrRatio while A matrices use the base learning rate.

      Parameters:
      loraPlusLrRatio - The learning rate multiplier for LoRA+ B matrices relative to A matrices. When set, B matrices use learningRate * loraPlusLrRatio while A matrices use the base learning rate.
      Returns:
      Returns a reference to this object so that method calls can be chained together.