Implementation source code for AutoModelForSeq2SeqLM

This is probally a source code tracing problem.

I was using AutoModelForSeq2SeqLM for summarization task, and I want to know the Transformers implemention detail of the AutoModelForSeq2SeqLM model, from base model(e.g. BART, T5) output.

For example, for BertForSequenceClassification, I want to find the source code like below: (from src/transformers/models/bert.py)

class BertForSequenceClassification(BertPreTrainedModel):
    def __init__(self, config):
        super().__init__(config)
        self.num_labels = config.num_labels
        self.config = config

        self.bert = BertModel(config)
        self.dropout = nn.Dropout(config.hidden_dropout_prob)
        self.classifier = nn.Linear(config.hidden_size, config.num_labels)

        self.init_weights()

I tried search for AutoModelForSeq2SeqLM on github, but I can’t find something similar.

I tried finding from src/transformers/models/t5.py(also bart.py), the most similar thing is T5ForConditionalGeneration, but I can’t find the where AutoModelForSeq2SeqLM connect with T5ForConditionalGeneration.

Thank you for your help!