class_docstr: PyTorch implementation containing all the modelling needed for your NLP task. Combines 2 language
  models for representation of 2 sequences and a prediction head. Allows for gradient flow back to the 2 language model components.
class_docstr_tok: ["PyTorch","implementation","containing","all","the","modelling","needed","for","your","NLP","task",".","Combines","2","language","models","for","representation","of","2","sequences","and","a","prediction","head",".","Allows","for","gradient","flow","back","to","the","2","language","model","components","."]
docstr: Saves the 2 language model weights and respective config_files in directories lm1 and lm2 within save_dir.
  
  :param save_dir: path to save to
  :type save_dir: Path
docstr_tok: ["Saves","the","2","language","model","weights","and","respective","config_files","in","directories","lm1","and","lm2","within","save_dir",".",":","param","save_dir",":","path","to","save","to",":","type","save_dir",":","Path"]
code: def save(self, save_dir, lm1_name="lm1", lm2_name="lm2"):
      """
      Saves the 2 language model weights and respective config_files in directories lm1 and lm2 within save_dir.
  
      :param save_dir: path to save to
      :type save_dir: Path
      """
      os.makedirs(save_dir, exist_ok=True)
      if not os.path.exists(Path.joinpath(save_dir, Path(lm1_name))):
          os.makedirs(Path.joinpath(save_dir, Path(lm1_name)))
      if not os.path.exists(Path.joinpath(save_dir, Path(lm2_name))):
          os.makedirs(Path.joinpath(save_dir, Path(lm2_name)))
      self.language_model1.save(Path.joinpath(save_dir, Path(lm1_name)))
      self.language_model2.save(Path.joinpath(save_dir, Path(lm2_name)))
      for i, ph in enumerate(self.prediction_heads):
          logger.info("prediction_head saving")
          ph.save(save_dir, i)
  
imports: import copy
  import json
  import logging
  import os
  from argparse import Namespace
  from pathlib import Path
  import multiprocessing
  import numpy
  import torch
  from torch import nn
  from farm.data_handler.processor import TextSimilarityProcessor
  from farm.data_handler.data_silo import DataSilo
  from farm.modeling.language_model import LanguageModel
  from farm.modeling.prediction_head import PredictionHead, TextSimilarityHead
  from farm.modeling.tokenization import Tokenizer
  from farm.utils import MLFlowLogger, stack
label_desc: Use image node_id 2 for calling the BiAdaptiveModel obj's underlying member method code with example usage: obj.save(save_dir, lm1_name, lm2_name) without return types