class_docstr: Multi-layer BiLSTM model for language detecting. A recreation of "A reproduction of Apple's bi-directional LSTM models
  for language identification in short strings." (Toftrup et al 2021)
  
  Arxiv: https://arxiv.org/abs/2102.06282
  GitHub: https://github.com/AU-DIS/LSTM_langid
  
  This class is similar to https://github.com/AU-DIS/LSTM_langid/blob/main/src/LSTMLID.py
docstr: Load a serialized model located at path 
code: def load(cls, path, device=None, batch_size=64, lang_subset=None):
      """Load a serialized model located at path"""
      if path is None:
          raise FileNotFoundError(
              "Trying to load langid model, but path not specified!  Try --load_name"
          )
      if not os.path.exists(path):
          raise FileNotFoundError(
              "Trying to load langid model from path which does not exist: %s"
              % path
          )
      checkpoint = torch.load(path, map_location=torch.device("cpu"))
      weights = checkpoint["model_state_dict"]["loss_train.weight"]
      model = cls(
          checkpoint["char_to_idx"],
          checkpoint["tag_to_idx"],
          checkpoint["num_layers"],
          checkpoint["embedding_dim"],
          checkpoint["hidden_dim"],
          batch_size=batch_size,
          weights=weights,
          lang_subset=lang_subset,
      )
      model.load_state_dict(checkpoint["model_state_dict"])
      model = model.to(device)
      model.build_lang_mask(device)
      return model
  
file_path: stanza/stanza/models/langid/model.py
imports: import os
  import torch
  import torch.nn
label_desc: Use image node_id 7 for calling the LangIDBiLSTM obj's underlying member method code with example usage: obj.load(cls, path, device, batch_size, lang_subset) and returns: model