text stringlengths 31 243k | type stringclasses 1
value | start int64 36 275k | end int64 286 280k | depth int64 0 1 | filepath stringlengths 85 188 | parent_class stringclasses 3
values | class_index int64 0 10.8k |
|---|---|---|---|---|---|---|---|
class FlaxWav2Vec2ForCTCModule(nn.Module):
config: Wav2Vec2Config
dtype: jnp.dtype = jnp.float32
def setup(self):
self.wav2vec2 = FlaxWav2Vec2Module(self.config, dtype=self.dtype)
self.dropout = nn.Dropout(rate=self.config.final_dropout)
self.lm_head = nn.Dense(
self.con... | class_definition | 45,525 | 48,007 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/wav2vec2/modeling_flax_wav2vec2.py | null | 6,400 |
class FlaxWav2Vec2ForCTC(FlaxWav2Vec2PreTrainedModel):
module_class = FlaxWav2Vec2ForCTCModule | class_definition | 48,178 | 48,276 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/wav2vec2/modeling_flax_wav2vec2.py | null | 6,401 |
class FlaxWav2Vec2ForPreTrainingModule(nn.Module):
config: Wav2Vec2Config
dtype: jnp.dtype = jnp.float32
def setup(self):
self.wav2vec2 = FlaxWav2Vec2Module(self.config, dtype=self.dtype)
self.dropout_features = nn.Dropout(self.config.feat_quantizer_dropout)
self.quantizer = FlaxWa... | class_definition | 49,602 | 53,275 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/wav2vec2/modeling_flax_wav2vec2.py | null | 6,402 |
class FlaxWav2Vec2ForPreTraining(FlaxWav2Vec2PreTrainedModel):
module_class = FlaxWav2Vec2ForPreTrainingModule
@add_start_docstrings_to_model_forward(WAV_2_VEC_2_INPUTS_DOCSTRING)
# overwrite since has `gumbel_temperature` input
def __call__(
self,
input_values,
attention_mask=N... | class_definition | 53,390 | 55,314 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/wav2vec2/modeling_flax_wav2vec2.py | null | 6,403 |
class Wav2Vec2Config(PretrainedConfig):
r"""
This is the configuration class to store the configuration of a [`Wav2Vec2Model`]. It is used to instantiate an
Wav2Vec2 model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a ... | class_definition | 843 | 20,044 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/wav2vec2/configuration_wav2vec2.py | null | 6,404 |
class Wav2Vec2CTCTokenizerOutput(ModelOutput):
"""
Output type of [` Wav2Vec2CTCTokenizer`], with transcription.
Args:
text (list of `str` or `str`):
Decoded logits in text from. Usually the speech transcription.
char_offsets (list of `List[Dict[str, Union[int, str]]]` or `List[... | class_definition | 3,621 | 4,679 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/wav2vec2/tokenization_wav2vec2.py | null | 6,405 |
class Wav2Vec2CTCTokenizer(PreTrainedTokenizer):
"""
Constructs a Wav2Vec2CTC tokenizer.
This tokenizer inherits from [`PreTrainedTokenizer`] which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.
Args:
vocab_file (`str`):... | class_definition | 4,682 | 27,410 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/wav2vec2/tokenization_wav2vec2.py | null | 6,406 |
class Wav2Vec2Tokenizer(PreTrainedTokenizer):
"""
Constructs a Wav2Vec2 tokenizer.
This tokenizer inherits from [`PreTrainedTokenizer`] which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.
Args:
vocab_file (`str`):
... | class_definition | 27,413 | 38,740 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/wav2vec2/tokenization_wav2vec2.py | null | 6,407 |
class FastSpeech2ConformerTokenizer(PreTrainedTokenizer):
"""
Construct a FastSpeech2Conformer tokenizer.
Args:
vocab_file (`str`):
Path to the vocabulary file.
bos_token (`str`, *optional*, defaults to `"<sos/eos>"`):
The begin of sequence token. Note that for FastS... | class_definition | 971 | 6,218 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/tokenization_fastspeech2_conformer.py | null | 6,408 |
class FastSpeech2ConformerModelOutput(ModelOutput):
"""
Output type of [`FastSpeech2ConformerModel`].
Args:
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
Spectrogram generation loss.
spectrogram (`torch.FloatTensor` of shape `(batch_... | class_definition | 1,242 | 4,781 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,409 |
class FastSpeech2ConformerWithHifiGanOutput(FastSpeech2ConformerModelOutput):
"""
Output type of [`FastSpeech2ConformerWithHifiGan`].
Args:
waveform (`torch.FloatTensor` of shape `(batch_size, audio_length)`):
Speech output as a result of passing the predicted mel spectrogram through th... | class_definition | 4,795 | 8,024 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,410 |
class FastSpeech2ConformerDurationPredictor(nn.Module):
"""
Duration predictor module.
This is a module of duration predictor described in the paper 'FastSpeech: Fast, Robust and Controllable Text to
Speech' https://arxiv.org/pdf/1905.09263.pdf The duration predictor predicts a duration of each frame i... | class_definition | 12,773 | 15,193 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,411 |
class FastSpeech2ConformerBatchNormConvLayer(nn.Module):
def __init__(self, config, layer_id=0):
super().__init__()
if layer_id == 0:
in_conv_dim = config.num_mel_bins
else:
in_conv_dim = config.speech_decoder_postnet_units
if layer_id == config.speech_decod... | class_definition | 15,284 | 16,626 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,412 |
class FastSpeech2ConformerSpeechDecoderPostnet(nn.Module):
def __init__(self, config):
super().__init__()
self.config = config
self.feat_out = nn.Linear(config.hidden_size, config.num_mel_bins * config.reduction_factor)
self.layers = nn.ModuleList(
[FastSpeech2ConformerBa... | class_definition | 16,629 | 17,503 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,413 |
class FastSpeech2ConformerPredictorLayer(nn.Module):
def __init__(self, input_channels, num_chans, kernel_size, dropout_rate):
super().__init__()
self.conv = nn.Conv1d(
input_channels,
num_chans,
kernel_size,
stride=1,
padding=(kernel_size ... | class_definition | 17,506 | 18,416 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,414 |
class FastSpeech2ConformerVariancePredictor(nn.Module):
def __init__(
self,
config: FastSpeech2ConformerConfig,
num_layers=2,
num_chans=384,
kernel_size=3,
dropout_rate=0.5,
):
"""
Initilize variance predictor module.
Args:
inp... | class_definition | 18,419 | 20,498 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,415 |
class FastSpeech2ConformerVarianceEmbedding(nn.Module):
def __init__(
self,
in_channels=1,
out_channels=384,
kernel_size=1,
padding=0,
dropout_rate=0.0,
):
super().__init__()
self.conv = nn.Conv1d(
in_channels=in_channels,
o... | class_definition | 20,501 | 21,247 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,416 |
class FastSpeech2ConformerAttention(nn.Module):
"""
Multi-Head attention layer with relative position encoding. Details can be found in
https://github.com/espnet/espnet/pull/2816. Paper: https://arxiv.org/abs/1901.02860.
"""
def __init__(self, config: FastSpeech2ConformerConfig, module_config):
... | class_definition | 21,250 | 26,773 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,417 |
class FastSpeech2ConformerConvolutionModule(nn.Module):
def __init__(self, config: FastSpeech2ConformerConfig, module_config):
super().__init__()
# kernel_size should be an odd number for 'SAME' padding
channels = config.hidden_size
kernel_size = module_config["kernel_size"]
... | class_definition | 26,776 | 28,473 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,418 |
class FastSpeech2ConformerEncoderLayer(nn.Module):
def __init__(self, config: FastSpeech2ConformerConfig, module_config):
super().__init__()
# self-attention module definition
self.self_attn = FastSpeech2ConformerAttention(config, module_config)
# feed-forward module definition
... | class_definition | 28,476 | 33,418 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,419 |
class FastSpeech2ConformerMultiLayeredConv1d(nn.Module):
"""
Multi-layered conv1d for Transformer block.
This is a module of multi-layered conv1d designed to replace positionwise feed-forward network in Transformer
block, which is introduced in 'FastSpeech: Fast, Robust and Controllable Text to Speech'... | class_definition | 33,421 | 35,356 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,420 |
class FastSpeech2ConformerRelPositionalEncoding(nn.Module):
"""
Args:
Relative positional encoding module (new implementation). Details can be found in
https://github.com/espnet/espnet/pull/2816. See : Appendix Batch in https://arxiv.org/abs/1901.02860
config (`FastSpeech2ConformerConfig`):
... | class_definition | 35,359 | 38,844 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,421 |
class FastSpeech2ConformerEncoder(nn.Module):
"""
FastSpeech2ConformerEncoder encoder module.
Args:
config (`FastSpeech2ConformerConfig`):
FastSpeech2ConformerConfig instance.
module_config (`dict`):
Dictionary containing the encoder or decoder module configuration f... | class_definition | 38,847 | 42,994 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,422 |
class FastSpeech2ConformerLoss(nn.Module):
def __init__(self, config: FastSpeech2ConformerConfig):
super().__init__()
use_masking = config.use_masking
use_weighted_masking = config.use_weighted_masking
if use_masking and use_weighted_masking:
raise ValueError("Either us... | class_definition | 42,997 | 48,664 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,423 |
class FastSpeech2ConformerPreTrainedModel(PreTrainedModel):
"""
An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.
"""
config_class = FastSpeech2ConformerConfig
base_model_prefix = "fastspeech2_conformer"
main_input_name... | class_definition | 48,667 | 50,039 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,424 |
class FastSpeech2ConformerModel(FastSpeech2ConformerPreTrainedModel):
"""
FastSpeech 2 module.
This is a module of FastSpeech 2 described in 'FastSpeech 2: Fast and High-Quality End-to-End Text to Speech'
https://arxiv.org/abs/2006.04558. Instead of quantized pitch and energy, we use token-averaged val... | class_definition | 50,149 | 64,194 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,425 |
class HifiGanResidualBlock(nn.Module):
def __init__(self, channels, kernel_size=3, dilation=(1, 3, 5), leaky_relu_slope=0.1):
super().__init__()
self.leaky_relu_slope = leaky_relu_slope
self.convs1 = nn.ModuleList(
[
nn.Conv1d(
channels,
... | class_definition | 64,279 | 66,408 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,426 |
class FastSpeech2ConformerHifiGan(PreTrainedModel):
config_class = FastSpeech2ConformerHifiGanConfig
main_input_name = "spectrogram"
def __init__(self, config: FastSpeech2ConformerHifiGanConfig):
super().__init__(config)
self.num_kernels = len(config.resblock_kernel_sizes)
self.num_... | class_definition | 66,607 | 71,586 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,427 |
class FastSpeech2ConformerWithHifiGan(PreTrainedModel):
config_class = FastSpeech2ConformerWithHifiGanConfig
def __init__(self, config: FastSpeech2ConformerWithHifiGanConfig):
super().__init__(config)
self.model = FastSpeech2ConformerModel(config.model_config)
self.vocoder = FastSpeech... | class_definition | 71,796 | 77,856 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/modeling_fastspeech2_conformer.py | null | 6,428 |
class FastSpeech2ConformerConfig(PretrainedConfig):
r"""
This is the configuration class to store the configuration of a [`FastSpeech2ConformerModel`]. It is used to
instantiate a FastSpeech2Conformer model according to the specified arguments, defining the model architecture.
Instantiating a configurat... | class_definition | 822 | 17,183 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/configuration_fastspeech2_conformer.py | null | 6,429 |
class FastSpeech2ConformerHifiGanConfig(PretrainedConfig):
r"""
This is the configuration class to store the configuration of a [`FastSpeech2ConformerHifiGanModel`]. It is used to
instantiate a FastSpeech2Conformer HiFi-GAN vocoder model according to the specified arguments, defining the model
architect... | class_definition | 17,186 | 21,480 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/configuration_fastspeech2_conformer.py | null | 6,430 |
class FastSpeech2ConformerWithHifiGanConfig(PretrainedConfig):
"""
This is the configuration class to store the configuration of a [`FastSpeech2ConformerWithHifiGan`]. It is used to
instantiate a `FastSpeech2ConformerWithHifiGanModel` model according to the specified sub-models configurations,
defining ... | class_definition | 21,483 | 24,509 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/fastspeech2_conformer/configuration_fastspeech2_conformer.py | null | 6,431 |
class SiglipTextConfig(PretrainedConfig):
r"""
This is the configuration class to store the configuration of a [`SiglipTextModel`]. It is used to instantiate a
Siglip text encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will ... | class_definition | 783 | 5,171 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/configuration_siglip.py | null | 6,432 |
class SiglipVisionConfig(PretrainedConfig):
r"""
This is the configuration class to store the configuration of a [`SiglipVisionModel`]. It is used to instantiate a
Siglip vision encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults... | class_definition | 5,174 | 8,734 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/configuration_siglip.py | null | 6,433 |
class SiglipConfig(PretrainedConfig):
r"""
[`SiglipConfig`] is the configuration class to store the configuration of a [`SiglipModel`]. It is used to
instantiate a Siglip model according to the specified arguments, defining the text model and vision model configs.
Instantiating a configuration with the ... | class_definition | 8,737 | 11,875 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/configuration_siglip.py | null | 6,434 |
class SiglipVisionModelOutput(ModelOutput):
"""
Base class for vision model's outputs that also contains image embeddings of the pooling of the last hidden states.
Args:
image_embeds (`torch.FloatTensor` of shape `(batch_size, output_dim)` *optional* returned when model is initialized with `with_pr... | class_definition | 5,443 | 7,229 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,435 |
class SiglipTextModelOutput(ModelOutput):
"""
Base class for text model's outputs that also contains a pooling of the last hidden states.
Args:
text_embeds (`torch.FloatTensor` of shape `(batch_size, output_dim)` *optional* returned when model is initialized with `with_projection=True`):
... | class_definition | 7,334 | 9,091 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,436 |
class SiglipOutput(ModelOutput):
"""
Args:
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `return_loss` is `True`):
Contrastive loss for image-text similarity.
logits_per_image (`torch.FloatTensor` of shape `(image_batch_size, text_batch_size)`):
The... | class_definition | 9,187 | 11,059 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,437 |
class SiglipVisionEmbeddings(nn.Module):
def __init__(self, config: SiglipVisionConfig):
super().__init__()
self.config = config
self.embed_dim = config.hidden_size
self.image_size = config.image_size
self.patch_size = config.patch_size
self.patch_embedding = nn.Conv... | class_definition | 11,062 | 14,290 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,438 |
class SiglipTextEmbeddings(nn.Module):
def __init__(self, config: SiglipTextConfig):
super().__init__()
embed_dim = config.hidden_size
self.token_embedding = nn.Embedding(config.vocab_size, embed_dim)
self.position_embedding = nn.Embedding(config.max_position_embeddings, embed_dim)
... | class_definition | 14,383 | 15,965 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,439 |
class SiglipAttention(nn.Module):
"""Multi-headed attention from 'Attention Is All You Need' paper"""
# Copied from transformers.models.clip.modeling_clip.CLIPAttention.__init__
def __init__(self, config):
super().__init__()
self.config = config
self.embed_dim = config.hidden_size
... | class_definition | 15,968 | 19,395 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,440 |
class SiglipFlashAttention2(SiglipAttention):
"""
SiglipAttention flash attention module. This module inherits from `SiglipAttention` as the weights of the module stays
untouched. The only required change would be on the forward pass where it needs to correctly call the public API of
flash attention and... | class_definition | 19,398 | 23,947 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,441 |
class SiglipSdpaAttention(SiglipAttention):
"""
Siglip attention module using torch.nn.functional.scaled_dot_product_attention. This module inherits from
`SiglipAttention` as the weights of the module stays untouched. The only changes are on the forward pass to adapt to
SDPA API.
"""
is_causal ... | class_definition | 23,950 | 27,283 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,442 |
class SiglipMLP(nn.Module):
def __init__(self, config):
super().__init__()
self.config = config
self.activation_fn = ACT2FN[config.hidden_act]
self.fc1 = nn.Linear(config.hidden_size, config.intermediate_size)
self.fc2 = nn.Linear(config.intermediate_size, config.hidden_size)... | class_definition | 27,509 | 28,081 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,443 |
class SiglipEncoderLayer(nn.Module):
def __init__(self, config: SiglipConfig):
super().__init__()
self.embed_dim = config.hidden_size
self.self_attn = SIGLIP_ATTENTION_CLASSES[config._attn_implementation](config=config)
self.layer_norm1 = nn.LayerNorm(self.embed_dim, eps=config.layer... | class_definition | 28,084 | 29,986 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,444 |
class SiglipPreTrainedModel(PreTrainedModel):
"""
An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
models.
"""
config_class = SiglipConfig
base_model_prefix = "siglip"
supports_gradient_checkpointing = True
_no_split_modul... | class_definition | 29,989 | 32,823 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,445 |
class SiglipEncoder(nn.Module):
"""
Transformer encoder consisting of `config.num_hidden_layers` self attention layers. Each layer is a
[`SiglipEncoderLayer`].
Args:
config: SiglipConfig
"""
def __init__(self, config: SiglipConfig):
super().__init__()
self.config = conf... | class_definition | 38,771 | 42,654 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,446 |
class SiglipTextTransformer(nn.Module):
def __init__(self, config: SiglipTextConfig):
super().__init__()
self.config = config
embed_dim = config.hidden_size
self.embeddings = SiglipTextEmbeddings(config)
self.encoder = SiglipEncoder(config)
self.final_layer_norm = nn.... | class_definition | 42,657 | 45,710 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,447 |
class SiglipTextModel(SiglipPreTrainedModel):
config_class = SiglipTextConfig
def __init__(self, config: SiglipTextConfig):
super().__init__(config)
self.text_model = SiglipTextTransformer(config)
# Initialize weights and apply final processing
self.post_init()
def get_inpu... | class_definition | 45,843 | 48,030 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,448 |
class SiglipVisionTransformer(nn.Module):
def __init__(self, config: SiglipVisionConfig):
super().__init__()
self.config = config
embed_dim = config.hidden_size
self.embeddings = SiglipVisionEmbeddings(config)
self.encoder = SiglipEncoder(config)
self.post_layernorm ... | class_definition | 48,033 | 50,379 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,449 |
class SiglipMultiheadAttentionPoolingHead(nn.Module):
"""Multihead Attention Pooling."""
def __init__(self, config: SiglipVisionConfig):
super().__init__()
self.probe = nn.Parameter(torch.randn(1, 1, config.hidden_size))
self.attention = torch.nn.MultiheadAttention(config.hidden_size, ... | class_definition | 50,382 | 51,256 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,450 |
class SiglipVisionModel(SiglipPreTrainedModel):
config_class = SiglipVisionConfig
main_input_name = "pixel_values"
def __init__(self, config: SiglipVisionConfig):
super().__init__(config)
self.vision_model = SiglipVisionTransformer(config)
# Initialize weights and apply final proc... | class_definition | 51,391 | 53,481 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,451 |
class SiglipModel(SiglipPreTrainedModel):
config_class = SiglipConfig
def __init__(self, config: SiglipConfig):
super().__init__(config)
if not isinstance(config.text_config, SiglipTextConfig):
raise TypeError(
"config.text_config is expected to be of type SiglipTex... | class_definition | 53,530 | 63,688 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,452 |
class SiglipForImageClassification(SiglipPreTrainedModel):
main_input_name = "pixel_values"
def __init__(self, config: SiglipConfig) -> None:
super().__init__(config)
self.num_labels = config.num_labels
# Create the vision model with proper attention
# and take only vision_mod... | class_definition | 63,929 | 69,273 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/modeling_siglip.py | null | 6,453 |
class SiglipProcessor(ProcessorMixin):
r"""
Constructs a Siglip processor which wraps a Siglip image processor and a Siglip tokenizer into a single processor.
[`SiglipProcessor`] offers all the functionalities of [`SiglipImageProcessor`] and [`SiglipTokenizer`]. See the
[`~SiglipProcessor.__call__`] an... | class_definition | 972 | 7,301 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/processing_siglip.py | null | 6,454 |
class SiglipImageProcessor(BaseImageProcessor):
r"""
Constructs a SigLIP image processor.
Args:
do_resize (`bool`, *optional*, defaults to `True`):
Whether to resize the image's (height, width) dimensions to the specified `size`. Can be overridden by
`do_resize` in the `prep... | class_definition | 1,385 | 11,915 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/image_processing_siglip.py | null | 6,455 |
class SiglipTokenizer(PreTrainedTokenizer):
"""
Construct a Siglip tokenizer. Based on [SentencePiece](https://github.com/google/sentencepiece).
This tokenizer inherits from [`PreTrainedTokenizer`] which contains most of the main methods. Users should refer to
this superclass for more information regar... | class_definition | 1,224 | 15,951 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/siglip/tokenization_siglip.py | null | 6,456 |
class MoonshineEncoderMLP(nn.Module):
def __init__(self, config, hidden_act):
super().__init__()
self.config = config
self.activation_fn = ACT2FN[hidden_act]
self.fc1 = nn.Linear(config.hidden_size, config.intermediate_size)
self.fc2 = nn.Linear(config.intermediate_size, conf... | class_definition | 2,446 | 3,033 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,457 |
class MoonshineDecoderMLP(nn.Module):
def __init__(self, config, hidden_act):
super().__init__()
self.config = config
self.activation_fn = ACT2FN[hidden_act]
self.fc1 = nn.Linear(config.hidden_size, config.intermediate_size * 2)
self.fc2 = nn.Linear(config.intermediate_size, ... | class_definition | 3,036 | 3,695 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,458 |
class MoonshineAttention(nn.Module):
"""Multi-headed attention from 'Attention Is All You Need' paper"""
def __init__(
self,
config: MoonshineConfig,
layer_idx: int,
is_causal: bool,
num_attention_heads: int,
num_key_value_heads: int,
):
super().__ini... | class_definition | 7,575 | 12,934 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,459 |
class MoonshineRotaryEmbedding(nn.Module):
def __init__(self, config: MoonshineConfig, device=None):
super().__init__()
# BC: "rope_type" was originally "type"
if hasattr(config, "rope_scaling") and config.rope_scaling is not None:
self.rope_type = config.rope_scaling.get("rope_t... | class_definition | 12,937 | 16,140 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,460 |
class MoonshineEncoderLayer(nn.Module):
def __init__(self, config: MoonshineConfig, layer_idx: int):
super().__init__()
self.hidden_size = config.hidden_size
self.self_attn = MoonshineAttention(
config=config,
layer_idx=layer_idx,
is_causal=False,
... | class_definition | 16,143 | 18,437 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,461 |
class MoonshineDecoderLayer(nn.Module):
def __init__(self, config: MoonshineConfig, layer_idx: int = None):
super().__init__()
self.hidden_size = config.hidden_size
self.self_attn = MoonshineAttention(
config=config,
layer_idx=layer_idx,
is_causal=True,
... | class_definition | 18,440 | 22,008 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,462 |
class MoonshinePreTrainedModel(PreTrainedModel):
config_class = MoonshineConfig
base_model_prefix = "model"
main_input_name = "input_values"
supports_gradient_checkpointing = True
_no_split_modules = ["MoonshineEncoderLayer", "MoonshineDecoderLayer"]
_supports_flash_attn_2 = True
_supports_s... | class_definition | 23,046 | 24,343 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,463 |
class MoonshineEncoder(MoonshinePreTrainedModel):
"""
Transformer encoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MoonshineEncoderLayer`]
Args:
config: MoonshineConfig
"""
main_input_name = "input_values"
def __init__(self, config: MoonshineConfig):
... | class_definition | 24,346 | 30,104 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,464 |
class MoonshineDecoder(MoonshinePreTrainedModel):
"""
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MoonshineDecoderLayer`]
Args:
config: MoonshineConfig
"""
main_input_name = "input_ids"
def __init__(self, config: MoonshineConfig):
sup... | class_definition | 34,920 | 47,102 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,465 |
class MoonshineModel(MoonshinePreTrainedModel):
def __init__(self, config: MoonshineConfig):
super().__init__(config)
self.encoder = MoonshineEncoder(config)
self.decoder = MoonshineDecoder(config)
# Initialize weights and apply final processing
self.post_init()
def get... | class_definition | 58,286 | 65,556 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,466 |
class MoonshineForConditionalGeneration(MoonshinePreTrainedModel, GenerationMixin):
_tied_weights_keys = ["proj_out.weight"]
def __init__(self, config: MoonshineConfig):
super().__init__(config)
self.model = MoonshineModel(config)
self.proj_out = nn.Linear(config.hidden_size, config.voc... | class_definition | 66,326 | 72,363 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modeling_moonshine.py | null | 6,467 |
class MoonshineConfig(PretrainedConfig):
r"""
This is the configuration class to store the configuration of a [`MoonshineModel`]. It is used to instantiate a Moonshine
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield ... | class_definition | 1,550 | 13,141 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/configuration_moonshine.py | null | 6,468 |
class MoonshineConfig(PretrainedConfig):
r"""
This is the configuration class to store the configuration of a [`MoonshineModel`]. It is used to instantiate a Moonshine
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield ... | class_definition | 1,828 | 13,419 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,469 |
class MoonshineEncoderMLP(nn.Module):
def __init__(self, config, hidden_act):
super().__init__()
self.config = config
self.activation_fn = ACT2FN[hidden_act]
self.fc1 = nn.Linear(config.hidden_size, config.intermediate_size)
self.fc2 = nn.Linear(config.intermediate_size, conf... | class_definition | 13,422 | 14,009 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,470 |
class MoonshineDecoderMLP(nn.Module):
def __init__(self, config, hidden_act):
super().__init__()
self.config = config
self.activation_fn = ACT2FN[hidden_act]
self.fc1 = nn.Linear(config.hidden_size, config.intermediate_size * 2)
self.fc2 = nn.Linear(config.intermediate_size, ... | class_definition | 14,012 | 14,671 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,471 |
class MoonshineAttention(GlmAttention):
def __init__(
self,
config: MoonshineConfig,
layer_idx: int,
is_causal: bool,
num_attention_heads: int,
num_key_value_heads: int,
):
config.update({"num_attention_heads": num_attention_heads, "num_key_value_heads": n... | class_definition | 14,674 | 19,073 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,472 |
class MoonshineRotaryEmbedding(GlmRotaryEmbedding):
pass | class_definition | 19,076 | 19,136 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,473 |
class MoonshineEncoderLayer(LlamaDecoderLayer):
def __init__(self, config: MoonshineConfig, layer_idx: int):
super().__init__(config, layer_idx)
self.self_attn = MoonshineAttention(
config=config,
layer_idx=layer_idx,
is_causal=False,
num_attention_he... | class_definition | 19,139 | 19,812 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,474 |
class MoonshineDecoderLayer(nn.Module):
def __init__(self, config: MoonshineConfig, layer_idx: int = None):
super().__init__()
self.hidden_size = config.hidden_size
self.self_attn = MoonshineAttention(
config=config,
layer_idx=layer_idx,
is_causal=True,
... | class_definition | 19,815 | 23,383 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,475 |
class MoonshinePreTrainedModel(PreTrainedModel):
config_class = MoonshineConfig
base_model_prefix = "model"
main_input_name = "input_values"
supports_gradient_checkpointing = True
_no_split_modules = ["MoonshineEncoderLayer", "MoonshineDecoderLayer"]
_supports_flash_attn_2 = True
_supports_s... | class_definition | 24,421 | 25,718 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,476 |
class MoonshineEncoder(MoonshinePreTrainedModel):
"""
Transformer encoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MoonshineEncoderLayer`]
Args:
config: MoonshineConfig
"""
main_input_name = "input_values"
def __init__(self, config: MoonshineConfig):
... | class_definition | 25,721 | 31,479 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,477 |
class MoonshineDecoder(LlamaModel):
main_input_name = "input_ids"
def __init__(self, config: MoonshineConfig):
super().__init__(config)
self.norm = nn.LayerNorm(config.hidden_size, bias=False)
self.layers = nn.ModuleList(
[MoonshineDecoderLayer(config, idx) for idx in range(... | class_definition | 31,482 | 37,120 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,478 |
class MoonshineModel(WhisperModel):
@add_start_docstrings_to_model_forward(MOONSHINE_MODEL_INPUTS_DOCSTRING)
@replace_return_docstrings(output_type=Seq2SeqModelOutput, config_class=_CONFIG_FOR_DOC)
def forward(
self,
input_values: Optional[torch.FloatTensor] = None,
attention_mask: O... | class_definition | 43,173 | 47,632 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,479 |
class MoonshineForConditionalGeneration(MoonshinePreTrainedModel, GenerationMixin):
_tied_weights_keys = ["proj_out.weight"]
def __init__(self, config: MoonshineConfig):
super().__init__(config)
self.model = MoonshineModel(config)
self.proj_out = nn.Linear(config.hidden_size, config.voc... | class_definition | 47,795 | 53,832 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/moonshine/modular_moonshine.py | null | 6,480 |
class ColPaliProcessorKwargs(ProcessingKwargs, total=False):
_defaults = {
"text_kwargs": {
"padding": "longest",
},
"images_kwargs": {
"data_format": "channels_first",
"do_convert_rgb": True,
},
"common_kwargs": {"return_tensors": "pt"},
... | class_definition | 1,228 | 1,552 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/colpali/modular_colpali.py | null | 6,481 |
class ColPaliProcessor(PaliGemmaProcessor):
r"""
Constructs a ColPali processor which wraps a PaliGemmaProcessor and special methods to process images and queries, as
well as to compute the late-interaction retrieval score.
[`ColPaliProcessor`] offers all the functionalities of [`PaliGemmaProcessor`]. ... | class_definition | 1,555 | 15,846 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/colpali/modular_colpali.py | null | 6,482 |
class ColPaliConfig(PretrainedConfig):
r"""
Configuration class to store the configuration of a [`ColPaliForRetrieval`]. It is used to instantiate an instance
of `ColPaliForRetrieval` according to the specified arguments, defining the model architecture following the methodology
from the "ColPali: Effic... | class_definition | 821 | 4,486 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/colpali/configuration_colpali.py | null | 6,483 |
class ColPaliProcessorKwargs(ProcessingKwargs, total=False):
_defaults = {
"text_kwargs": {
"padding": "longest",
},
"images_kwargs": {
"data_format": "channels_first",
"do_convert_rgb": True,
},
"common_kwargs": {"return_tensors": "pt"},
... | class_definition | 1,825 | 2,149 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/colpali/processing_colpali.py | null | 6,484 |
class ColPaliProcessor(ProcessorMixin):
r"""
Constructs a ColPali processor which wraps a PaliGemmaProcessor and special methods to process images and queries, as
well as to compute the late-interaction retrieval score.
[`ColPaliProcessor`] offers all the functionalities of [`PaliGemmaProcessor`]. See ... | class_definition | 3,796 | 20,362 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/colpali/processing_colpali.py | null | 6,485 |
class ColPaliPreTrainedModel(PreTrainedModel):
config_class = ColPaliConfig
base_model_prefix = "model"
_no_split_modules = []
def _init_weights(self, module):
std = (
self.config.initializer_range
if hasattr(self.config, "initializer_range")
else self.config... | class_definition | 2,140 | 2,921 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/colpali/modeling_colpali.py | null | 6,486 |
class ColPaliForRetrievalOutput(ModelOutput):
"""
Base class for ColPali embeddings output.
Args:
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
Language modeling loss (for next-token prediction).
embeddings (`torch.FloatTensor` of sh... | class_definition | 2,935 | 5,423 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/colpali/modeling_colpali.py | null | 6,487 |
class ColPaliForRetrieval(ColPaliPreTrainedModel):
def __init__(self, config: ColPaliConfig):
super().__init__(config)
self.config = config
self.vocab_size = config.vlm_config.text_config.vocab_size
vlm = AutoModelForImageTextToText.from_config(config.vlm_config)
if vlm.lang... | class_definition | 8,695 | 13,394 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/colpali/modeling_colpali.py | null | 6,488 |
class FlaxPegasusAttention(nn.Module):
config: PegasusConfig
embed_dim: int
num_heads: int
dropout: float = 0.0
causal: bool = False
bias: bool = True
dtype: jnp.dtype = jnp.float32 # the dtype of the computation
def setup(self) -> None:
self.head_dim = self.embed_dim // self.n... | class_definition | 12,327 | 19,726 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,489 |
class FlaxPegasusEncoderLayer(nn.Module):
config: PegasusConfig
dtype: jnp.dtype = jnp.float32
def setup(self) -> None:
self.embed_dim = self.config.d_model
self.self_attn = FlaxPegasusAttention(
config=self.config,
embed_dim=self.embed_dim,
num_heads=sel... | class_definition | 19,831 | 22,121 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,490 |
class FlaxPegasusEncoderLayerCollection(nn.Module):
config: PegasusConfig
dtype: jnp.dtype = jnp.float32 # the dtype of the computation
def setup(self):
self.layers = [
FlaxPegasusEncoderLayer(self.config, name=str(i), dtype=self.dtype)
for i in range(self.config.encoder_la... | class_definition | 22,232 | 24,192 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,491 |
class FlaxPegasusDecoderLayer(nn.Module):
config: PegasusConfig
dtype: jnp.dtype = jnp.float32
def setup(self) -> None:
self.embed_dim = self.config.d_model
self.self_attn = FlaxPegasusAttention(
config=self.config,
embed_dim=self.embed_dim,
num_heads=sel... | class_definition | 24,297 | 27,855 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,492 |
class FlaxPegasusDecoderLayerCollection(nn.Module):
config: PegasusConfig
dtype: jnp.dtype = jnp.float32 # the dtype of the computation
def setup(self):
self.layers = [
FlaxPegasusDecoderLayer(self.config, name=str(i), dtype=self.dtype)
for i in range(self.config.decoder_la... | class_definition | 27,966 | 30,692 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,493 |
class FlaxPegasusEncoder(nn.Module):
config: PegasusConfig
embed_tokens: nn.Embed
dtype: jnp.dtype = jnp.float32 # the dtype of the computation
def setup(self):
self.dropout_layer = nn.Dropout(rate=self.config.dropout)
embed_dim = self.config.d_model
self.padding_idx = self.co... | class_definition | 30,695 | 33,308 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,494 |
class FlaxPegasusDecoder(nn.Module):
config: PegasusConfig
embed_tokens: nn.Embed
dtype: jnp.dtype = jnp.float32 # the dtype of the computation
def setup(self):
self.dropout_layer = nn.Dropout(rate=self.config.dropout)
embed_dim = self.config.d_model
self.padding_idx = self.co... | class_definition | 33,311 | 36,279 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,495 |
class FlaxPegasusModule(nn.Module):
config: PegasusConfig
dtype: jnp.dtype = jnp.float32 # the dtype of the computation
def setup(self):
self.shared = nn.Embed(
self.config.vocab_size,
self.config.d_model,
embedding_init=jax.nn.initializers.normal(self.config.in... | class_definition | 36,374 | 38,823 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,496 |
class FlaxPegasusPreTrainedModel(FlaxPreTrainedModel):
config_class = PegasusConfig
base_model_prefix: str = "model"
module_class: nn.Module = None
def __init__(
self,
config: PegasusConfig,
input_shape: Tuple[int] = (1, 1),
seed: int = 0,
dtype: jnp.dtype = jnp.... | class_definition | 38,826 | 53,173 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,497 |
class FlaxPegasusModel(FlaxPegasusPreTrainedModel):
config: PegasusConfig
dtype: jnp.dtype = jnp.float32 # the dtype of the computation
module_class = FlaxPegasusModule | class_definition | 53,335 | 53,516 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,498 |
class FlaxPegasusForConditionalGenerationModule(nn.Module):
config: PegasusConfig
dtype: jnp.dtype = jnp.float32
bias_init: Callable[..., jnp.ndarray] = jax.nn.initializers.zeros
def setup(self):
self.model = FlaxPegasusModule(config=self.config, dtype=self.dtype)
self.lm_head = nn.Dens... | class_definition | 53,746 | 56,342 | 0 | /Users/nielsrogge/Documents/python_projecten/transformers/src/transformers/models/pegasus/modeling_flax_pegasus.py | null | 6,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.