{"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/neuqi-near-optimal-uniform-quantization","title":"NeUQI: Near-Optimal Uniform Quantization Parameter Initialization","arxiv_id":"2505.17595","date":"2025-05-23","proceeding":null,"authors":["Li Lin","Xinyu Hu","Xiaojun Wan"],"abstract":"Large language models (LLMs) achieve impressive performance across domains but face significant challenges when deployed on consumer-grade GPUs or personal devices such as laptops, due to high memory consumption and inference costs. Post-training quantization (PTQ) of LLMs offers a promising solution that reduces their memory footprint and decoding latency. In practice, PTQ with uniform quantization representation is favored for its efficiency and ease of deployment since uniform quantization is widely supported by mainstream hardware and software libraries. Recent studies on $\\geq 2$-bit uniform quantization have led to noticeable improvements in post-quantization model performance; however, they primarily focus on quantization methodologies, while the initialization of quantization parameters is underexplored and still relies on the suboptimal Min-Max strategies. In this work, we propose NeUQI, a method devoted to efficiently determining near-optimal initial parameters for uniform quantization. NeUQI is orthogonal to prior quantization methodologies and can seamlessly integrate with them. The experiments with the LLaMA and Qwen families on various tasks demonstrate that our NeUQI consistently outperforms existing methods. Furthermore, when combined with a lightweight distillation strategy, NeUQI can achieve superior performance to PV-tuning, a much more resource-intensive approach.","url_abs":"https://arxiv.org/abs/2505.17595v2","url_pdf":"https://arxiv.org/pdf/2505.17595v2.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":"neuqi-near-optimal-uniform-quantization","repo_url":"https://github.com/efsotr/NeUQI","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[{"method_slug":"focus","method_name":"Focus"},{"method_slug":"llama","method_name":"LLaMA"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2505.17595","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.17595"}},"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/efsotr/NeUQI","reach":null}],"summary":{"ran_fixture":3,"ran":1,"ran_honours":2,"unverified":14},"by_repo_kind":{"official":{"samples":20,"ran":6,"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":20,"samples":[{"code_sha256_prefix":"b8a46394b93f0ec9","entry":"LDL_decompose","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b8a46394b93f0ec9"}},{"code_sha256_prefix":"e772068e47cfabbe","entry":"QuantArgs","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e772068e47cfabbe"}},{"code_sha256_prefix":"fb688eae460ef923","entry":"pack","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fb688eae460ef923"}},{"code_sha256_prefix":"b6ea74acf9176a75","entry":"pack_2bit","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b6ea74acf9176a75"}},{"code_sha256_prefix":"e0d45e3336fcba5d","entry":"pack_4bit","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e0d45e3336fcba5d"}},{"code_sha256_prefix":"4f65753ca593f5e5","entry":"pack_xbit","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4f65753ca593f5e5"}},{"code_sha256_prefix":"2c15783925d9f368","entry":"LDLQ","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2c15783925d9f368"}},{"code_sha256_prefix":"8f26a3c74d358ac9","entry":"LDLQ_quant","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8f26a3c74d358ac9"}},{"code_sha256_prefix":"b39e64d2ee81dd96","entry":"LDLQ_quant_w_raw","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b39e64d2ee81dd96"}},{"code_sha256_prefix":"3455f636236fb620","entry":"QuantMethod","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3455f636236fb620"}},{"code_sha256_prefix":"89855916096605c6","entry":"UniformQuantizer","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"89855916096605c6"}},{"code_sha256_prefix":"711f0246a370e08c","entry":"dquant_int","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"711f0246a370e08c"}},{"code_sha256_prefix":"8dd338ca62d63154","entry":"find_zp_matrix_fast","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8dd338ca62d63154"}},{"code_sha256_prefix":"1d6db47ff863139a","entry":"grid_zp","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1d6db47ff863139a"}},{"code_sha256_prefix":"3e606a7679a2e099","entry":"info_once","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3e606a7679a2e099"}},{"code_sha256_prefix":"6b16b0445cc4c7cd","entry":"quant","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6b16b0445cc4c7cd"}},{"code_sha256_prefix":"e8d93739c30d8b78","entry":"quant_diag_loss","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e8d93739c30d8b78"}},{"code_sha256_prefix":"9cdab24fd487eb59","entry":"quant_int","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9cdab24fd487eb59"}},{"code_sha256_prefix":"51557cc1ab03a2d0","entry":"quant_loss","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"51557cc1ab03a2d0"}},{"code_sha256_prefix":"44c83521b75f0388","entry":"quant_random","repo":"efsotr/NeUQI","repo_kind":"official","path":"quant.py","file_url":"https://github.com/efsotr/NeUQI/blob/HEAD/quant.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"44c83521b75f0388"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}