class_docstr: Model for causal language modeling problem type.
class_docstr_tok: ["Model","for","causal","language","modeling","problem","type","."]
code: def generate(self, batch: Dict, cfg: Any, streamer=None):
      if cfg.environment.use_deepspeed and cfg.training.lora:
          return generate(
              self.backbone.base_model.model, batch, cfg, streamer
          )
      else:
          return generate(self.backbone, batch, cfg, streamer)
  
file_path: h2o-llmstudio/llm_studio/src/models/text_causal_language_modeling_model.py
imports: import logging
  from typing import Any, Dict
  from torch import nn
  from transformers import AutoModelForCausalLM
  from llm_studio.src.metrics.text_causal_language_modeling_metrics import Perplexity
  from llm_studio.src.utils.data_utils import batch_padding
  from llm_studio.src.utils.modeling_utils import create_nlp_backbone, generate, prepare_lora
label_desc: Use image node_id 3 for calling the Model obj's underlying member method code with example usage: obj.generate(batch, cfg, streamer) and returns: generate, generate