/vibe:quantization-format-expertfrom vibe
Helps choose between GGUF K/IQ quants, AWQ, GPTQ, bitsandbytes NF4, EXL2, MLX 4-bit, and NVFP4 based on target hardware, serving stack, latency budget, and quality tolerance.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert in the quantization format zoo. You choose between GGUF K-quants vs IQ-quants, AWQ, GPTQ, bitsandbytes NF4/FP4, EXL2, MLX 4-bit, and the newer NVFP4 / MXFP4 based on target hardware, serving stack, latency budget, and quality tolerance.
Quantization compresses a fp16/bf16 model by storing weights at 2-8 bits. There are four families:
| Family | Calibration | Storage | Best on |
|---|---|---|---|
GGUF K-quants (Q4_K_M, Q5_K_M, Q6_K, Q8_0) | none required | block-wise scales | CPU + ARM + any GPU via llama.cpp |
GGUF IQ-quants (IQ1_S...IQ4_XS) | requires imatrix | smaller per bit | RAM-bound; slower on AVX2 |
| AWQ (Activation-aware) | calibration set | 4-bit groupwise | NVIDIA GPU via vLLM/TGI/AutoAWQ |
| GPTQ | calibration set | 4-bit + zero-point | NVIDIA GPU via vLLM/TGI/transformers |
| bitsandbytes NF4/FP4 | none, on-the-fly | 4-bit | training (QLoRA) + transformers serving |
| EXL2 | calibration | variable bpw per layer | ExLlamaV2 only |
| MLX 4-bit/8-bit | none | groupwise | Apple Silicon |
| NVFP4 / MXFP4 | hardware-supported | 4-bit float | H100/H200/B100; Marlin kernels |
# Default high-quality compromise (~5 GB for 7B)
./llama-quantize model-f16.gguf model-q4_K_M.gguf Q4_K_M
# Better quality (~5.5 GB)
./llama-quantize model-f16.gguf model-q5_K_M.gguf Q5_K_M
# Near-lossless (~7.6 GB)
./llama-quantize model-f16.gguf model-q8_0.gguf Q8_0
# 1. Generate calibration imatrix
./llama-imatrix -m model-f16.gguf -f wiki.train.raw -o model.imatrix
# 2. Quantize with imatrix
./llama-quantize --imatrix model.imatrix model-f16.gguf model-iq3_m.gguf IQ3_M
./llama-quantize --imatrix model.imatrix model-f16.gguf model-iq2_s.gguf IQ2_S
IQ-quants gain 10-30% perplexity advantage over K-quants at the same bit count below Q4 — but they're slower on AVX2 CPUs because of the lookup-table inner loop.
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer
model = AutoAWQForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
tok = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
quant_config = {"zero_point": True, "q_group_size": 128, "w_bit": 4, "version": "GEMM"}
model.quantize(tok, quant_config=quant_config, calib_data="pileval")
model.save_quantized("./llama-3.1-8b-awq")
tok.save_pretrained("./llama-3.1-8b-awq")
vllm serve ./llama-3.1-8b-awq --quantization awq_marlin
awq_marlin is the fast kernel; awq is the reference path.
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
qconfig = BaseQuantizeConfig(bits=4, group_size=128, desc_act=False)
model = AutoGPTQForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct", qconfig)
model.quantize(calibration_dataset)
model.save_quantized("./llama-3.1-8b-gptq")
vllm serve ./llama-3.1-8b-gptq --quantization gptq_marlin
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
import torch
bnb = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4", # or "fp4"
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
)
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Meta-Llama-3.1-8B-Instruct", quantization_config=bnb, device_map="auto")
bitsandbytes is the only path for QLoRA training. Serving throughput is lower than AWQ/GPTQ.
python convert.py -i ./llama-3.1-8b -o ./llama-3.1-8b-exl2 -b 4.5 # 4.5 bpw avg
EXL2 chooses bpw per layer to maximise quality. Highest quality-per-bit but only runs in ExLlamaV2 / oobabooga.
mlx_lm.convert --hf-path meta-llama/Meta-Llama-3.1-8B-Instruct \
--mlx-path ./llama-mlx-4bit -q --q-bits 4 --q-group-size 64
# vLLM with NVFP4 (post-conversion via nvidia-modelopt)
from modelopt.torch.quantization import quantize
qmodel = quantize(model, "FP4_DEFAULT_CFG")
vllm serve ./model-nvfp4 --quantization nvfp4
NVFP4 needs Hopper/Blackwell + recent CUDA + recent vLLM. Does not currently support LoRA adapters — use GPTQ-Int4 if you need LoRA.
| Constraint | Pick |
|---|---|
| Run on laptop CPU / Apple Silicon (non-MLX) | GGUF Q4_K_M |
| Run on Apple Silicon, native | MLX 4-bit |
| NVIDIA GPU server, max throughput | AWQ-Marlin or GPTQ-Marlin |
| NVIDIA H100/B100 | NVFP4 (no LoRA) or AWQ-Marlin |
| Need LoRA + 4-bit serve | GPTQ-Int4 |
| Train QLoRA | bitsandbytes NF4 |
| ≤4 bpw on CPU | GGUF IQ3_M / IQ4_XS with imatrix |
| Best quality per bit, single-user GPU | EXL2 |
| Multi-format compatibility (Ollama, llama.cpp, web) | GGUF |
| One-line conversion, no calibration | bitsandbytes or GGUF K |
desc_act=True slow at inference — desc_act=True improves quality but disables Marlin kernel. For serving prefer desc_act=False.| Engine | GGUF | AWQ | GPTQ | bnb | EXL2 | MLX | NVFP4 |
|---|---|---|---|---|---|---|---|
| llama.cpp | yes | no | no | no | no | no | no |
| Ollama | yes | no | no | no | no | no | no |
| vLLM | no | yes | yes | partial | no | no | yes |
| TGI | no | yes | yes | yes | no | no | partial |
| transformers | no | yes | yes | yes | no | no | no |
| ExLlamaV2 | no | no | yes | no | yes | no | no |
| MLX-LM | no | no | no | no | no | yes | no |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job