mattertune.configs.finetune.loss

class mattertune.configs.finetune.loss.HuberLossConfig(*, name='huber', delta=1.0, reduction='mean')[source]
Parameters:
  • name (Literal['huber'])

  • delta (float)

  • reduction (Literal['mean', 'sum'])

name: Literal['huber']
delta: float

The threshold value for the Huber loss function.

reduction: Literal['mean', 'sum']

How to reduce the loss values across the batch.

  • "mean": The mean of the loss values.

  • "sum": The sum of the loss values.

class mattertune.configs.finetune.loss.L2MAELossConfig(*, name='l2_mae', reduction='mean')[source]
Parameters:
  • name (Literal['l2_mae'])

  • reduction (Literal['mean', 'sum'])

name: Literal['l2_mae']
reduction: Literal['mean', 'sum']

How to reduce the loss values across the batch.

  • "mean": The mean of the loss values.

  • "sum": The sum of the loss values.

class mattertune.configs.finetune.loss.MAELossConfig(*, name='mae', reduction='mean')[source]
Parameters:
  • name (Literal['mae'])

  • reduction (Literal['mean', 'sum'])

name: Literal['mae']
reduction: Literal['mean', 'sum']

How to reduce the loss values across the batch.

  • "mean": The mean of the loss values.

  • "sum": The sum of the loss values.

class mattertune.configs.finetune.loss.MSELossConfig(*, name='mse', reduction='mean')[source]
Parameters:
  • name (Literal['mse'])

  • reduction (Literal['mean', 'sum'])

name: Literal['mse']
reduction: Literal['mean', 'sum']

How to reduce the loss values across the batch.

  • "mean": The mean of the loss values.

  • "sum": The sum of the loss values.