{"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/quest-stable-training-of-llms-with-1-bit","title":"QuEST: Stable Training of LLMs with 1-Bit Weights and Activations","arxiv_id":"2502.05003","date":"2025-02-07","proceeding":null,"authors":["Andrei Panferov","Jiale Chen","Soroush Tabesh","Roberto L. Castro","Mahdi Nikdan","Dan Alistarh"],"abstract":"One approach to reducing the massive costs of large language models (LLMs) is the use of quantized or sparse representations for training or deployment. While post-training compression methods are very popular, the question of obtaining even more accurate compressed models by directly training over such representations, i.e., Quantization-Aware Training (QAT), is still open: for example, a recent study (arXiv:2411.04330v2) put the \"optimal\" bit-width at which models can be trained using QAT, while staying accuracy-competitive with standard FP16/BF16 precision, at 8-bits weights and activations. We advance this state-of-the-art via a new method called QuEST, which is Pareto-competitive with FP16, i.e., it provides better accuracy at lower model size, while training models with weights and activations in 4-bits or less. Moreover, QuEST allows stable training with 1-bit weights and activations. QuEST achieves this by improving two key aspects of QAT methods: (1) accurate and fast quantization of the (continuous) distributions of weights and activations via Hadamard normalization and MSE-optimal fitting; (2) a new trust gradient estimator based on the idea of explicitly minimizing the error between the noisy gradient computed over quantized states and the \"true\" (but unknown) full-precision gradient. Experiments on Llama-type architectures show that QuEST induces stable scaling laws across the entire range of hardware-supported precisions, and can be extended to sparse representations. We provide GPU kernel support showing that models produced by QuEST can be executed efficiently. Our code is available at https://github.com/IST-DASLab/QuEST.","url_abs":"https://arxiv.org/abs/2502.05003v1","url_pdf":"https://arxiv.org/pdf/2502.05003v1.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":"quest-stable-training-of-llms-with-1-bit","repo_url":"https://github.com/IST-DASLab/QuEST","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2502.05003","atlas_url":"https://app.syntology.ai/?focus=2502.05003","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.05003"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/IST-DASLab/QuEST","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"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":"1a5c585a2c27ed6f","entry":"dequantize_dense","repo":"IST-DASLab/QuEST","repo_kind":"official","path":"src/eval_hswag.py","file_url":"https://github.com/IST-DASLab/QuEST/blob/HEAD/src/eval_hswag.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1a5c585a2c27ed6f"}},{"code_sha256_prefix":"1bd86a911c3f78a3","entry":"move_to_cpu","repo":"IST-DASLab/QuEST","repo_kind":"official","path":"src/logger/logger.py","file_url":"https://github.com/IST-DASLab/QuEST/blob/HEAD/src/logger/logger.py","link_basis":"harvester_set","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":"1bd86a911c3f78a3"}},{"code_sha256_prefix":"a1d6f89d43fc42e1","entry":"precompute_freqs_cis","repo":"IST-DASLab/QuEST","repo_kind":"official","path":"src/models/llama.py","file_url":"https://github.com/IST-DASLab/QuEST/blob/HEAD/src/models/llama.py","link_basis":"harvester_set","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":"a1d6f89d43fc42e1"}},{"code_sha256_prefix":"198aea734522a443","entry":"self_preserving_overwrite","repo":"IST-DASLab/QuEST","repo_kind":"official","path":"src/logger/logger.py","file_url":"https://github.com/IST-DASLab/QuEST/blob/HEAD/src/logger/logger.py","link_basis":"harvester_set","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":"198aea734522a443"}},{"code_sha256_prefix":"41b98aa1d9397844","entry":"apply_rotary_emb","repo":"IST-DASLab/QuEST","repo_kind":"official","path":"src/models/llama.py","file_url":"https://github.com/IST-DASLab/QuEST/blob/HEAD/src/models/llama.py","link_basis":"harvester_set","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":"41b98aa1d9397844"}},{"code_sha256_prefix":"843859340885ab12","entry":"get_model","repo":"IST-DASLab/QuEST","repo_kind":"official","path":"src/models/utils.py","file_url":"https://github.com/IST-DASLab/QuEST/blob/HEAD/src/models/utils.py","link_basis":"harvester_set","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":"843859340885ab12"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}