check
Check which quantization backends (GGUF, GPTQ, AWQ) are installed, verify PyTorch and transformers availability, and view GPU and RAM details. No arguments required.
Instructions
Check available quantization backends on this system.
Reports which quantization engines (GGUF/GPTQ/AWQ) are installed, whether PyTorch and transformers are available, GPU information (CUDA or Apple MPS), and system RAM.
No arguments required. Lightweight system check.
Returns: Dictionary of available backends and hardware info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp_turboquant/server.py:89-153 (handler)The 'check' tool handler function registered with @mcp.tool(). It calls check_dependencies() and returns available backends (GGUF/GPTQ/AWQ), core dependencies (torch, transformers), and hardware info (platform, GPU, RAM).
@mcp.tool() def check() -> dict[str, Any]: """Check available quantization backends on this system. Reports which quantization engines (GGUF/GPTQ/AWQ) are installed, whether PyTorch and transformers are available, GPU information (CUDA or Apple MPS), and system RAM. No arguments required. Lightweight system check. Returns: Dictionary of available backends and hardware info. """ deps = check_dependencies() backends = { "gguf": { "available": deps.get("gguf", False), "install": "pip install llama-cpp-python", }, "gptq": { "available": deps.get("gptq", False), "install": "pip install auto-gptq datasets", }, "awq": { "available": deps.get("awq", False), "install": "pip install autoawq", }, } hardware = { "platform": deps.get("platform", "unknown"), "arch": deps.get("arch", "unknown"), "system_ram_gb": deps.get("system_ram_gb", 0), } if deps.get("cuda"): hardware["gpu"] = deps.get("gpu_name", "CUDA GPU") hardware["gpu_mem_gb"] = deps.get("gpu_mem_gb", 0) hardware["accelerator"] = "cuda" elif deps.get("mps"): hardware["accelerator"] = "mps" hardware["gpu"] = "Apple Silicon (Metal Performance Shaders)" else: hardware["accelerator"] = "cpu" core = { "torch": { "available": deps.get("torch", False), "version": deps.get("torch_version", None), "install": "pip install torch", }, "transformers": { "available": deps.get("transformers", False), "version": deps.get("transformers_version", None), "install": "pip install transformers", }, } return { "backends": backends, "core_dependencies": core, "hardware": hardware, "server_version": __version__, } - mcp_turboquant/server.py:89-90 (registration)The tool is registered as an MCP tool via the @mcp.tool() decorator on line 89, with the function name 'check'.
@mcp.tool() def check() -> dict[str, Any]: - mcp_turboquant/model_info.py:43-110 (helper)The check_dependencies() helper function that the 'check' tool relies on. It probes for llama.cpp (GGUF), AutoGPTQ, AutoAWQ, transformers, and torch availability, plus CUDA/MPS GPU detection and system RAM.
def check_dependencies() -> dict[str, Any]: """Check which quantization backends are available.""" import shutil available: dict[str, Any] = {} # Check for llama.cpp (GGUF) llama_convert = shutil.which("llama-quantize") or shutil.which("quantize") if llama_convert: available["gguf"] = True else: try: import llama_cpp # noqa: F401 available["gguf"] = True except ImportError: available["gguf"] = False # Check for AutoGPTQ try: import auto_gptq # noqa: F401 available["gptq"] = True except ImportError: available["gptq"] = False # Check for AutoAWQ try: import awq # noqa: F401 available["awq"] = True except ImportError: available["awq"] = False # Check for transformers try: import transformers # noqa: F401 available["transformers"] = True available["transformers_version"] = transformers.__version__ except ImportError: available["transformers"] = False # Check for torch try: import torch available["torch"] = True available["torch_version"] = torch.__version__ available["cuda"] = torch.cuda.is_available() if available["cuda"]: available["gpu_name"] = torch.cuda.get_device_name(0) available["gpu_mem_gb"] = round( torch.cuda.get_device_properties(0).total_mem / 1e9, 1 ) available["mps"] = ( hasattr(torch.backends, "mps") and torch.backends.mps.is_available() ) except ImportError: available["torch"] = False available["cuda"] = False available["mps"] = False available["system_ram_gb"] = get_system_ram_gb() available["platform"] = platform.system() available["arch"] = platform.machine() return available