docstr: Will save the model, so you can reload it using `from_pretrained()`.
  
  Will only save from the main process.
docstr_tok: ["Will","save","the","model",",","so","you","can","reload","it","using","`","from_pretrained","(",")","`",".","Will","only","save","from","the","main","process","."]
code: def save_model(
      self,
      output_dir: Optional[str] = None,
      _internal_call: bool = False,
  ):
      """
      Will save the model, so you can reload it using `from_pretrained()`.
  
      Will only save from the main process.
      """
      if output_dir is None:
          output_dir = self.args.output_dir
  
      self._save(output_dir)
  
imports: import torch
  import torch.nn
  from dataclasses import dataclass, field
  from typing import Union, List, Dict, Tuple, Any, Optional
  from torch.cuda.amp import autocast
  from transformers import Seq2SeqTrainer, Seq2SeqTrainingArguments
  from transformers.trainer_pt_utils import LabelSmoother
  from transformers.trainer import *
  from ..seq2seq.constraint_decoder import get_constraint_decoder
label_desc: Use image node_id 6 for calling the ConstraintSeq2SeqTrainer obj's underlying member method code with example usage: obj.save_model(output_dir, _internal_call) without return types