code: def __init__(
      self,
      ggml_model,
      data,
      cfg,
      params_override=None,
      vocab_override=None,
      special_vocab=None,
  ):
      hp = ggml_model.hyperparameters
      self.model = ggml_model
      self.data = data
      self.cfg = cfg
      self.params_override = params_override
      self.vocab_override = vocab_override
      self.special_vocab = special_vocab
      if params_override is not None:
          n_kv_head = params_override.n_head_kv
      else:
          if cfg.gqa == 1:
              n_kv_head = hp.n_head
          else:
              gqa = float(cfg.gqa)
              n_kv_head = None
              for x in range(1, 256):
                  if float(hp.n_head) / float(x) == gqa:
                      n_kv_head = x
              assert (
                  n_kv_head is not None
              ), "Couldn't determine n_kv_head from GQA param"
              print(
                  f"- Guessed n_kv_head = {n_kv_head} based on GQA {cfg.gqa}"
              )
      self.n_kv_head = n_kv_head
      self.name_map = gguf.get_tensor_name_map(
          gguf.MODEL_ARCH.LLAMA, ggml_model.hyperparameters.n_layer
      )
  
imports: from __future__ import annotations
  import argparse
  import struct
  import sys
  from enum import IntEnum
  from pathlib import Path
  import numpy
  import os
  import gguf
label_desc: Use image node_id 1 to create a new GGMLToGGUF object  with example: obj = GGMLToGGUF(ggml_model, data, cfg, params_override, vocab_override, special_vocab)