class_docstr: Language model embeddings.
  
  Arguments:
      hidden_size: hidden size
      vocab_size: vocabulary size
      max_sequence_length: maximum size of sequence. This
                           is used for positional embedding
      embedding_dropout_prob: dropout probability for embeddings
      init_method: weight initialization method
      num_tokentypes: size of the token-type embeddings. 0 value
                      will ignore this embedding
class_docstr_tok: ["Language","model","embeddings",".","Arguments",":","hidden_size",":","hidden","size","vocab_size",":","vocabulary","size","max_sequence_length",":","maximum","size","of","sequence",".","This","is","used","for","positional","embedding","embedding_dropout_prob",":","dropout","probability","for","embeddings","init_method",":","weight","initialization","method","num_tokentypes",":","size","of","the","token-type","embeddings",".","0","value","will","ignore","this","embedding"]
docstr: For easy load.
docstr_tok: ["For","easy","load","."]
code: def state_dict_for_save_checkpoint(self, prefix="", keep_vars=False):
      """For easy load."""
  
      state_dict_ = {}
      state_dict_[
          self._word_embeddings_key
      ] = self.word_embeddings.state_dict(
          prefix=prefix, keep_vars=keep_vars
      )
      if self.add_position_embedding:
          state_dict_[
              self._position_embeddings_key
          ] = self.position_embeddings.state_dict(
              prefix=prefix, keep_vars=keep_vars
          )
      if self.num_tokentypes > 0:
          state_dict_[
              self._tokentype_embeddings_key
          ] = self.tokentype_embeddings.state_dict(
              prefix=prefix, keep_vars=keep_vars
          )
  
      return state_dict_
  
imports: import torch
  import torch.nn.functional
  from megatron import get_args
  from megatron.core import mpu, tensor_parallel
  from megatron.core.enums import ModelType
  from megatron.core.models.common.embeddings.rotary_pos_embedding import RotaryEmbedding
  from .enums import AttnMaskType, LayerType
  from .module import MegatronModule
  from .transformer import ParallelTransformer
  from .utils import get_linear_layer
  from .utils import init_method_normal, scaled_init_method_normal
label_desc: Use image node_id 5 for calling the Embedding obj's underlying member method code with example usage: obj.state_dict_for_save_checkpoint(prefix, keep_vars) and returns: state_dict_