docstr: Load gguf model and tokenizer and convert it to bigdl-llm model and huggingface tokenzier
  
  :param fpath: Path to gguf model file
  :param optimize_model: Whether to further optimize llm model, defaults to True
  :param cpu_embedding: Whether to replace the Embedding layer, may need to set it
      to `True` when running BigDL-LLM on GPU on Windows, defaults to False
  
  :return: An optimized bigdl-llm model and a huggingface tokenizer
docstr_tok: ["Load","gguf","model","and","tokenizer","and","convert","it","to","bigdl-llm","model","and","huggingface","tokenzier",":","param","fpath",":","Path","to","gguf","model","file",":","param","optimize_model",":","Whether","to","further","optimize","llm","model",",","defaults","to","True",":","param","cpu_embedding",":","Whether","to","replace","the","Embedding","layer",",","may","need","to","set","it","to","`","True","`","when","running","BigDL-LLM","on","GPU","on","Windows",",","defaults","to","False",":","return",":","An","optimized","bigdl-llm","model","and","a","huggingface","tokenizer"]
code: def from_gguf(
      fpath: str,
      optimize_model: bool = True,
      cpu_embedding: bool = False,
  ):
      """
      Load gguf model and tokenizer and convert it to bigdl-llm model and huggingface tokenzier
  
      :param fpath: Path to gguf model file
      :param optimize_model: Whether to further optimize llm model, defaults to True
      :param cpu_embedding: Whether to replace the Embedding layer, may need to set it
          to `True` when running BigDL-LLM on GPU on Windows, defaults to False
  
      :return: An optimized bigdl-llm model and a huggingface tokenizer
      """
      from bigdl.llm.optimize import optimize_model as optimize_model_fn
  
      model, tokenizer, low_bit = load_gguf_model(
          fpath, dtype=torch.half
      )
      model = optimize_model_fn(
          model,
          low_bit=low_bit,
          optimize_llm=optimize_model,
          cpu_embedding=cpu_embedding,
      )
      return model, tokenizer
  
imports: import transformers
  from transformers.configuration_utils import PretrainedConfig
  from .utils import extract_local_archive_file, load_state_dict, get_local_shard_files
  from bigdl.llm.ggml.quantize import ggml_tensor_qtype
  from bigdl.llm.utils.common import invalidInputError
  from bigdl.llm.transformers.gguf.api import load_gguf_model
  import torch
  import warnings
  import copy
  from .utils import logger
label_desc: Use image node_id 2 for calling the _BaseAutoModelClass obj's underlying member method code with example usage: obj.from_gguf(fpath, optimize_model, cpu_embedding) and returns: model,  tokenizer