Th3r0 commited on
Commit
8487cf1
1 Parent(s): f386160

added more info page

Browse files
Files changed (1) hide show
  1. app.py +21 -2
app.py CHANGED
@@ -519,8 +519,27 @@ with gr.Blocks(
519
  btnSTSStats.click(fn=displayMetricStatsTextSTSLora, outputs=STSLoraStats)
520
 
521
  with gr.Tab("More information"):
522
- gr.Markdown("stuff to add")
523
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
 
525
  if __name__ == "__main__":
526
  demo.launch()
 
519
  btnSTSStats.click(fn=displayMetricStatsTextSTSLora, outputs=STSLoraStats)
520
 
521
  with gr.Tab("More information"):
522
+ with gr.Row():
523
+ gr.Markdown("<h1>More Information on the Project</h1>")
524
+ with gr.Row():
525
+ with gr.Column(scale=1):
526
+ gr.Markdown("""
527
+ <img style="width: 320px;height: 180px;position:center;" src="https://assets-global.website-files.com/601be0f0f62d8b2e2a92b830/647617bf24dd28930978918d_fine-tuning-ai.png"/>
528
+ """)
529
+ with gr.Column(scale=3):
530
+ gr.Markdown("""<h2>Objective</h2>
531
+ <p> Large Language Models (LLM) are complex natural language processing algorithms which can perform a multitude of tasks. These models outperform the average individual in many standardized tests, but they lack the ability to provide accurate results in specialized tasks. In the past, general purpose models have been fine tuned to provide domain-specific knowledge. However, as models become more complex, the number of parameters increases; just this year, we have witnessed an over 500x increase between GPT-3 and GPT-4, as such the computational cost of conventional fine tuning in some cases makes it prohibitive to do so. In this Engineering design project, we have been tasked to investigate fine tuning strategies to provide a more efficient solution to train LLMs on a singular GPU.</p>
532
+ """)
533
+ with gr.Row():
534
+ with gr.Column(scale=2):
535
+ gr.Markdown("""<h2>Theory of LoRA</h2>
536
+ <p> In the world of deep learning, Low-Rank adaptation (LoRA) stands out as an efficient strategy for fine tuning Large Language models. Being a subset of parameter efficient fine tuning (PEFT), LoRA is a targeted fine tuning process, which minimizes the necessity for retraining the entire model and substantially reduces computational costs.</p>
537
+ <p> The fundamental property that LoRA is built on is the assumption that the large matrices which compose the layers of modern LLM models have an intrinsically low rank. The rank of a matrix refers to the number of linearly independent variables, and this is important because this means that we can decompose layers into much smaller matrices reducing the number of training parameters without losing information. A very simple example of this would be to imagine a 100 x 100 matrix with a rank of 2 which would have a 10 '000 trainable parameters. Should we decompose this matrix following the theorem we can create two constituent matrixes which can be multiplied together to restore the original. The decomposition matrices would be of sizes 100 x 2 and 2 x 100 resulting in only 400 trainable parameters, a 96% decrease. As the number of parameters are directly correlated to the amount of time required for training this is a massive difference. </p>
538
+ """)
539
+ with gr.Column(scale=1):
540
+ gr.Markdown("""<br><br><br><br>
541
+ <img style="width: 644px;height: 180px;" src="https://docs.h2o.ai/h2o/latest-stable/h2o-docs/_images/glrm_matrix_decomposition.png"/>
542
+ """)
543
 
544
  if __name__ == "__main__":
545
  demo.launch()