memyprokotow commited on
Commit
996fd45
verified
1 Parent(s): a875e4a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -26
README.md CHANGED
@@ -1,80 +1,93 @@
1
  ---
2
- language:
3
- - en
4
  library_name: transformers
5
- license: cc-by-4.0
6
  pipeline_tag: question-answering
 
 
 
7
  ---
8
 
9
- # Model Card for Llama-3.1-8B-Instruct LoRA for Knowledge Incorporation
10
 
11
- This model is a Low-Rank Adaptation (LoRA) of Llama-3.1-8B-Instruct, designed to enhance its question-answering capabilities by incorporating new knowledge, as described in the paper [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
- - **Developed by:** Sergey Pletenev et al.
16
- - **Model type:** `LlamaForCausalLM` with LoRA
 
 
 
 
 
17
  - **Language(s) (NLP):** English
18
- - **License:** CC-BY-4.0
19
  - **Finetuned from model:** meta-llama/Meta-Llama-3.1-8B-Instruct
20
 
21
  ### Model Sources
22
 
23
- - **Repository:** [https://github.com/memyprokotow/knowledge_lora](https://github.com/memyprokotow/knowledge_lora)
24
  - **Paper:** [How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?](https://arxiv.org/abs/2502.14502)
25
- - **Datasets:**
26
- - [Dbpedia dump](https://databus.dbpedia.org/dbpedia/mappings/mappingbased-objects)
27
- - [Precollected triples and questions](https://drive.google.com/file/d/1pCtfRlvBW769384AgmfNBpIU8OmftfKd/view?usp=sharing)
28
- - [Questions with labelled knowledge categories](https://drive.google.com/file/d/1-NDeTa8TMRNY9UIsIqtI-Iw4vq-rda35/view?usp=sharing)
29
 
30
 
31
  ## Uses
32
 
33
  ### Direct Use
34
 
35
- This model can be used for question-answering tasks, particularly those involving the new knowledge incorporated during fine-tuning. It is designed to be used with the base model `meta-llama/Meta-Llama-3.1-8B-Instruct`.
36
 
37
  ### Downstream Use
38
 
39
- This model can be further fine-tuned or used as a starting point for research on knowledge incorporation into LLMs.
40
 
41
  ### Out-of-Scope Use
42
 
43
- This model should not be used for generating harmful, biased, or misleading content. Its performance on general question-answering benchmarks might be impacted after fine-tuning with specific knowledge.
44
 
45
  ## Bias, Risks, and Limitations
46
 
47
- This model inherits the biases present in the base Llama-3.1-8B-Instruct model. Furthermore, the focused fine-tuning may introduce biases related to the new knowledge incorporated. The paper highlights potential performance decline on external question-answering benchmarks and a tendency to over-represent answers related to prominent entities in the training data.
48
 
49
  ### Recommendations
50
 
51
- Users should be aware of the potential biases and limitations of the model. Careful attention should be paid to the composition and balance of the training data to mitigate biases and preserve general question-answering capabilities.
52
-
53
 
54
  ## How to Get Started with the Model
55
 
56
- See the Github repository for detailed instructions on training and using the LoRA adapter with the base Llama model.
57
 
58
  ## Training Details
59
 
60
  ### Training Data
61
 
62
- The model is fine-tuned on a dataset generated using the head-to-tail pipeline with DBpedia as the knowledge source. The data includes known facts, potentially known facts, and unknown facts categorized based on the base model's pre-training knowledge. See the "Data" section of the Github README for details.
 
63
 
64
  ### Training Procedure
65
 
66
- The model is trained using the LoRA technique. Refer to the `lora_train_llama.py` script in the Github repository for training parameters and instructions.
67
 
 
68
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  ## Evaluation
71
 
72
- The paper evaluates the model's performance using a reliability score and investigates different knowledge integration scenarios. See the paper for detailed results and analysis.
73
-
74
 
75
  ## Environmental Impact
76
 
77
- The environmental impact information is not available in the original README. Users can estimate the carbon emissions using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
 
78
 
79
  ## Citation
80
 
@@ -88,4 +101,8 @@ The environmental impact information is not available in the original README. Us
88
  primaryClass={cs.CL},
89
  url={https://arxiv.org/abs/2502.14502},
90
  }
91
- ```
 
 
 
 
 
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/memyprokotow/knowledge-lora-adapt](https://github.com/memyprokotow/knowledge-lora-adapt)
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 3000 Unknown questions with 10 additional Paraphrased 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?.