{"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/qtip-quantization-with-trellises-and","title":"QTIP: Quantization with Trellises and Incoherence Processing","arxiv_id":"2406.11235","date":"2024-06-17","proceeding":null,"authors":["Albert Tseng","Qingyao Sun","David Hou","Christopher De Sa"],"abstract":"Post-training quantization (PTQ) reduces the memory footprint of LLMs by quantizing weights to low-precision datatypes. Since LLM inference is usually memory-bound, PTQ methods can improve inference throughput. Recent state-of-the-art PTQ approaches use vector quantization (VQ) to quantize multiple weights at once, which improves information utilization through better shaping. However, VQ requires a codebook with size exponential in the dimension. This limits current VQ-based PTQ works to low VQ dimensions ($\\le 8$) that in turn limit quantization quality. Here, we introduce QTIP, which instead uses trellis coded quantization (TCQ) to achieve ultra-high-dimensional quantization. TCQ uses a stateful decoder that separates the codebook size from the bitrate and effective dimension. QTIP introduces a spectrum of lookup-only to computed lookup-free trellis codes designed for a hardware-efficient \"bitshift\" trellis structure; these codes achieve state-of-the-art results in both quantization quality and inference speed.","url_abs":"https://arxiv.org/abs/2406.11235v3","url_pdf":"https://arxiv.org/pdf/2406.11235v3.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":"qtip-quantization-with-trellises-and","repo_url":"https://github.com/Cornell-RelaxML/qtip","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"qtip-quantization-with-trellises-and","repo_url":"https://github.com/lawrencerliu/nowag","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.11235","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.11235"}},"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":"deterministic:regex_extraction","url":"https://github.com/Cornell-RelaxML/qtip","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lawrencerliu/nowag","reach":null}],"summary":{"ran_fixture":1,"ran_violates":1,"ran_draft_wrong":4,"unverified":2},"by_repo_kind":{"official":{"samples":8,"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":8,"samples":[{"code_sha256_prefix":"357adcbb4430f3ab","entry":"logits_to_probs","repo":"Cornell-RelaxML/qtip","repo_kind":"official","path":"eval/interactive_gen.py","file_url":"https://github.com/Cornell-RelaxML/qtip/blob/HEAD/eval/interactive_gen.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"357adcbb4430f3ab"}},{"code_sha256_prefix":"6a853f497a6fd273","entry":"check_exist","repo":"Cornell-RelaxML/qtip","repo_kind":"official","path":"quantize_llama/quantize_finetune_llama.py","file_url":"https://github.com/Cornell-RelaxML/qtip/blob/HEAD/quantize_llama/quantize_finetune_llama.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"6a853f497a6fd273"}},{"code_sha256_prefix":"9e5bdf87180c4dfd","entry":"decode_1mad","repo":"Cornell-RelaxML/qtip","repo_kind":"official","path":"lib/codebook/bitshift.py","file_url":"https://github.com/Cornell-RelaxML/qtip/blob/HEAD/lib/codebook/bitshift.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"9e5bdf87180c4dfd"}},{"code_sha256_prefix":"d31d04a421745b56","entry":"decode_2mad","repo":"Cornell-RelaxML/qtip","repo_kind":"official","path":"lib/codebook/bitshift.py","file_url":"https://github.com/Cornell-RelaxML/qtip/blob/HEAD/lib/codebook/bitshift.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d31d04a421745b56"}},{"code_sha256_prefix":"d425be1e34395d91","entry":"decode_3inst","repo":"Cornell-RelaxML/qtip","repo_kind":"official","path":"lib/codebook/bitshift.py","file_url":"https://github.com/Cornell-RelaxML/qtip/blob/HEAD/lib/codebook/bitshift.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d425be1e34395d91"}},{"code_sha256_prefix":"0b5f90e8856ad7af","entry":"multinomial_sample_one_no_sync","repo":"Cornell-RelaxML/qtip","repo_kind":"official","path":"eval/interactive_gen.py","file_url":"https://github.com/Cornell-RelaxML/qtip/blob/HEAD/eval/interactive_gen.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"0b5f90e8856ad7af"}},{"code_sha256_prefix":"12c8b07dea3d0c16","entry":"LDLQ","repo":"Cornell-RelaxML/qtip","repo_kind":"official","path":"lib/algo/ldlq.py","file_url":"https://github.com/Cornell-RelaxML/qtip/blob/HEAD/lib/algo/ldlq.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"12c8b07dea3d0c16"}},{"code_sha256_prefix":"ec366460d4db87bc","entry":"sample","repo":"Cornell-RelaxML/qtip","repo_kind":"official","path":"eval/interactive_gen.py","file_url":"https://github.com/Cornell-RelaxML/qtip/blob/HEAD/eval/interactive_gen.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"ec366460d4db87bc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}