Deberta

class DebertaConfigWithLoss

(loss_type = "focal_loss", focal_loss_alpha=0.5, focal_loss_gamma=2.0, **kwargs)

Parameters:

  • loss_type (str): Loss function that will be called if labels are passed.

  • focal_loss_alpha (float, optional): Weighting factor between 0 and 1. (Defaults to 0.5).

  • focal_loss_gamma (float, optional): Focusing parameter gamma >= 0. (Defaults to 2.0).

  • **kwargs: Deberta model configuration.

class DebertaV2ForZeroShotClassification

(config: DebertaConfigWithLoss)

Parameters:

  • config (DebertaConfigWithLoss): Deberta model configuration.

Using Deberta Model:

from liqfit.models.deberta import DebertaConfigWithLoss, DebertaV2ForZeroShotClassification
config = DebertaConfigWithLoss(loss_type="focal_loss", **rest_of_deberta_config)
model = DebertaV2ForZeroShotClassification(config)

Last updated