code: def quantize(
      model_id: str,
      output_dir: str,
      revision: Optional[str] = None,
      logger_level: str = "INFO",
      json_output: bool = False,
      trust_remote_code: bool = False,
      upload_to_model_id: Optional[str] = None,
      percdamp: float = 0.01,
      act_order: bool = False,
  ):
      if revision is None:
          revision = "main"
      download_weights(
          model_id=model_id,
          revision=revision,
          logger_level=logger_level,
          json_output=json_output,
      )
      from text_generation_server.utils.gptq.quantize import quantize
  
      quantize(
          model_id=model_id,
          bits=4,
          groupsize=128,
          output_dir=output_dir,
          revision=revision,
          trust_remote_code=trust_remote_code,
          upload_to_model_id=upload_to_model_id,
          percdamp=percdamp,
          act_order=act_order,
      )
  
file_path: text-generation-inference/server/text_generation_server/cli.py
imports: import os
  import sys
  import typer
  from pathlib import Path
  from loguru import logger
  from typing import Optional
  from enum import Enum
  from huggingface_hub import hf_hub_download
label_desc: Use image node_id 3 for calling a global function with example usage: quantize(model_id, output_dir, revision, logger_level, json_output, trust_remote_code, upload_to_model_id, percdamp, act_order) without return types