AB
AiBoss
project

MiLoRA – A joint initiative by Shanghai University of Finance and Economics, Southern University of Science and Technology, and Tsinghua University – has launched a fine-tuning method for LLMs.

MiLoRA is a parameter-efficient fine-tuning method for large language models (LLMs) that reduces computational and memory costs by updating the secondary singularities of the weight matrix. The method is based on singular value decomposition (SVD) to divide the weight matrix into primary and secondary components...

What is MiLoRA?

MiLoRA is a parameter-efficient fine-tuning method for large language models (LLMs) that updates the secondary singularities of the matrix by updating the weight components.To reduce computational and memory costs, the method uses Singular Value Decomposition (SVD) to divide the weight matrix into primary and secondary parts. The primary part contains important knowledge, while the secondary part contains noise or long-tail information. During fine-tuning, MiLoRA keeps the primary part unchanged and optimizes only the secondary part, preserving the knowledge of the pre-trained model while adapting to new tasks. Experiments show that MiLoRA outperforms traditional methods on multiple benchmarks, with higher training and inference efficiency.

MiLoRA's main functions

  • Efficient parameter fine-tuningMiLoRA uses fewer parameter adjustments to fine-tune large language models, reducing the need for computational resources.
  • Reduce delayMiLoRA reduces latency when generating new tags in multi-tenant environments by using a prompt-based routing mechanism.
  • Performance improvementMiLoRA demonstrates better performance than traditional LoRA methods in various natural language processing tasks.
  • Expert SystemEach LoRA module is treated as an expert, and the most suitable expert is dynamically selected for processing based on the routing mechanism.
  • AdaptabilityThe model dynamically determines which LoRA experts to activate based on input prompts, thereby improving the model's adaptability and flexibility.

MiLoRA's technical principles

  • LoRA module as an expertIn MiLoRA, each LoRA module is treated as an expert, responsible for handling a specific task or subset of data.
  • Prompt-based routing mechanismMiLoRA introduces an input-prompt-based routing mechanism that calculates expert routing results before generating the first new tag and reuses these results in subsequent tag generation, avoiding the need to perform routing calculations for each new tag.
  • Low-rank adaptation (LoRA)The weights of the Transformer layer are reparameterized based on a low-rank matrix, enabling efficient parameter adjustment.
  • Dynamic Expert SelectionAt the Transformer level, MiLoRA dynamically selects which LoRA expert (i.e., which Transformer module's LoRA) is activated.
  • Load balancing lossesTo balance the use of different LoRA experts, MiLoRA incorporates load balancing loss during training to ensure that the model does not overly rely on any particular expert.

MiLoRA's project address

Application scenarios of MiLoRA

  • Natural Language Processing TasksMiLoRA is applied to various NLP tasks, such as text classification, sentiment analysis, question answering systems, and machine translation, to improve the performance of models on specific tasks.
  • Multi-tenant environmentIn cloud computing or service platforms, it is used to optimize resource utilization, reduce latency, and improve user experience.
  • Online content generationIn applications that require real-time content generation, such as chatbots and content recommendation systems, it improves response speed and processing efficiency.
  • Education and trainingIt can be used in personalized education platforms to adapt to the learning habits and needs of different students based on fine-tuning models.
  • Medical consultation and diagnosisIn the medical field, fine-tuning models can provide more accurate medical advice and diagnostic recommendations.