memyprokotow commited on
Commit
0e7093b
verified
1 Parent(s): 67b3ae5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -21
README.md CHANGED
@@ -1,57 +1,93 @@
1
  ---
2
  library_name: transformers
3
- license: mit
4
  pipeline_tag: question-answering
5
- tags:
6
- - lora
7
- - knowledge-editing
8
- - question-answering
9
  ---
10
 
11
- # Model Card for Knowledge-Packed LoRA Adapters
12
 
13
- This model card describes LoRA adapters fine-tuned to incorporate new knowledge into Large Language Models (LLMs), while preserving previously learned information. The approach and potential pitfalls of LoRA-based LLM updates are discussed in the paper: [How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?](https://arxiv.org/abs/2502.14502).
14
 
15
  ## Model Details
16
 
17
- - **Developed by:** Sergey Pletenev, Maria Marina, Daniil Moskovskiy, Vasily Konovalov, Pavel Braslavski, Alexander Panchenko, and Mikhail Salnikov
18
- - **Model type:** LoRA adapter for causal language modeling
 
 
 
 
 
19
  - **Language(s) (NLP):** English
20
- - **License:** MIT
21
  - **Finetuned from model:** meta-llama/Meta-Llama-3.1-8B-Instruct
22
 
 
 
 
 
 
 
23
  ## Uses
24
 
25
  ### Direct Use
26
- The model can be used to answer questions based on newly injected knowledge, for example, using facts from a specific domain. However, be mindful of the potential biases and knowledge spillover effects described in the paper.
 
 
 
 
 
27
 
28
  ### Out-of-Scope Use
29
- The model's performance may degrade when applied to tasks significantly different from the training data or when the training data is imbalanced. The model may exhibit biases learned from the training data and should not be used in high-stakes applications without careful evaluation and mitigation strategies.
 
30
 
31
  ## Bias, Risks, and Limitations
32
- The model may regress to overrepresented answers when the training data is biased towards certain entities. Fine-tuning can negatively impact the model's performance on external question-answering benchmarks. The model may also become more confident and refuse to provide an answer in only a few cases.
33
 
 
34
 
35
- ## How to Get Started with the Model
 
 
36
 
37
- See the Github repository for instructions on generating the dataset and training LoRA adapters: [https://github.com/memyprokotow/lora_vs_persisted/tree/master](https://github.com/memyprokotow/lora_vs_persisted/tree/master)
38
 
 
39
 
40
  ## Training Details
41
 
42
  ### Training Data
43
 
44
- The training data consists of a mixture of known and new facts, created using the head-to-tail pipeline with Dbpedia. The authors experimented with varying amounts of new knowledge. More details about the training data generation process can be found in the paper and the Github repo. Datasets used for the paper can be downloaded from:
45
- - [Dataset with precollected triples and questions](https://drive.google.com/file/d/1pCtfRlvBW769384AgmfNBpIU8OmftfKd/view?usp=sharing)
46
- - [Questions with labelled knowledge categories](https://drive.google.com/file/d/1-NDeTa8TMRNY9UIsIqtI-Iw4vq-rda35/view?usp=sharing).
47
 
48
  ### Training Procedure
49
 
50
- The model is fine-tuned using LoRA.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  ## Evaluation
53
 
54
- The model's performance was evaluated on external question-answering benchmarks and by analyzing knowledge spillover effects. See the paper and Github repo for more details.
 
 
 
 
 
55
 
56
  ## Citation
57
 
@@ -65,4 +101,8 @@ The model's performance was evaluated on external question-answering benchmarks
65
  primaryClass={cs.CL},
66
  url={https://arxiv.org/abs/2502.14502},
67
  }
68
- ```
 
 
 
 
 
1
  ---
2
  library_name: transformers
 
3
  pipeline_tag: question-answering
4
+ license: mit
5
+ base_model: meta-llama/Llama-3.1-8B-Instruct
6
+ tags: []
 
7
  ---
8
 
9
+ # Model Card for How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?
10
 
11
+ This model card describes a LoRA model presented in [How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?](https://arxiv.org/abs/2502.14502).
12
 
13
  ## Model Details
14
 
15
+ ### Model Description
16
+
17
+ The performance of Large Language Models (LLMs) on many tasks is greatly limited by the knowledge learned during pre-training and stored in the model's parameters. Low-rank adaptation (LoRA) is a popular and efficient training technique for updating or domain-specific adaptation of LLMs. In this study, we investigate how new facts can be incorporated into the LLM using LoRA without compromising the previously learned knowledge. We fine-tuned Llama-3.1-8B-instruct using LoRA with varying amounts of new knowledge. Our experiments have shown that the best results are obtained when the training data contains a mixture of known and new facts. However, this approach is still potentially harmful because the model's performance on external question-answering benchmarks declines after such fine-tuning. When the training data is biased towards certain entities, the model tends to regress to few overrepresented answers. In addition, we found that the model becomes more confident and refuses to provide an answer in only few cases. These findings highlight the potential pitfalls of LoRA-based LLM updates and underscore the importance of training data composition and tuning parameters to balance new knowledge integration and general model capabilities.
18
+
19
+
20
+ - **Developed by:** Sergey Pletenev, Maria Marina, Daniil Moskovskiy, Vasily Konovalov, Pavel Braslavski, Alexander Panchenko, Mikhail Salnikov
21
+ - **Model type:** LLM
22
  - **Language(s) (NLP):** English
23
+ - **License:** mit
24
  - **Finetuned from model:** meta-llama/Meta-Llama-3.1-8B-Instruct
25
 
26
+ ### Model Sources
27
+
28
+ - **Repository:** [https://github.com/AIRI-Institute/knowledge-packing](https://github.com/AIRI-Institute/knowledge-packing)
29
+ - **Paper:** [How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?](https://arxiv.org/abs/2502.14502)
30
+
31
+
32
  ## Uses
33
 
34
  ### Direct Use
35
+
36
+ The model can be used for question answering.
37
+
38
+ ### Downstream Use
39
+
40
+ The model can be further fine-tuned for domain-specific question answering.
41
 
42
  ### Out-of-Scope Use
43
+
44
+ The model may not perform well on questions outside the knowledge it has been fine-tuned on, or if the training data was biased.
45
 
46
  ## Bias, Risks, and Limitations
 
47
 
48
+ The model may exhibit biases present in the training data. The model's performance may degrade on external question-answering benchmarks after fine-tuning, especially if the training data is biased towards certain entities.
49
 
50
+ ### Recommendations
51
+
52
+ Users should be aware of potential biases in the model's responses and the limitations of its knowledge.
53
 
54
+ ## How to Get Started with the Model
55
 
56
+ [More Information Needed]
57
 
58
  ## Training Details
59
 
60
  ### Training Data
61
 
62
+ The training data consists of questions and answers generated using the head-to-tail pipeline with a Dbpedia script. See the paper and Github repository for more details.
63
+ Model was trained on 500 Unknown questions with 10 additional HighlyKnown question per Unknown
 
64
 
65
  ### Training Procedure
66
 
67
+ The model was fine-tuned using LoRA.
68
+
69
+ #### Training Hyperparameters
70
+
71
+ LR = 1e-3
72
+ BS = 8
73
+ EPOCHS = 10
74
+ LoRA:
75
+ lora_rank = 1
76
+ lora_alpha = 2
77
+ use_rslora = True
78
+ lora_dropout = 0.1
79
+ bias = "none"
80
+ target_modules = ["down_proj", "gate_proj", "up_proj"]
81
+ task_type = "CAUSAL_LM"
82
 
83
  ## Evaluation
84
 
85
+ For evaluation you can use [notebooks](https://github.com/AIRI-Institute/knowledge-packing/tree/main/notebooks) from github repository
86
+
87
+ ## Environmental Impact
88
+
89
+ [More Information Needed]
90
+
91
 
92
  ## Citation
93
 
 
101
  primaryClass={cs.CL},
102
  url={https://arxiv.org/abs/2502.14502},
103
  }
104
+ ```
105
+
106
+ **APA:**
107
+
108
+ Pletenev, S., Marina, M., Moskovskiy, D., Konovalov, V., Braslavski, P., Panchenko, A., & Salnikov, M. (2025). How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?.