code: def __init__(
      self,
      vocab_size: int = 30000,
      embed_size: int = 128,
      units: int = 512,
      hidden_size: int = 512,
      inner_size: int = 128,
      max_length: int = 512,
      num_heads: int = 4,
      num_layers: int = 24,
      num_stacked_ffn: int = 4,
      bottleneck_strategy: str = "qk_sharing",
      activation: str = "relu",
      normalization: str = "no_norm",
      hidden_dropout_prob: int = 0.0,
      attention_dropout_prob: int = 0.1,
      num_token_types: int = 2,
      pos_embed_type: str = "learned",
      layer_norm_eps: float = 1e-12,
      embed_initializer: InitializerType = TruncNorm(stdev=0.02),
      weight_initializer: InitializerType = TruncNorm(stdev=0.02),
      bias_initializer: InitializerType = "zeros",
      use_bottleneck=True,
      trigram_embed=True,
      use_pooler=True,
      classifier_activation=False,
      dtype="float32",
      layout="NT",
      compute_layout="auto",
  ):
      super().__init__()
      self._dtype = dtype
      self.use_bottleneck = use_bottleneck
      self.bottleneck_strategy = bottleneck_strategy
      self.trigram_embed = trigram_embed
      self.normalization = normalization
      self.use_pooler = use_pooler
      self.classifier_activation = classifier_activation
      self.pos_embed_type = pos_embed_type
      self.num_token_types = num_token_types
      self.vocab_size = vocab_size
      self.embed_size = embed_size
      self.units = units
      self.hidden_size = hidden_size
      self.max_length = max_length
      self.activation = activation
      self.num_stacked_ffn = num_stacked_ffn
      self.embed_initializer = embed_initializer
      self.weight_initializer = weight_initializer
      self.bias_initializer = bias_initializer
      self.layer_norm_eps = layer_norm_eps
      self._layout = layout
      if compute_layout == "auto" or compute_layout is None:
          self._compute_layout = layout
      else:
          assert compute_layout in ["TN", "NT"]
          self._compute_layout = compute_layout
      # Construct MobileBertTransformer
      self.encoder = MobileBertTransformer(
          units=units,
          hidden_size=hidden_size,
          num_layers=num_layers,
          num_heads=num_heads,
          inner_size=inner_size,
          num_stacked_ffn=num_stacked_ffn,
          bottleneck_strategy=bottleneck_strategy,
          attention_dropout_prob=attention_dropout_prob,
          hidden_dropout_prob=hidden_dropout_prob,
          output_attention=False,
          output_all_encodings=False,
          activation=activation,
          normalization=normalization,
          layer_norm_eps=layer_norm_eps,
          weight_initializer=weight_initializer,
          bias_initializer=bias_initializer,
          dtype=dtype,
          layout=self._compute_layout,
      )
      # Construct word embedding
      self.word_embed = nn.Embedding(
          input_dim=vocab_size,
          output_dim=embed_size,
          weight_initializer=embed_initializer,
          dtype=dtype,
      )
      if trigram_embed or embed_size != units:
          if trigram_embed:
              in_units = 3 * embed_size
          else:
              in_units = embed_size
          self.embed_factorized_proj = nn.Dense(
              units=units,
              in_units=in_units,
              flatten=False,
              weight_initializer=weight_initializer,
              bias_initializer=bias_initializer,
          )
      self.embed_layer_norm = get_norm_layer(
          normalization=normalization,
          in_channels=units,
          epsilon=self.layer_norm_eps,
      )
  
      self.embed_dropout = nn.Dropout(hidden_dropout_prob)
      # Construct token type embedding
      self.token_type_embed = nn.Embedding(
          input_dim=num_token_types,
          output_dim=units,
          weight_initializer=weight_initializer,
          dtype=self._dtype,
      )
      self.token_pos_embed = PositionalEmbedding(
          units=units,
          max_length=max_length,
          dtype=self._dtype,
          method=pos_embed_type,
      )
      if self.use_pooler and self.classifier_activation:
          # Construct pooler
          self.pooler = nn.Dense(
              units=units,
              in_units=units,
              flatten=False,
              activation="tanh",
              dtype=self._dtype,
              weight_initializer=weight_initializer,
              bias_initializer=bias_initializer,
          )
  
imports: import os
  from typing import Tuple, Optional
  import mxnet
  from mxnet import use_np, np, npx
  from mxnet.gluon import HybridBlock, nn
  from .base import BACKBONE_REGISTRY
  from ..op import select_vectors_by_position
  from ..base import get_model_zoo_home_dir, get_repo_model_zoo_url, get_model_zoo_checksum_dir
  from ..layers import InitializerType, PositionwiseFFN, PositionalEmbedding, get_norm_layer, get_activation
  from ..initializer import TruncNorm
  from ..utils.config import CfgNode
  from ..utils.misc import load_checksum_stats, download
  from ..utils.registry import Registry
  from ..attention_cell import MultiHeadAttentionCell, gen_self_attn_mask
  from ..data.tokenizers import HuggingFaceWordPieceTokenizer
label_desc: Use image node_id 1 to create a new MobileBertModel object from inherited base classes: HybridBlock with example: obj = MobileBertModel(vocab_size, embed_size, units, hidden_size, inner_size, max_length, num_heads, num_layers, num_stacked_ffn, bottleneck_strategy, activation, normalization, hidden_dropout_prob, attention_dropout_prob, num_token_types, pos_embed_type, layer_norm_eps, embed_initializer, weight_initializer, bias_initializer, use_bottleneck, trigram_embed, use_pooler, classifier_activation, dtype, layout, compute_layout)