gptq
Post-training 4-bit quantization for LLMs with minimal accuracy loss.
Skill by Orchestra-Research
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/orchestra-research-gptq
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/gptq
What's inside
- Skill name
gptq- Description
- Post-training 4-bit quantization for LLMs with minimal accuracy loss. Use for deploying large models (70B, 405B) on consumer GPUs, when you need 4× memory reduction with <2% perplexity degradation, or for faster inference (3-4× speedup) vs FP16. Integrates with transformers and PEFT for QLoRA fine-tuning.
- License
- MIT
- Instructions
- 442 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- calibration.md · references/
- integration.md · references/
- troubleshooting.md · references/
SKILL.md (first lines)
# GPTQ (Generative Pre-trained Transformer Quantization)
Post-training quantization method that compresses LLMs to 4-bit with minimal accuracy loss using group-wise quantization.
## When to use GPTQ
**Use GPTQ when:**
- Need to fit large models (70B+) on limited GPU memory
- Want 4× memory reduction with <2% accuracy loss
- Deploying on consumer GPUs (RTX 4090, 3090)
- Need faster inference (3-4× speedup vs FP16)
**Use AWQ instead when:**
- Need slightly better accuracy (<1% loss)
- Have newer GPUs (Ampere, Ada)
- Want Marlin kernel support (2× faster on some GPUs)
**Use bitsandbytes instead when:**
- Need simple integration with transformers
- Want 8-bit quantization (less compression, better quality)
- Don't need pre-quantized model files
## Quick start
### Installation
```bash
# Install AutoGPTQ
pip install auto-gptq
# With Triton (Linux only, faster)
pip install auto-gptq[triton]
# With CUDA extensions (faster)
pip install auto-gptq --no-build-isolation
# Full installation
pip install auto-gptq transformers accelerate
```
### Load pre-quantized model
```python
from transformers import AutoTokenizer
from auto_gptq import AutoGPTQForCausalLM
# Load quantized model from HuggingFace
model_name = "TheBloke/Llama-2-7B-Chat-GPTQ"
model = AutoGPTQForCausalLM.from_quantized(
model_name,
device="cuda:0",
use_triton=False # Set True on Linux for speed
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Generate
prompt = "Explain quantum computing"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda:0")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0]))
```
### Quantize your own model
```python
from transformers import AutoTokenizer
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
from datasets import load_dataset
# Load model
model_name = "meta-llama/Llama-2-7b-chat-hf"
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Quantization config
quantize_config = BaseQuantizeConfig(
bits=4, # 4-bit quantization
group_size=128, # Group size (recommended: 128)
desc_act=False, # Activation order (False for CUDA kernel)
damp_percent=0.01 # Dampening factor
)
# Load model for quantization
model = AutoGPTQForCausalLM.from_pretrained(
model_name,
quantize_config=quantize_config
)
# Prepare calibration data
dataset = load_dataset("c4", split="train", streaming=True)
calibration_data = [
tokenizer(example["text"])["input_ids"][:512]
for example in dataset.take(128)
]
# Quantize
model.quantize(calibration_data)
# Save quantized model
model.save_quantized("llama-2-7b-gptq")
tokenizer.save_pretrained("llama-2-7b-gptq")
# Push to HuggingFace
model.push_to_hub("username/llama-2-7b-gptq")
```
## Group-wise quantization
**How GPTQ works**:
1. **Group weights**: Divide each weight matrix into groups (typically 128 elements)
2. **Quantize per-group**: Each group has its own scale/zero-point
3. **Minimize error**: Uses Hessian information to minimize quantization error
4. **Result**: 4-bit weights with near-FP16 accuracy
**Group size trade-off**:
| Group Size | Model Size | Accuracy | Speed | Recommendation |
|------------|------------|----------|-------|----------------|From Orchestra-Research/AI-Research-SKILLs, MIT.
More from Orchestra-Research/AI-Research-SKILLs
- 0.686score
pinecone
Orchestra-Research
Managed vector database for production AI applications.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentence-transformers
Orchestra-Research
Framework for state-of-the-art sentence, text, and image embeddings.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
chroma
Orchestra-Research
Open-source embedding database for AI applications.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
faiss
Orchestra-Research
Facebook's library for efficient similarity search and clustering of dense vectors.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-lightning
Orchestra-Research
High-level PyTorch framework with Trainer class, automatic distributed training (DDP/FSDP/DeepSpeed), callbacks system, and minimal boilerplate.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ml-training-recipes
Orchestra-Research
Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentencepiece
Orchestra-Research
Language-independent tokenizer treating text as raw Unicode.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
langchain
Orchestra-Research
Framework for building LLM-powered applications with agents, chains, and RAG.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ray-data
Orchestra-Research
Scalable data processing for ML workloads.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
nemo-curator
Orchestra-Research
GPU-accelerated data curation for LLM training.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-fsdp2
Orchestra-Research
Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
clip
Orchestra-Research
OpenAI's model connecting vision and language.
SkillCFreshness: C★ 13.9KClaude Code +9
Signals
- Stars
- 13,906
- Forks
- 973
- Open issues
- 11
- Last commit (this folder)
- Nov 20, 2025 (11 months ago)
- Last release
- Jun 16, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- orchestra-research.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from Orchestra-Research
- 0.686score
pytorch-lightning
Orchestra-Research
High-level PyTorch framework with Trainer class, automatic distributed training (DDP/FSDP/DeepSpeed), callbacks system, and minimal boilerplate.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
nemo-curator
Orchestra-Research
GPU-accelerated data curation for LLM training.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ray-data
Orchestra-Research
Scalable data processing for ML workloads.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
pytorch-fsdp2
Orchestra-Research
Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
sentencepiece
Orchestra-Research
Language-independent tokenizer treating text as raw Unicode.
SkillCFreshness: C★ 13.9KClaude Code +9 - 0.686score
ml-training-recipes
Orchestra-Research
Battle-tested PyTorch training recipes for all domains — LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics.
SkillCFreshness: C★ 13.9KClaude Code +9
Cite this page
gptq skill. Agent Mart. https://agentmart.dev/skills/orchestra-research-gptq (last updated 2026-10-24)