This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from transformers import ElectraForMaskedLM, ElectraForPreTraining | |
from transformers.models.electra.modeling_electra import ElectraForPreTrainingOutput | |
from torch import Tensor | |
import torch.nn.functional as F | |
import torch.nn as nn | |
import torch | |
class ElectraModel(nn.Module): | |
def __init__(self, |