WarpQuant: Dual-Domain INT3 LLM Quantization
Collection
Hadamard-rotated 3-bit PTQ with Output-Fisher weak-column recovery for Qwen3.8-27B, Qwen3.5-4B, and Llama 3 8B. • 5 items • Updated
How to use HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4")
model = AutoModelForCausalLM.from_pretrained("HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4", device_map="auto")How to use HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4
How to use HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4 with Docker Model Runner:
docker model run hf.co/HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4
Llama 3 8B quantized with signed Hadamard rotation, block-GPTQ, and Output-Fisher weak-column recovery. Projection weights use a 3.5-bpw INT3 base, selected columns are restored in BF16, and the embedding and output head use group-128 INT4.
| Format | Text bpw | Payload | WikiText-2 PPL ↓ | ARC-299 ↑ | MMLU-13,943 ↑ |
|---|---|---|---|---|---|
| BF16 | 16.00 | 14.965 GiB | 6.2559 | 50.50 | 41.04 |
| Q4_K_M | 4.89 | 4.583 GiB | 6.4359 | 50.84 | 40.67 |
| IQ3_S + imatrix | 3.66 | 3.429 GiB | 6.9929 | 44.15 | 39.87 |
| WarpQuant Fisher R16E4H4 | 3.6256 | 3.389 GiB | 7.3446 | 45.49 | 38.99 |
The repository stores the quantized values in BF16-compatible safetensors. The reported payload is the packed-equivalent analytical size including codes, scales, recovery values, and column indices.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "HarimxChoi/WarpQuant-Llama-3-8B-R16E4H4"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
@misc{choi2026warpquant,
author = {Harim Choi},
title = {WarpQuant: Dual-Domain LLM Quantization via Hadamard Rotation and Output-Fisher Sensitivity},
year = {2026},
url = {https://harimxchoi.github.io/projects/warpquant/}
}
Base model
NousResearch/Meta-Llama-3-8B