{"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/bayesian-low-rank-adaptation-for-large","title":"Bayesian Low-rank Adaptation for Large Language Models","arxiv_id":"2308.13111","date":"2023-08-24","proceeding":null,"authors":["Adam X. Yang","Maxime Robeyns","Xi Wang","Laurence Aitchison"],"abstract":"Low-rank adaptation (LoRA) has emerged as a new paradigm for cost-efficient fine-tuning of large language models (LLMs). However, fine-tuned LLMs often become overconfident especially when fine-tuned on small datasets. Bayesian methods, with their inherent ability to estimate uncertainty, serve as potent tools to mitigate overconfidence and enhance calibration. In this work, we introduce Laplace-LoRA, which applies a Bayesian approach to the LoRA parameters. Specifically, Laplace-LoRA applies a Laplace approximation to the posterior over the LoRA parameters, considerably improving the calibration of fine-tuned LLMs.","url_abs":"https://arxiv.org/abs/2308.13111v5","url_pdf":"https://arxiv.org/pdf/2308.13111v5.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":"bayesian-low-rank-adaptation-for-large","repo_url":"https://github.com/adamxyang/laplace-lora","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"bayesian-low-rank-adaptation-for-large","repo_url":"https://github.com/maximerobeyns/bayesian_lora","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.13111","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.13111"}},"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/adamxyang/laplace-lora","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/maximerobeyns/bayesian_lora","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":5,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":7,"ran":6,"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":0,"samples":[{"code_sha256_prefix":"67d6bf2efea2c59d","entry":"fit_diagonal_swag_var","repo":"adamxyang/laplace-lora","repo_kind":"official","path":"laplace/utils/swag.py","file_url":"https://github.com/adamxyang/laplace-lora/blob/HEAD/laplace/utils/swag.py","link_basis":"first_harvest_node","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":"67d6bf2efea2c59d"}},{"code_sha256_prefix":"b75b8c0c92ed9404","entry":"get_nll","repo":"adamxyang/laplace-lora","repo_kind":"official","path":"laplace/utils/utils.py","file_url":"https://github.com/adamxyang/laplace-lora/blob/HEAD/laplace/utils/utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b75b8c0c92ed9404"}},{"code_sha256_prefix":"a9d0bfd1501ec378","entry":"incremental_svd","repo":"maximerobeyns/bayesian_lora","repo_kind":"official","path":"bayesian_lora/kfac.py","file_url":"https://github.com/maximerobeyns/bayesian_lora/blob/HEAD/bayesian_lora/kfac.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":"a9d0bfd1501ec378"}},{"code_sha256_prefix":"7ed70fe2c40e4a8a","entry":"parameters_per_layer","repo":"adamxyang/laplace-lora","repo_kind":"official","path":"laplace/utils/utils.py","file_url":"https://github.com/adamxyang/laplace-lora/blob/HEAD/laplace/utils/utils.py","link_basis":"first_harvest_node","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":"7ed70fe2c40e4a8a"}},{"code_sha256_prefix":"685f1d3dc509b715","entry":"stabilise","repo":"maximerobeyns/bayesian_lora","repo_kind":"official","path":"bayesian_lora/kfac.py","file_url":"https://github.com/maximerobeyns/bayesian_lora/blob/HEAD/bayesian_lora/kfac.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":"685f1d3dc509b715"}},{"code_sha256_prefix":"cf7d0fd8aab6bf5d","entry":"stable_cholesky","repo":"maximerobeyns/bayesian_lora","repo_kind":"official","path":"bayesian_lora/kfac.py","file_url":"https://github.com/maximerobeyns/bayesian_lora/blob/HEAD/bayesian_lora/kfac.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":"cf7d0fd8aab6bf5d"}},{"code_sha256_prefix":"2c7df713641eba90","entry":"validate","repo":"adamxyang/laplace-lora","repo_kind":"official","path":"laplace/utils/utils.py","file_url":"https://github.com/adamxyang/laplace-lora/blob/HEAD/laplace/utils/utils.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":"2c7df713641eba90"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}