class_docstr: Builds modules of an NLLB model as described in
  :cite:t:`https://doi.org/10.48550/arxiv.2207.04672`.
  
  To tweak the architecture, you can derive from this class and override the
  corresponding methods.
class_docstr_tok: ["Builds","modules","of","an","NLLB","model","as","described","in",":","cite",":","t",":","`","https",":","\/\/doi.org\/10.48550\/arxiv.2207.04672","`",".","To","tweak","the","architecture",",","you","can","derive","from","this","class","and","override","the","corresponding","methods","."]
docstr: Build a model.
docstr_tok: ["Build","a","model","."]
code: def build_model(self) -> TransformerModel:
      """Build a model."""
      embed = self.build_embedding()
  
      frontend = self.build_frontend(embed)
  
      encoder = self.build_encoder()
      decoder = self.build_decoder()
  
      final_proj = TiedProjection(embed.weight, bias=None)
  
      return TransformerModel(
          frontend,
          encoder,
          frontend,
          decoder,
          final_proj,
          self.config.vocab_info,
      )
  
imports: from dataclasses import dataclass
  from functools import partial
  from typing import List, Optional, Tuple
  from torch.distributed.fsdp.wrap import transformer_auto_wrap_policy
  from fairseq2.data import VocabularyInfo
  from fairseq2.gang import Gang
  from fairseq2.models.transformer import TransformerEmbeddingFrontend, TransformerFrontend, TransformerModel
  from fairseq2.models.utils import ArchitectureRegistry
  from fairseq2.nn.embedding import Embedding, StandardEmbedding, init_scaled_embedding
  from fairseq2.nn.fsdp import FSDPWrapPolicy
  from fairseq2.nn.position_encoder import SinusoidalPositionEncoder
  from fairseq2.nn.projection import TiedProjection
  from fairseq2.nn.transformer import FeedForwardNetwork, MultiheadAttention, StandardFeedForwardNetwork, StandardMultiheadAttention, StandardTransformerDecoder, StandardTransformerDecoderLayer, StandardTransformerEncoder, StandardTransformerEncoderLayer, TransformerDecoder, TransformerDecoderLayer, TransformerEncoder, TransformerEncoderLayer, TransformerNormOrder, create_default_sdpa
  from fairseq2.typing import DataType, Device
label_desc: Use image node_id 2 for calling the NllbBuilder obj's underlying member method code with example usage: obj.build_model() and returns: TransformerModel