BPDQ: Bit-Plane Decomposition Quantization on a Variable Grid for Large Language Models
Paper • 2602.04163 • Published • 10
How to use goodman20241017/Llama-2-7B-BPD2-G64 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "goodman20241017/Llama-2-7B-BPD2-G64"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "goodman20241017/Llama-2-7B-BPD2-G64",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/goodman20241017/Llama-2-7B-BPD2-G64
How to use goodman20241017/Llama-2-7B-BPD2-G64 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "goodman20241017/Llama-2-7B-BPD2-G64" \
--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": "goodman20241017/Llama-2-7B-BPD2-G64",
"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 "goodman20241017/Llama-2-7B-BPD2-G64" \
--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": "goodman20241017/Llama-2-7B-BPD2-G64",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use goodman20241017/Llama-2-7B-BPD2-G64 with Docker Model Runner:
docker model run hf.co/goodman20241017/Llama-2-7B-BPD2-G64
This repository contains a 2-bit quantized version of meta-llama/Llama-2-7b-hf using the BPDQ (Bit-Plane Decomposition Quantization) algorithm.
BPDQ is a post-training quantization (PTQ) method that constructs a variable quantization grid via bit-plane decomposition and scalar coefficients. By iteratively refining these using second-order information, it maintains high fidelity even in extremely low-bit regimes (2–3 bits) where conventional PTQ methods typically degrade.
If you find BPDQ useful in your research, please cite:
@article{chen2026bpdq,
title={BPDQ: Bit-Plane Decomposition Quantization on a Variable Grid for Large Language Models},
author={Chen, Junyu and Li, Jungang and Xiong, Jing and Wang, Wenjie and Yang, Qingyao and Xiao, He and Li, Zhen and Wu, Taiqiang and Chen, Mengzhao and Peng, Zhen and others},
journal={arXiv preprint arXiv:2602.04163},
year={2026}
}
Base model
meta-llama/Llama-2-7b-hf