We lifted 7 functions out of this paper's own repositories and ran 4 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| fortuinlab/swag-lora | canonical | 4 of 7 |
| Function | Status | Where it lives |
|---|---|---|
| compute_nll | Ran | fortuinlab/swag-lora/utils/eval_utils.py code served (permissive licence) · get_code("639d998673661691") |
| flatten | Ran | fortuinlab/swag-lora/SWAG.py code served (permissive licence) · get_code("cdc64e98aaf2dd54") |
| mean_logits | Ran | fortuinlab/swag-lora/utils/eval_utils.py code served (permissive licence) · get_code("db7ed1c792d13d1e") |
| mean_preds | Ran | fortuinlab/swag-lora/utils/eval_utils.py code served (permissive licence) · get_code("ec4d2d63dcda42f8") |
| load_glue_data | Not yet run | fortuinlab/swag-lora/data.py code served (permissive licence) · get_code("f39e3b94583b1970") |
| load_mcqa_data | Not yet run | fortuinlab/swag-lora/data.py code served (permissive licence) · get_code("eeee5555e68e0771") |
| unflatten_like | Not yet run | fortuinlab/swag-lora/SWAG.py code served (permissive licence) · get_code("2da33912415648f3") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Fine-tuned Large Language Models (LLMs) often suffer from overconfidence and poor calibration, particularly when fine-tuned on small datasets. To address these challenges, we propose a simple combination of Low-Rank Adaptation (LoRA) with Gaussian Stochastic Weight Averaging (SWAG), facilitating approximate Bayesian inference in LLMs. Through extensive testing across several Natural Language Processing (NLP) benchmarks, we demonstrate that our straightforward and computationally efficient approach improves model generalization and calibration competitively with comparable, more sophisticated methods for Bayesian inference in LLMs. We further show that our method exhibits greater robustness against distribution shift, as reflected in its improved performance on out-of-distribution tasks.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2405.03425")
get_code_for_paper("2405.03425")
have("2405.03425")
Connect an agent — have() is free.