diff --git a/finetune/modeling_cpt.py b/finetune/modeling_cpt.py index 0ed7cc6..ebbd714 100644 --- a/finetune/modeling_cpt.py +++ b/finetune/modeling_cpt.py @@ -828,6 +828,7 @@ def __init__(self, config: CPTConfig): intermediate_size=config.encoder_ffn_dim, hidden_dropout_prob=config.activation_dropout, attention_probs_dropout_prob=config.attention_dropout, + max_position_embeddings=config.max_position_embeddings, ) config.vocab_size = encoder_config.vocab_size self.encoder = BertModel(encoder_config, add_pooling_layer=False)