{"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/sltrain-a-sparse-plus-low-rank-approach-for","title":"SLTrain: a sparse plus low-rank approach for parameter and memory efficient pretraining","arxiv_id":"2406.02214","date":"2024-06-04","proceeding":null,"authors":["Andi Han","Jiaxiang Li","Wei Huang","Mingyi Hong","Akiko Takeda","Pratik Jawanpuria","Bamdev Mishra"],"abstract":"Large language models (LLMs) have shown impressive capabilities across various tasks. However, training LLMs from scratch requires significant computational power and extensive memory capacity. Recent studies have explored low-rank structures on weights for efficient fine-tuning in terms of parameters and memory, either through low-rank adaptation or factorization. While effective for fine-tuning, low-rank structures are generally less suitable for pretraining because they restrict parameters to a low-dimensional subspace. In this work, we propose to parameterize the weights as a sum of low-rank and sparse matrices for pretraining, which we call SLTrain. The low-rank component is learned via matrix factorization, while for the sparse component, we employ a simple strategy of uniformly selecting the sparsity support at random and learning only the non-zero entries with the fixed support. While being simple, the random fixed-support sparse learning strategy significantly enhances pretraining when combined with low-rank learning. Our results show that SLTrain adds minimal extra parameters and memory costs compared to pretraining with low-rank parameterization, yet achieves substantially better performance, which is comparable to full-rank training. Remarkably, when combined with quantization and per-layer updates, SLTrain can reduce memory requirements by up to 73% when pretraining the LLaMA 7B model.","url_abs":"https://arxiv.org/abs/2406.02214v2","url_pdf":"https://arxiv.org/pdf/2406.02214v2.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":"sltrain-a-sparse-plus-low-rank-approach-for","repo_url":"https://github.com/andyjm3/SLTrain","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"sparse-learning","task_name":"Sparse Learning"}],"methods":[{"method_slug":"llama","method_name":"LLaMA"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2406.02214","atlas_url":"https://app.syntology.ai/?focus=2406.02214","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.02214"}},"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/andyjm3/SLTrain","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":1,"ran":2,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"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":"f725bc2d76076485","entry":"apply_rotary_pos_emb","repo":"andyjm3/SLTrain","repo_kind":"official","path":"peft_pretraining/modeling_llama.py","file_url":"https://github.com/andyjm3/SLTrain/blob/HEAD/peft_pretraining/modeling_llama.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f725bc2d76076485"}},{"code_sha256_prefix":"c6be024db31c0ca0","entry":"get_cosine_schedule_with_multiple_warmups","repo":"andyjm3/SLTrain","repo_kind":"official","path":"peft_pretraining/training_utils.py","file_url":"https://github.com/andyjm3/SLTrain/blob/HEAD/peft_pretraining/training_utils.py","link_basis":"first_harvest_node","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":"c6be024db31c0ca0"}},{"code_sha256_prefix":"f58a7fbb020fe7cd","entry":"get_cyclical_cosine_schedule_with_min_lr","repo":"andyjm3/SLTrain","repo_kind":"official","path":"peft_pretraining/training_utils.py","file_url":"https://github.com/andyjm3/SLTrain/blob/HEAD/peft_pretraining/training_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f58a7fbb020fe7cd"}},{"code_sha256_prefix":"d994247ead9997b9","entry":"get_scheculer","repo":"andyjm3/SLTrain","repo_kind":"official","path":"peft_pretraining/training_utils.py","file_url":"https://github.com/andyjm3/SLTrain/blob/HEAD/peft_pretraining/training_utils.py","link_basis":"first_harvest_node","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":"d994247ead9997b9"}},{"code_sha256_prefix":"b99eea6376d1e212","entry":"rotate_half","repo":"andyjm3/SLTrain","repo_kind":"official","path":"peft_pretraining/modeling_llama.py","file_url":"https://github.com/andyjm3/SLTrain/blob/HEAD/peft_pretraining/modeling_llama.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b99eea6376d1e212"}},{"code_sha256_prefix":"c233d4777fc58003","entry":"check_args_torchrun_main","repo":"andyjm3/SLTrain","repo_kind":"official","path":"peft_pretraining/args_utils.py","file_url":"https://github.com/andyjm3/SLTrain/blob/HEAD/peft_pretraining/args_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c233d4777fc58003"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}