{"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/arxiv-2602-02546","title":"D$^2$Quant: Accurate Low-bit Post-Training Weight Quantization for LLMs","arxiv_id":"2602.02546","date":"2026-01-30","proceeding":null,"authors":["Xianglong Yan","ChengZhu Bao","Zhiteng Li","Tianao Zhang","Shaoqiu Zhang","Ruobing Xie","Samm Sun","Yulun Zhang"],"abstract":"Large language models (LLMs) deliver strong performance, but their high compute and memory costs make deployment difficult in resource-constrained scenarios. Weight-only post-training quantization (PTQ) is appealing, as it reduces memory usage and enables practical speedup without low-bit operators or specialized hardware. However, accuracy often degrades significantly in weight-only PTQ at sub-4-bit precision, and our analysis identifies two main causes: (1) down-projection matrices are a well-known quantization bottleneck, but maintaining their fidelity often requires extra bit-width; (2) weight quantization induces activation deviations, but effective correction strategies remain underexplored. To address these issues, we propose D$^2$Quant, a novel weight-only PTQ framework that improves quantization from both the weight and activation perspectives. On the weight side, we design a Dual-Scale Quantizer (DSQ) tailored to down-projection matrices, with an absorbable scaling factor that significantly improves accuracy without increasing the bit budget. On the activation side, we propose Deviation-Aware Correction (DAC), which incorporates a mean-shift correction within LayerNorm to mitigate quantization-induced activation distribution shifts. Extensive experiments across multiple LLM families and evaluation metrics show that D$^2$Quant delivers superior performance for weight-only PTQ at sub-4-bit precision. The code and models will be available at https://github.com/XIANGLONGYAN/D2Quant.","url_abs":"https://arxiv.org/abs/2602.02546","url_pdf":"https://arxiv.org/pdf/2602.02546","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2602.02546","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2602.02546"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/XIANGLONGYAN/D2Quant","reach":null}],"summary":{"ran_draft_wrong":2,"ran":1,"unverified":13},"by_repo_kind":{"found_in_text":{"samples":16,"ran":3,"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":"675da8641c602b03","entry":"round_ste","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/quantizer.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/quantizer.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"675da8641c602b03"}},{"code_sha256_prefix":"5daeed014eb71da9","entry":"asym_quant","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/quantizer.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/quantizer.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5daeed014eb71da9"}},{"code_sha256_prefix":"8005fc23ccbe61fb","entry":"get_rope_function_name","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/model_utils.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/model_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8005fc23ccbe61fb"}},{"code_sha256_prefix":"11ea86283bc189ec","entry":"apply_deviation_aware_correction","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/dac.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/dac.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"11ea86283bc189ec"}},{"code_sha256_prefix":"c2745ed51515c941","entry":"apply_mean_shift","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/dac.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/dac.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c2745ed51515c941"}},{"code_sha256_prefix":"58973fc4e2b31774","entry":"cleanup_memory","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/config.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/config.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"58973fc4e2b31774"}},{"code_sha256_prefix":"5a7bfb94df03681c","entry":"compose_final_perm","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/gar.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/gar.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5a7bfb94df03681c"}},{"code_sha256_prefix":"4bcf3cf0ed281cca","entry":"compute_global_perm","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/gar.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/gar.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4bcf3cf0ed281cca"}},{"code_sha256_prefix":"d16524faf29750ef","entry":"compute_local_perms","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/gar.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/gar.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d16524faf29750ef"}},{"code_sha256_prefix":"1b4ea44880a00a67","entry":"fit_dual_scale_2bit","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/dsq_2bit.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/dsq_2bit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1b4ea44880a00a67"}},{"code_sha256_prefix":"2e8023af78a306fa","entry":"fit_dual_scale_3bit","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/dsq_3bit.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/dsq_3bit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2e8023af78a306fa"}},{"code_sha256_prefix":"5cfb768c5400311b","entry":"get_layers","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/model_utils.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5cfb768c5400311b"}},{"code_sha256_prefix":"56fe9b504cdc9689","entry":"get_minq_maxq","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/quantizer.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/quantizer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"56fe9b504cdc9689"}},{"code_sha256_prefix":"54417cda50d297b8","entry":"log_snr_from_lists","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/quantization/diagnostics.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/quantization/diagnostics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"54417cda50d297b8"}},{"code_sha256_prefix":"5dcced271ec7bc12","entry":"model_type_extractor","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/model_utils.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5dcced271ec7bc12"}},{"code_sha256_prefix":"c63931568d9a0771","entry":"ppl_eval","repo":"XIANGLONGYAN/D2Quant","repo_kind":"found_in_text","path":"d2quant/evaluation.py","file_url":"https://github.com/XIANGLONGYAN/D2Quant/blob/HEAD/d2quant/evaluation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c63931568d9a0771"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}