OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add firecrawl/ai-research-skills --skill hqq-quantization
Half-Quadratic Quantization for LLMs without calibration data. Use when quantizing models to 4/3/2-bit precision without needing calibration datasets, for fast quantization workflows, or when deploying with vLLM or HuggingFace Transformers.
npx skills add firecrawl/ai-research-skills --skill hqq-quantization
Fast, calibration-free weight quantization supporting 8/4/3/2/1-bit precision with multiple optimized backends.
Use HQQ when:
Key advantages:
Use alternatives instead:
HQQ uses BaseQuantizeConfig to define quantization parameters:
The core quantized layer that replaces nn.Linear:
HQQ supports multiple inference backends for different hardware:
Backend selection guide:
| Backend | Best For | Requirements |
|---|---|---|
| pytorch | Compatibility | Any GPU |
| pytorch_compile | Moderate speedup | torch>=2.0 |
| aten | Good balance | CUDA GPU |
| torchao_int4 | 4-bit inference | torchao installed |
| marlin | Maximum 4-bit speed | Ampere+ GPU |
| bitblas | Flexible bit-widths | bitblas installed |
Out of memory during quantization:
Slow inference:
Poor quality at 2-bit: