class_docstr: The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
  cross-attention is added between the self-attention layers, following the architecture described in `Attention is
  all you need <https://arxiv.org/abs/1706.03762>`__ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
  Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.
class_docstr_tok: ["The","model","can","behave","as","an","encoder","(","with","only","self-attention",")","as","well","as","a","decoder",",","in","which","case","a","layer","of","cross-attention","is","added","between","the","self-attention","layers",",","following","the","architecture","described","in","`","Attention","is","all","you","need","<","https",":","\/\/arxiv.org\/abs\/1706.03762",">","`","__","by","Ashish","Vaswani",",","Noam","Shazeer",",","Niki","Parmar",",","Jakob","Uszkoreit",",","Llion","Jones",",","Aidan","N.","Gomez",",","Lukasz","Kaiser","and","Illia","Polosukhin","."]
code: def __init__(
      self,
      config: BertConfig,
      input_shape: Tuple = (1, 1),
      seed: int = 0,
      dtype: jnp.dtype = jnp.float32,
      **kwargs,
  ):
      module = FlaxPerformerModule(
          vocab_size=config.vocab_size,
          hidden_size=config.hidden_size,
          type_vocab_size=config.type_vocab_size,
          max_length=config.max_position_embeddings,
          num_encoder_layers=config.num_hidden_layers,
          num_heads=config.num_attention_heads,
          head_size=config.hidden_size,
          intermediate_size=config.intermediate_size,
          dropout_rate=config.hidden_dropout_prob,
          hidden_act=config.hidden_act,
      )
  
      super().__init__(
          config,
          module,
          input_shape=input_shape,
          seed=seed,
          dtype=dtype,
      )
  
imports: from typing import Callable, Dict, Tuple
  import numpy
  import flax.linen
  import jax
  import jax.numpy
  from jax.random import PRNGKey
  from modeling_flax_performer_utils import make_fast_softmax_attention
  from transformers.file_utils import add_start_docstrings
  from transformers.modeling_flax_utils import ACT2FN
  from transformers.models.bert.configuration_bert import BertConfig
  from transformers.models.bert.modeling_flax_bert import FlaxBertOnlyMLMHead, FlaxBertPreTrainedModel
  from transformers.utils import logging
label_desc: Use image node_id 2 to create a new FlaxPerformerModel object from inherited base classes: FlaxBertPreTrainedModel with example: obj = FlaxPerformerModel(config, input_shape, seed, dtype)