class_docstr: NMTModel Class
  Currently TransformerLMDecoder is the only LM decoder implemented
  
  Args:
      decoder (onmt.decoders.TransformerLMDecoder): a transformer decoder
class_docstr_tok: ["NMTModel","Class","Currently","TransformerLMDecoder","is","the","only","LM","decoder","implemented","Args",":","decoder","(","onmt.decoders.TransformerLMDecoder",")",":","a","transformer","decoder"]
docstr: A LanguageModel forward the src side to the decoder along
  with the source lengths vector. It is a decoder only LM (cf GPT-2)
docstr_tok: ["A","LanguageModel","forward","the","src","side","to","the","decoder","along","with","the","source","lengths","vector",".","It","is","a","decoder","only","LM","(","cf","GPT-2",")"]
code: def forward(self, src, tgt, src_len, bptt=False, with_align=False):
      """A LanguageModel forward the src side to the decoder along
      with the source lengths vector. It is a decoder only LM (cf GPT-2)
      """
  
      if not bptt:
          self.decoder.init_state()
      dec_out, attns = self.decoder(
          src, enc_out=None, src_len=src_len, with_align=with_align
      )
      return dec_out, attns
  
imports: import torch
  import torch.nn
  from glob import glob
label_desc: Use image node_id 2 for calling the LanguageModel obj's underlying member method code with example usage: obj.forward(src, tgt, src_len, bptt, with_align) and returns: dec_out,  attns