{"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/awq-activation-aware-weight-quantization-for","title":"AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration","arxiv_id":"2306.00978","date":"2023-06-01","proceeding":null,"authors":["Ji Lin","Jiaming Tang","Haotian Tang","Shang Yang","Wei-Ming Chen","Wei-Chen Wang","Guangxuan Xiao","Xingyu Dang","Chuang Gan","Song Han"],"abstract":"Large language models (LLMs) have transformed numerous AI applications. On-device LLM is becoming increasingly important: running LLMs locally on edge devices can reduce the cloud computing cost and protect users' privacy. However, the astronomical model size and the limited hardware resource pose significant deployment challenges. We propose Activation-aware Weight Quantization (AWQ), a hardware-friendly approach for LLM low-bit weight-only quantization. AWQ finds that not all weights in an LLM are equally important. Protecting only 1% salient weights can greatly reduce quantization error. To identify salient weight channels, we should refer to the activation distribution, not weights. To avoid the hardware-inefficient mix-precision quantization, we mathematically derive that scaling up the salient channels can reduce the quantization error. AWQ employs an equivalent transformation to scale the salient weight channels to protect them. The scale is determined by collecting the activation statistics offline. AWQ does not rely on any backpropagation or reconstruction, so it generalizes to different domains and modalities without overfitting the calibration set. AWQ outperforms existing work on various language modeling and domain-specific benchmarks (coding and math). Thanks to better generalization, it achieves excellent quantization performance for instruction-tuned LMs and, for the first time, multi-modal LMs. Alongside AWQ, we implement TinyChat, an efficient and flexible inference framework tailored for 4-bit on-device LLM/VLMs. With kernel fusion and platform-aware weight packing, TinyChat offers more than 3x speedup over the Huggingface FP16 implementation on both desktop and mobile GPUs. It also democratizes the deployment of the 70B Llama-2 model on mobile GPUs.","url_abs":"https://arxiv.org/abs/2306.00978v5","url_pdf":"https://arxiv.org/pdf/2306.00978v5.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":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/internlm/lmdeploy","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/mit-han-lab/llm-awq","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/nvidia/tensorrt-llm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/vllm-project/vllm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/bentoml/openllm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/casper-hansen/autoawq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/efficient-large-model/vila","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/nvlabs/vila","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/qwenlm/qwen2-vl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/rasmith/vllm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/vectorch-ai/scalellm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"awq-activation-aware-weight-quantization-for","repo_url":"https://github.com/xvyaward/qeft","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"autonomous-driving","task_name":"Autonomous Driving"},{"task_slug":"cloud-computing","task_name":"Cloud Computing"},{"task_slug":"common-sense-reasoning","task_name":"Common Sense Reasoning"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"math","task_name":"Math"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2306.00978","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.00978"}},"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/vllm-project/vllm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mit-han-lab/llm-awq","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bentoml/openllm","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/internlm/lmdeploy","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vectorch-ai/scalellm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/qwenlm/qwen2-vl","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rasmith/vllm","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nvidia/tensorrt-llm","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/efficient-large-model/vila","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/ggerganov/llama.cpp","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nvlabs/vila","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xvyaward/qeft","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/casper-hansen/autoawq","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/turboderp/exllama","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":10,"ran_draft_wrong":2,"unverified":6},"by_repo_kind":{"official":{"samples":9,"ran":9,"repositories":1},"listed":{"samples":1,"ran":1,"repositories":1},"found_in_text":{"samples":6,"ran":0,"repositories":2}},"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":2,"samples":[{"code_sha256_prefix":"5608d56b0c71e653","entry":"Quantizer","repo":"xvyaward/qeft","repo_kind":"listed","path":"qeft/quant.py","file_url":"https://github.com/xvyaward/qeft/blob/HEAD/qeft/quant.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":"5608d56b0c71e653"}},{"code_sha256_prefix":"2bf6c00c566b801c","entry":"check_vl_llm","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/archs.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/archs.py","link_basis":"plan_row","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":"2bf6c00c566b801c"}},{"code_sha256_prefix":"77ce2711c2f8950d","entry":"compile_response_format","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/_guided_decoding.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/_guided_decoding.py","link_basis":"plan_row","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":"77ce2711c2f8950d"}},{"code_sha256_prefix":"7004ae9213140ec9","entry":"get_text","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/model.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/model.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7004ae9213140ec9"}},{"code_sha256_prefix":"a166c4b79b21b60a","entry":"quantize","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"a166c4b79b21b60a"}},{"code_sha256_prefix":"749e1b68c68b3203","entry":"quantize_efficient","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"749e1b68c68b3203"}},{"code_sha256_prefix":"c8ad433b6fe18d53","entry":"to_json","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/deepseek_v32_encoding.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/deepseek_v32_encoding.py","link_basis":"plan_row","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":"c8ad433b6fe18d53"}},{"code_sha256_prefix":"ee1294cf4de7d8c0","entry":"to_json","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/deepseek_v4_encoding.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/deepseek_v4_encoding.py","link_basis":"plan_row","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":"ee1294cf4de7d8c0"}},{"code_sha256_prefix":"e9281cecc545ad6f","entry":"tool_calls_from_openai_format","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/deepseek_v32_encoding.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/deepseek_v32_encoding.py","link_basis":"plan_row","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":"e9281cecc545ad6f"}},{"code_sha256_prefix":"8b8cee237b9dc9d0","entry":"tool_calls_from_openai_format","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/deepseek_v4_encoding.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/deepseek_v4_encoding.py","link_basis":"plan_row","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":"8b8cee237b9dc9d0"}},{"code_sha256_prefix":"aa8d2113d1ab432e","entry":"tools_from_openai_format","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/deepseek_v32_encoding.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/deepseek_v32_encoding.py","link_basis":"plan_row","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":"aa8d2113d1ab432e"}},{"code_sha256_prefix":"a2584d89f3a50342","entry":"tools_from_openai_format","repo":"internlm/lmdeploy","repo_kind":"official","path":"lmdeploy/deepseek_v4_encoding.py","file_url":"https://github.com/internlm/lmdeploy/blob/HEAD/lmdeploy/deepseek_v4_encoding.py","link_basis":"plan_row","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":"a2584d89f3a50342"}},{"code_sha256_prefix":"2b23d02a693ab3d2","entry":"get_base_tensor_name","repo":"ggerganov/llama.cpp","repo_kind":"found_in_text","path":"convert_lora_to_gguf.py","file_url":"https://github.com/ggerganov/llama.cpp/blob/HEAD/convert_lora_to_gguf.py","link_basis":"plan_row","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":"2b23d02a693ab3d2"}},{"code_sha256_prefix":"a160a507db9a1d7a","entry":"get_model_architecture","repo":"ggerganov/llama.cpp","repo_kind":"found_in_text","path":"conversion/base.py","file_url":"https://github.com/ggerganov/llama.cpp/blob/HEAD/conversion/base.py","link_basis":"plan_row","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":"a160a507db9a1d7a"}},{"code_sha256_prefix":"cc924525c5e81162","entry":"handle_metadata","repo":"ggerganov/llama.cpp","repo_kind":"found_in_text","path":"convert_llama_ggml_to_gguf.py","file_url":"https://github.com/ggerganov/llama.cpp/blob/HEAD/convert_llama_ggml_to_gguf.py","link_basis":"plan_row","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":"cc924525c5e81162"}},{"code_sha256_prefix":"e26587a77ee23aa1","entry":"load_hparams_from_hf","repo":"ggerganov/llama.cpp","repo_kind":"found_in_text","path":"convert_lora_to_gguf.py","file_url":"https://github.com/ggerganov/llama.cpp/blob/HEAD/convert_lora_to_gguf.py","link_basis":"plan_row","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":"e26587a77ee23aa1"}},{"code_sha256_prefix":"084d06902aa98802","entry":"split_str_to_n_bytes","repo":"ggerganov/llama.cpp","repo_kind":"found_in_text","path":"convert_hf_to_gguf.py","file_url":"https://github.com/ggerganov/llama.cpp/blob/HEAD/convert_hf_to_gguf.py","link_basis":"plan_row","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":"084d06902aa98802"}},{"code_sha256_prefix":"0339808d73c4cc66","entry":"timer","repo":"turboderp/exllama","repo_kind":"found_in_text","path":"example_alt_generator.py","file_url":"https://github.com/turboderp/exllama/blob/HEAD/example_alt_generator.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":"0339808d73c4cc66"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}