{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/vptq-extreme-low-bit-vector-post-training","title":"VPTQ: Extreme Low-bit Vector Post-Training Quantization for Large Language Models","arxiv_id":"2409.17066","date":"2024-09-25","proceeding":null,"authors":["Yifei Liu","Jicheng Wen","Yang Wang","Shengyu Ye","Li Lyna Zhang","Ting Cao","Cheng Li","Mao Yang"],"abstract":"Scaling model size significantly challenges the deployment and inference of Large Language Models (LLMs). Due to the redundancy in LLM weights, recent research has focused on pushing weight-only quantization to extremely low-bit (even down to 2 bits). It reduces memory requirements, optimizes storage costs, and decreases memory bandwidth needs during inference. However, due to numerical representation limitations, traditional scalar-based weight quantization struggles to achieve such extreme low-bit. Recent research on Vector Quantization (VQ) for LLMs has demonstrated the potential for extremely low-bit model quantization by compressing vectors into indices using lookup tables. In this paper, we introduce Vector Post-Training Quantization (VPTQ) for extremely low-bit quantization of LLMs. We use Second-Order Optimization to formulate the LLM VQ problem and guide our quantization algorithm design by solving the optimization. We further refine the weights using Channel-Independent Second-Order Optimization for a granular VQ. In addition, by decomposing the optimization problem, we propose a brief and effective codebook initialization algorithm. We also extend VPTQ to support residual and outlier quantization, which enhances model accuracy and further compresses the model. Our experimental results show that VPTQ reduces model quantization perplexity by $0.01$-$0.34$ on LLaMA-2, $0.38$-$0.68$ on Mistral-7B, $4.41$-$7.34$ on LLaMA-3 over SOTA at 2-bit, with an average accuracy improvement of $0.79$-$1.5\\%$ on LLaMA-2, $1\\%$ on Mistral-7B, $11$-$22\\%$ on LLaMA-3 on QA tasks on average. We only utilize $10.4$-$18.6\\%$ of the quantization algorithm execution time, resulting in a $1.6$-$1.8\\times$ increase in inference throughput compared to SOTA.","url_abs":"https://arxiv.org/abs/2409.17066v2","url_pdf":"https://arxiv.org/pdf/2409.17066v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"vptq-extreme-low-bit-vector-post-training","repo_url":"https://github.com/microsoft/vptq","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.17066","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.17066"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/vptq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/microsoft/VPTQ","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":2},"by_repo_kind":{"official":{"samples":7,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"7c69c21f0134f3b7","entry":"VQuantLinear","repo":"microsoft/VPTQ","repo_kind":"official","path":"vptq/layers/vqlinear.py","file_url":"https://github.com/microsoft/VPTQ/blob/HEAD/vptq/layers/vqlinear.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7c69c21f0134f3b7"}},{"code_sha256_prefix":"3ead5607a7895cfd","entry":"dtype_convert","repo":"microsoft/vptq","repo_kind":"official","path":"vptq/utils/pack.py","file_url":"https://github.com/microsoft/vptq/blob/HEAD/vptq/utils/pack.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3ead5607a7895cfd"}},{"code_sha256_prefix":"6886c53e21133de1","entry":"find_layers","repo":"microsoft/vptq","repo_kind":"official","path":"vptq/layers/utils.py","file_url":"https://github.com/microsoft/vptq/blob/HEAD/vptq/layers/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6886c53e21133de1"}},{"code_sha256_prefix":"c091738c46a0359c","entry":"get_valid_args","repo":"microsoft/vptq","repo_kind":"official","path":"vptq/app_utils.py","file_url":"https://github.com/microsoft/vptq/blob/HEAD/vptq/app_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c091738c46a0359c"}},{"code_sha256_prefix":"7b26a1643bf85c76","entry":"pack_index","repo":"microsoft/vptq","repo_kind":"official","path":"vptq/utils/pack.py","file_url":"https://github.com/microsoft/vptq/blob/HEAD/vptq/utils/pack.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7b26a1643bf85c76"}},{"code_sha256_prefix":"7a5efa2ff4cb33e3","entry":"quant_gemv_v2","repo":"microsoft/vptq","repo_kind":"official","path":"vptq/ops/quant_gemm.py","file_url":"https://github.com/microsoft/vptq/blob/HEAD/vptq/ops/quant_gemm.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7a5efa2ff4cb33e3"}},{"code_sha256_prefix":"6b289a9c0a55476e","entry":"unpack_index_tensor","repo":"microsoft/vptq","repo_kind":"official","path":"vptq/utils/pack.py","file_url":"https://github.com/microsoft/vptq/blob/HEAD/vptq/utils/pack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b289a9c0a55476e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}