T5
class T5ConfigWithLoss
(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: T5 model configuration.
class T5ForZeroShotClassification
(config: DebertaConfigWithLoss)Parameters:
config (DebertaConfigWithLoss): Deberta model configuration.
Using T5 Model:
from liqfit.models.t5 import T5ConfigWithLoss, T5ForZeroShotClassification
config = T5ConfigWithLoss(loss_type="focal_loss", **rest_of_deberta_config)
model = T5ForZeroShotClassification(config)
Last updated