Knowledgator Docs
GitHubDiscord
  • 🛎️Welcome
  • ⚙️Models
    • 🧮Comprehend-it
      • Comprehend_it-base
      • Comprehend_it-multilingual-t5-base
    • 🦎UTC
  • 👷Frameworks
    • 💧LiqFit
      • Quick Start
      • Benchmarks
      • API Reference
        • Collators
          • NLICollator
          • Creating custom collator
        • Datasets
          • NLIDataset
        • Losses
          • Focal Loss
          • Binary Cross Entropy
          • Cross Entropy Loss
        • Modeling
          • LiqFitBackbone
          • LiqFitModel
        • Downstream Heads
          • LiqFitHead
          • LabelClassificationHead
          • ClassClassificationHead
          • ClassificationHead
        • Pooling
          • GlobalMaxPooling1D
          • GlobalAbsAvgPooling1D
          • GlobalAbsMaxPooling1D
          • GlobalRMSPooling1D
          • GlobalSumPooling1D
          • GlobalAvgPooling1D
          • FirstTokenPooling1D
        • Models
          • Deberta
          • T5
        • Pipelines
          • ZeroShotClassificationPipeline
  • 📚Datasets
    • Biotech news dataset
  • 👩‍🔧Support
  • API Reference
    • Comprehend-it API
    • Entity extraction
      • /fast
      • /deterministic
      • /advanced
    • Token searcher
    • Web2Meaning
    • Web2Meaning2
    • Relation extraction
    • Text2Table
      • /web2text
      • /text_preprocessing
      • /text2table
      • /merge_tables
Powered by GitBook
On this page
  1. Frameworks
  2. LiqFit
  3. API Reference
  4. Models

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)
PreviousDebertaNextPipelines

Last updated 1 year ago

👷
💧