code: def load_llm(options, state_dict):
      if "greedy" == options.gen_mode:
          sampling_params = SamplingParams(
              temperature=0.0,
              use_beam_search=False,
              max_tokens=options.max_new_tokens,
          )
      elif "speculative_sample" == options.gen_mode:
          sampling_params = SamplingParams(
              use_speculative_sampling=True,
              max_tokens=options.max_new_tokens,
          )
      else:
          sampling_params = None
  
      llm = LLM(
          model=options.model_name_or_path,
          tokenizer=options.model_name_or_path,
          state_dict=state_dict,
          batch_size=options.batch_size,
      )
      return llm, sampling_params
  
file_path: DeepKE/example/llm/InstructKGC/src/inference_vllm.py
imports: import os
  import json
  import torch
  from dataclasses import dataclass, field
  from transformers import HfArgumentParser
  from peft import PeftModel
  from vllm.sampling_params import SamplingParams
  from utils.prompter import Prompter
  from utils.general_utils import get_model_tokenizer, get_model_name
  from utils.vllm_llm import LLM
label_desc: Use image node_id 1 for calling a global function with example usage: load_llm(options, state_dict) and returns: llm,  sampling_params