class_docstr: Generator based on a Hugging Face model.
  This component provides an interface to generate text using a Hugging Face model that runs locally.
  
  Usage example:
  ```python
  from haystack.components.generators import HuggingFaceLocalGenerator
  
  generator = HuggingFaceLocalGenerator(model="google/flan-t5-large",
                                        task="text2text-generation",
                                        generation_kwargs={
                                          "max_new_tokens": 100,
                                          "temperature": 0.9,
                                          })
  
  print(generator.run("Who is the best American actor?"))
  # {'replies': ['John Cusack']}
  ```
code: def warm_up(self):
      if self.pipeline is None:
          self.pipeline = pipeline(**self.huggingface_pipeline_kwargs)
  
      if self.stop_words and self.stopping_criteria_list is None:
          stop_words_criteria = StopWordsCriteria(
              tokenizer=self.pipeline.tokenizer,
              stop_words=self.stop_words,
              device=self.pipeline.device,
          )
          self.stopping_criteria_list = StoppingCriteriaList(
              [stop_words_criteria]
          )
  
file_path: haystack/haystack/components/generators/hugging_face_local.py
imports: import logging
  from typing import Any, Dict, List, Literal, Optional, Union
  from haystack import component, default_to_dict, default_from_dict
  from haystack.components.generators.hf_utils import StopWordsCriteria
  from haystack.lazy_imports import LazyImport
label_desc: Use image node_id 3 for calling the HuggingFaceLocalGenerator obj's underlying member method code with example usage: obj.warm_up() without return types