{"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/zipnn-lossless-compression-for-ai-models","title":"ZipNN: Lossless Compression for AI Models","arxiv_id":"2411.05239","date":"2024-11-07","proceeding":null,"authors":["Moshik Hershcovitch","Andrew Wood","Leshem Choshen","Guy Girmonsky","Roy Leibovitz","Ilias Ennmouri","Michal Malka","Peter Chin","Swaminathan Sundararaman","Danny Harnik"],"abstract":"With the growth of model sizes and the scale of their deployment, their sheer size burdens the infrastructure requiring more network and more storage to accommodate these. While there is a vast model compression literature deleting parts of the model weights for faster inference, we investigate a more traditional type of compression - one that represents the model in a compact form and is coupled with a decompression algorithm that returns it to its original form and size - namely lossless compression. We present ZipNN a lossless compression tailored to neural networks. Somewhat surprisingly, we show that specific lossless compression can gain significant network and storage reduction on popular models, often saving 33% and at times reducing over 50% of the model size. We investigate the source of model compressibility and introduce specialized compression variants tailored for models that further increase the effectiveness of compression. On popular models (e.g. Llama 3) ZipNN shows space savings that are over 17% better than vanilla compression while also improving compression and decompression speeds by 62%. We estimate that these methods could save over an ExaByte per month of network traffic downloaded from a large model hub like Hugging Face.","url_abs":"https://arxiv.org/abs/2411.05239v2","url_pdf":"https://arxiv.org/pdf/2411.05239v2.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":"zipnn-lossless-compression-for-ai-models","repo_url":"https://github.com/zipnn/zipnn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"model-compression","task_name":"Model Compression"}],"methods":[{"method_slug":"llama","method_name":"LLaMA"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2411.05239","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.05239"}},"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/zipnn/zipnn","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":0,"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":7,"samples":[{"code_sha256_prefix":"f8cea3623e03dc36","entry":"bools_to_bitmask","repo":"zipnn/zipnn","repo_kind":"official","path":"zipnn/util_header.py","file_url":"https://github.com/zipnn/zipnn/blob/HEAD/zipnn/util_header.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f8cea3623e03dc36"}},{"code_sha256_prefix":"b9a0c8a64b3eae48","entry":"build_compressed_tensor_info","repo":"zipnn/zipnn","repo_kind":"official","path":"zipnn/util_safetensors.py","file_url":"https://github.com/zipnn/zipnn/blob/HEAD/zipnn/util_safetensors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b9a0c8a64b3eae48"}},{"code_sha256_prefix":"8cdd652a09499bd7","entry":"get_compressed_tensors_metadata","repo":"zipnn/zipnn","repo_kind":"official","path":"zipnn/util_safetensors.py","file_url":"https://github.com/zipnn/zipnn/blob/HEAD/zipnn/util_safetensors.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8cdd652a09499bd7"}},{"code_sha256_prefix":"c7143ccde122c584","entry":"multi_process_patcher","repo":"zipnn/zipnn","repo_kind":"official","path":"zipnn/util_patch.py","file_url":"https://github.com/zipnn/zipnn/blob/HEAD/zipnn/util_patch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c7143ccde122c584"}},{"code_sha256_prefix":"f7504e42713b57fc","entry":"zipnn_divide_int","repo":"zipnn/zipnn","repo_kind":"official","path":"zipnn/util_torch.py","file_url":"https://github.com/zipnn/zipnn/blob/HEAD/zipnn/util_torch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f7504e42713b57fc"}},{"code_sha256_prefix":"073d1e9af5d4684f","entry":"zipnn_get_dtype_bits","repo":"zipnn/zipnn","repo_kind":"official","path":"zipnn/util_torch.py","file_url":"https://github.com/zipnn/zipnn/blob/HEAD/zipnn/util_torch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"073d1e9af5d4684f"}},{"code_sha256_prefix":"e97a6a298948400e","entry":"zipnn_multiply_if_max_below","repo":"zipnn/zipnn","repo_kind":"official","path":"zipnn/util_torch.py","file_url":"https://github.com/zipnn/zipnn/blob/HEAD/zipnn/util_torch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e97a6a298948400e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}