class_docstr: An LLM engine that receives requests and generates texts.
  
  This is the main class for the vLLM engine. It receives requests
  from clients and generates texts from the LLM. It includes a tokenizer, a
  language model (possibly distributed across multiple GPUs), and GPU memory
  space allocated for intermediate states (aka KV cache). This class utilizes
  iteration-level scheduling and efficient memory management to maximize the
  serving throughput.
  
  The `LLM` class wraps this class for offline batched inference and the
  `AsyncLLMEngine` class wraps this class for online serving.
  
  NOTE: The config arguments are derived from the `EngineArgs` class. For the
  comprehensive list of arguments, see `EngineArgs`.
  
  Args:
      model_config: The configuration related to the LLM model.
      cache_config: The configuration related to the KV cache memory
          management.
      parallel_config: The configuration related to distributed execution.
      scheduler_config: The configuration related to the request scheduler.
      distributed_init_method: The initialization method for distributed
          execution. See `torch.distributed.init_process_group` for details.
      placement_group: Ray placement group for distributed execution.
          Required for distributed execution.
      log_stats: Whether to log statistics.
code: def __init__(
      self,
      model_config: ModelConfig,
      # parallel_config: ParallelConfig,
      scheduler_config: SchedulerConfig,
      # distributed_init_method: str,
      # placement_group,
      log_stats: bool,
  ) -> None:
      # bigdl-llm change start
      # summary: removing parallel_config and related checks.
      # distributed_init_method/placement_group is related to these configs
      # so they are removed too.
      logger.info(
          "Initializing an LLM engine with config: "
          f"model={model_config.model!r}, "
          f"tokenizer={model_config.tokenizer!r}, "
          f"tokenizer_mode={model_config.tokenizer_mode}, "
          f"revision={model_config.revision}, "
          f"tokenizer_revision={model_config.tokenizer_revision}, "
          f"trust_remote_code={model_config.trust_remote_code}, "
          f"dtype={model_config.dtype}, "
          f"max_seq_len={model_config.max_model_len}, "
          f"download_dir={model_config.download_dir!r}, "
          f"load_format={model_config.load_format}, "
          # f"tensor_parallel_size={parallel_config.tensor_parallel_size}, "
          f"quantization={model_config.quantization}, "
          f"seed={model_config.seed})"
      )
      # TODO(woosuk): Print more configs in debug mode.
  
      self.model_config = model_config
      # self.parallel_config = parallel_config
      self.scheduler_config = scheduler_config
      self.log_stats = log_stats
      self.kv_cache = [
          [dict(), dict()]
          for _ in range(model_config.hf_config.num_hidden_layers)
      ]
      # self._verify_args()
  
      self.tokenizer = get_tokenizer(
          model_config.tokenizer,
          tokenizer_mode=model_config.tokenizer_mode,
          trust_remote_code=model_config.trust_remote_code,
          tokenizer_revision=model_config.tokenizer_revision,
          revision=model_config.revision,
      )
      self.seq_counter = Counter()
  
      # Create the parallel GPU workers.
      self._init_workers()
  
      # Co(gc): we create a fixed scheduler
      self.scheduler = FixedWindowScheduler(
          scheduler_config, kv_cache=self.kv_cache
      )
  
      # Logging.
      self.last_logging_time = 0.0
      # List of (timestamp, num_tokens)
      self.num_prompt_tokens: List[Tuple[float, int]] = []
      # List of (timestamp, num_tokens)
      self.num_generation_tokens: List[Tuple[float, int]] = []
  
imports: import time
  from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Tuple, Union, Dict
  from bigdl.llm.vllm.config import ModelConfig, SchedulerConfig
  from bigdl.llm.vllm.core.scheduler import SchedulerOutputs, FixedWindowScheduler
  from bigdl.llm.vllm.engine.arg_utils import EngineArgs
  from bigdl.llm.vllm.logger import init_logger
  from bigdl.llm.vllm.outputs import RequestOutput
  from bigdl.llm.vllm.sampling_params import SamplingParams
  from bigdl.llm.vllm.sequence import SamplerOutput, Sequence, SequenceGroup, SequenceGroupMetadata, SequenceStatus, SequenceOutputs
  from bigdl.llm.vllm.transformers_utils.tokenizer import get_tokenizer, detokenize_incrementally
  from bigdl.llm.vllm.utils import Counter
  from bigdl.llm.utils.common import invalidInputError
label_desc: Use image node_id 1 to create a new LLMEngine object  with example: obj = LLMEngine(model_config, scheduler_config, log_stats)