gptq

Quantize large language models to 4-bit precision using the GPTQ algorithm.

11.5k|842|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill gptq-orchestra-research
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gptq
Source: https://github.com/Orchestra-Research/AI-Research-SKILLs/tree/main/10-optimization/gptq
Command: npx skills add https://github.com/Orchestra-Research/AI-Research-SKILLs --skill gptq-orchestra-research

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires auto-gptq, transformers, optimum, peft, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of deploying large language models (LLMs) on hardware with limited memory, such as consumer GPUs, by significantly reducing their memory footprint with minimal accuracy loss.

Core Features & Use Cases

  • 4-bit Quantization: Compresses LLMs to 4-bit precision using the GPTQ algorithm, enabling larger models to fit on smaller GPUs.
  • Memory Reduction: Achieves up to 4x memory savings compared to FP16 models.
  • Fast Inference: Provides significant speedups (3-4x) for model inference.
  • Accuracy Preservation: Maintains minimal accuracy degradation (<2% perplexity loss).
  • Use Case: Deploying a 70B parameter LLM on a single RTX 4090 GPU for real-time text generation tasks, which would be impossible with FP16 precision.

Quick Start

Use the gptq skill to load the pre-quantized model 'TheBloke/Llama-2-7B-Chat-GPTQ' onto your CUDA device.

Frequently Asked Questions about gptq

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compress a large language model for deployment on consumer GPUs?

4-bit quantization compresses large language models for consumer GPUs by reducing memory usage up to 4x and increasing inference speed 3-4x using the GPTQ algorithm. This allows deploying 70B parameter models on single RTX 4090 GPUs.

What is GPTQ 4-bit quantization and when should I use it for LLM optimization?

GPTQ 4-bit quantization is a post-training technique that compresses LLMs to 4-bit precision with minimal accuracy loss. Use it when deploying large models on hardware with limited memory, achieving up to 4x memory savings with under 2% perplexity loss.

Can I use Hugging Face transformers and PEFT to fine-tune quantized models?

Yes, GPTQ quantized models support integration with Hugging Face transformers and PEFT for fine-tuning on consumer GPUs. This allows you to load pre-quantized models like TheBloke/Llama-2-7B-Chat-GPTQ directly onto CUDA devices for further training.

Does GPTQ quantization work with auto-gptq and optimum libraries for inference?

GPTQ quantization works with auto-gptq, transformers, and optimum libraries for both quantization and deployment. These dependencies provide the framework to perform post-training 4-bit compression and execute fast inference on CUDA-enabled hardware.

What are the limitations of 4-bit quantization for large language models?

The primary limitation of 4-bit quantization is a slight accuracy degradation, specifically less than 2% perplexity loss compared to FP16 models. Despite this minor trade-off, it enables fitting significantly larger models onto limited consumer GPU memory.