code: def get_multi_weights_row(self, prefix: str, quantize: str):
      if quantize == "gptq":
          use_exllama = True
          bits, groupsize, desc_act = self._get_gptq_params()
  
          if bits != 4:
              use_exllama = False
  
          if desc_act:
              log_once(
                  logger.warning,
                  "Disabling exllama because desc_act=True",
              )
              use_exllama = False
  
          if self.process_group.size() > 1:
              g_idx = self.get_tensor(f"{prefix}.g_idx")
              if g_idx is not None:
                  if (
                      not torch.equal(
                          g_idx.cpu(),
                          torch.tensor(
                              [
                                  i // groupsize
                                  for i in range(g_idx.shape[0])
                              ],
                              dtype=torch.int32,
                          ),
                      )
                      and not (g_idx == 0).all()
                  ):
                      # Exllama implementation does not support row tensor parallelism with act-order, as
                      # it would require to reorder input activations that are split unto several GPUs
                      use_exllama = False
  
          try:
              qweight = self.get_sharded(f"{prefix}.qweight", dim=0)
          except RuntimeError:
              raise RuntimeError(
                  "Cannot load `gptq` weight, make sure the model is already quantized, or quantize it with `text-generation-server quantize ORIGINAL_MODEL_ID NEW_MODEL_ID`"
              )
  
          from text_generation_server.utils.layers import (
              HAS_EXLLAMA,
              CAN_EXLLAMA,
          )
  
          if use_exllama:
              if not HAS_EXLLAMA:
                  if CAN_EXLLAMA:
                      log_once(
                          logger.warning,
                          "Exllama GPTQ cuda kernels (which are faster) could have been used, but are not currently installed, try using BUILD_EXTENSIONS=True",
                      )
                  use_exllama = False
              else:
                  log_once(
                      logger.info,
                      f"Using exllama kernels v{HAS_EXLLAMA}",
                  )
  
          g_idx = self.get_sharded(f"{prefix}.g_idx", dim=0)
  
          if use_exllama and groupsize != -1:
              qzeros = self.get_sharded(f"{prefix}.qzeros", dim=0)
              scales = self.get_sharded(f"{prefix}.scales", dim=0)
          else:
              qzeros = self.get_tensor(f"{prefix}.qzeros")
              scales = self.get_tensor(f"{prefix}.scales")
  
          if use_exllama:
              g_idx = g_idx - g_idx[0]
  
          weight = (
              qweight,
              qzeros,
              scales,
              g_idx,
              bits,
              groupsize,
              use_exllama,
          )
      elif quantize == "awq":
          bits, groupsize, _ = self._get_gptq_params()
  
          try:
              qweight = self.get_sharded(f"{prefix}.qweight", dim=0)
          except RuntimeError:
              raise RuntimeError(
                  "Cannot load `awq` weight, make sure the model is already quantized"
              )
  
          qzeros = self.get_sharded(f"{prefix}.qzeros", dim=0)
          scales = self.get_sharded(f"{prefix}.scales", dim=0)
          g_idx = None
          use_exllama = False
  
          weight = (
              qweight,
              qzeros,
              scales,
              g_idx,
              bits,
              groupsize,
              use_exllama,
          )
      else:
          weight = self.get_sharded(f"{prefix}.weight", dim=1)
      return weight
  
imports: import os
  from pathlib import Path
  from typing import List, Dict, Optional, Tuple
  from safetensors import safe_open, SafetensorError
  import torch
  from loguru import logger
  from huggingface_hub import hf_hub_download
  import json
  from text_generation_server.utils.log import log_once
label_desc: Use image node_id 13 for calling the Weights obj's underlying member method code with example usage: obj.get_multi_weights_row(prefix, quantize) and returns: weight