{"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/watermarking-llms-with-weight-quantization","title":"Watermarking LLMs with Weight Quantization","arxiv_id":"2310.11237","date":"2023-10-17","proceeding":null,"authors":["Linyang Li","Botian Jiang","Pengyu Wang","Ke Ren","Hang Yan","Xipeng Qiu"],"abstract":"Abuse of large language models reveals high risks as large language models are being deployed at an astonishing speed. It is important to protect the model weights to avoid malicious usage that violates licenses of open-source large language models. This paper proposes a novel watermarking strategy that plants watermarks in the quantization process of large language models without pre-defined triggers during inference. The watermark works when the model is used in the fp32 mode and remains hidden when the model is quantized to int8, in this way, the users can only inference the model without further supervised fine-tuning of the model. We successfully plant the watermark into open-source large language model weights including GPT-Neo and LLaMA. We hope our proposed method can provide a potential direction for protecting model weights in the era of large language model applications.","url_abs":"https://arxiv.org/abs/2310.11237v1","url_pdf":"https://arxiv.org/pdf/2310.11237v1.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":"watermarking-llms-with-weight-quantization","repo_url":"https://github.com/twilight92z/quantize-watermark","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[{"method_slug":"gpt-neo","method_name":"GPT-Neo"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.11237","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.11237"}},"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/twilight92z/quantize-watermark","reach":{"status":"ok"}}],"summary":{"ran":1,"unverified":9},"by_repo_kind":{"official":{"samples":10,"ran":1,"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":10,"samples":[{"code_sha256_prefix":"3536b543be489008","entry":"get_device_map","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/param_shift.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/param_shift.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3536b543be489008"}},{"code_sha256_prefix":"2db132a7046c33f2","entry":"compare","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/param_shift.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/param_shift.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":"2db132a7046c33f2"}},{"code_sha256_prefix":"3bf3a7a0190964e0","entry":"get_config","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/maintain_fp32/predict.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/maintain_fp32/predict.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":"3bf3a7a0190964e0"}},{"code_sha256_prefix":"53542a9c2ab91d17","entry":"get_data","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/sft_data.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/sft_data.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":"53542a9c2ab91d17"}},{"code_sha256_prefix":"958ef50d9bd77afb","entry":"get_data","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/maintain_fp32/data_processor.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/maintain_fp32/data_processor.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":"958ef50d9bd77afb"}},{"code_sha256_prefix":"256a9c18c8b869a3","entry":"get_model","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/param_shift.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/param_shift.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":"256a9c18c8b869a3"}},{"code_sha256_prefix":"924af28ba0f50fbf","entry":"get_tokenizer","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/sft_data.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/sft_data.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":"924af28ba0f50fbf"}},{"code_sha256_prefix":"6e7ff7fe47364201","entry":"quant_online","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/maintain_int8/rollback.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/maintain_int8/rollback.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":"6e7ff7fe47364201"}},{"code_sha256_prefix":"79e4422d6f6bff4e","entry":"tokenize","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/sft_data.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/sft_data.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":"79e4422d6f6bff4e"}},{"code_sha256_prefix":"dd30351922015b11","entry":"tokenize","repo":"twilight92z/quantize-watermark","repo_kind":"official","path":"code/maintain_fp32/data_processor.py","file_url":"https://github.com/twilight92z/quantize-watermark/blob/HEAD/code/maintain_fp32/data_processor.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":"dd30351922015b11"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}