


This sparse training method for large models with high accuracy and low resource consumption has been found.
Recently, Alibaba Cloud Machine Learning PAI's paper "Parameter-Efficient Sparsity for Large Language Models Fine-Tuning" on sparse training of large models was accepted by IJCAI 2022, the top artificial intelligence conference.
The paper proposes a parameter-efficient sparse training algorithm PST. By analyzing the importance index of the weight, it is concluded that it has two characteristics: low rank and structure. Based on this conclusion, the PST algorithm introduces two sets of small matrices to calculate the importance of weights. Compared with the original need for a matrix as large as the weight to save and update the importance index, the amount of parameters that need to be updated for sparse training is greatly reduced. Compared with commonly used sparse training algorithms, the PST algorithm can achieve similar sparse model accuracy while only updating 1.5% of parameters.
Background
In recent years, major companies and research institutions have proposed a variety of large models. These large models have parameters ranging from tens of billions to tens of thousands. It ranges from billions to hundreds of billions, and even super-large models of tens of trillions have appeared. These models require a large amount of hardware resources to train and deploy, which makes them difficult to implement. Therefore, how to reduce the resources required for large model training and deployment has become an urgent problem.
Model compression technology can effectively reduce the resources required for model deployment. By removing some weights, sparse calculations in the model can be converted from dense calculations to sparse calculations, thereby reducing memory usage and speeding up calculations. . At the same time, compared with other model compression methods (structured pruning/quantization), sparseness can achieve a higher compression rate while ensuring model accuracy, and is more suitable for large models with a large number of parameters.
Challenge
The existing sparse training methods can be divided into two categories, one is weight-based data-free sparse algorithm; the other is data-based data -driven sparse algorithm. The weight-based sparse algorithm is shown in the figure below, such as magnitude pruning [1], which evaluates the importance of the weight by calculating the L1 norm of the weight, and generates the corresponding sparse result based on this. The weight-based sparse algorithm is computationally efficient and does not require the participation of training data, but the calculated importance index is not accurate enough, thus affecting the accuracy of the final sparse model.
The data-based sparse algorithm is shown in the figure below, such as movement pruning[2], which measures the importance of the weight by calculating the product of the weight and the corresponding gradient. sexual indicators. This type of method takes into account the role of weights on specific data sets and therefore can more accurately assess the importance of weights. However, due to the need to calculate and save the importance of each weight, this type of method often requires additional space to store the importance index (S in the figure). At the same time, compared with weight-based sparse methods, the calculation process is often more complex. These shortcomings become more obvious as the size of the model increases.
To sum up, the previous sparse algorithms are either efficient but not accurate enough (weight-based algorithm), or accurate but not efficient enough (data-based algorithm). algorithm). Therefore, we hope to propose an efficient sparse algorithm that can accurately and efficiently perform sparse training on large models.
Breaking
The problem with data-based sparse algorithms is that they generally introduce additional parameters of the same size as the weights to learn the importance of the weights, which brings us to Think about how to reduce the importance of introducing extra parameters to calculate weights. First, in order to maximize the use of existing information to calculate the importance of weights, we design the importance index of weights as the following formula:
That is, we combine data-free and data-driven indicators to jointly determine the importance of the final model weights. It is known that the previous data-free importance index does not require additional parameters to save and is efficient in calculation, so what we need to solve is how to compress the additional training parameters introduced by the later data-driven importance index.
Based on the previous sparse algorithm, the data-driven importance index can be designed as
, so we started to analyze the redundancy of the importance indicator calculated by this formula. First of all, based on previous work, it is known that both weights and corresponding gradients have obvious low-rank properties [3, 4], so we can deduce that the importance index also has low-rank properties, so we can introduce two low-rank properties A small matrix to represent the original importance indicator matrix that is as large as the weights.
Secondly, we analyzed the results after model sparseness and found that they have obvious structural characteristics. As shown in the figure above, the right side of each picture is the visualization result of the final sparse weight, and the left side is a histogram that counts the corresponding sparsity rate of each row/column. It can be seen that most of the weights in 30% of the rows in the left picture have been removed, and conversely, most of the weights in 30% of the columns in the right picture have been removed. Based on this phenomenon, we introduce two small structured matrices to evaluate the importance of each row/column of weights.
Based on the above analysis, we found that the data-driven importance index has low rank and structure, so we can convert it into the following representation:
where A and B represent low rank, and R and C represent structure. Through such analysis, the importance index matrix, which was originally as large as the weight, was decomposed into four small matrices, thus greatly reducing the training parameters involved in sparse training. At the same time, in order to further reduce training parameters, we decomposed the weight update into two small matrices U and V based on the previous method, so the final importance index formula becomes the following form:
The corresponding algorithm framework diagram is as follows:
The final PST algorithm experimental results are as follows. We are Compared with magnitude pruning and movement pruning on NLU (BERT, RoBERTa) and NLG (GPT-2) tasks, at a sparsity rate of 90%, PST can achieve model accuracy comparable to the previous algorithm on most data sets, but Only 1.5% of training parameters are required.
PST technology has been integrated into the model compression library of Alibaba Cloud Machine Learning PAI, as well as the Alicemind platform large model In the sparse training function. It has brought performance acceleration to the use of large models within the Alibaba Group. On the tens of billions of large model PLUGs, PST can accelerate 2.5 times without reducing model accuracy and reduce memory usage by 10 times compared with the original sparse training. . At present, Alibaba Cloud Machine Learning PAI has been widely used in various industries, providing full-link AI development services, realizing independent and controllable AI solutions for enterprises, and comprehensively improving the efficiency of machine learning engineering.
Paper name: Parameter-Efficient Sparsity for Large Language Models Fine-Tuning
Paper author: Yuchao Li, Fuli Luo, Chuanqi Tan, Mengdi Wang , Songfang Huang , Shen Li , Junjie Bai
Paper pdf link: https://arxiv.org/pdf/2205.11005.pdf
The above is the detailed content of This sparse training method for large models with high accuracy and low resource consumption has been found.. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Imagine an artificial intelligence model that not only has the ability to surpass traditional computing, but also achieves more efficient performance at a lower cost. This is not science fiction, DeepSeek-V2[1], the world’s most powerful open source MoE model is here. DeepSeek-V2 is a powerful mixture of experts (MoE) language model with the characteristics of economical training and efficient inference. It consists of 236B parameters, 21B of which are used to activate each marker. Compared with DeepSeek67B, DeepSeek-V2 has stronger performance, while saving 42.5% of training costs, reducing KV cache by 93.3%, and increasing the maximum generation throughput to 5.76 times. DeepSeek is a company exploring general artificial intelligence

AI is indeed changing mathematics. Recently, Tao Zhexuan, who has been paying close attention to this issue, forwarded the latest issue of "Bulletin of the American Mathematical Society" (Bulletin of the American Mathematical Society). Focusing on the topic "Will machines change mathematics?", many mathematicians expressed their opinions. The whole process was full of sparks, hardcore and exciting. The author has a strong lineup, including Fields Medal winner Akshay Venkatesh, Chinese mathematician Zheng Lejun, NYU computer scientist Ernest Davis and many other well-known scholars in the industry. The world of AI has changed dramatically. You know, many of these articles were submitted a year ago.

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

Boston Dynamics Atlas officially enters the era of electric robots! Yesterday, the hydraulic Atlas just "tearfully" withdrew from the stage of history. Today, Boston Dynamics announced that the electric Atlas is on the job. It seems that in the field of commercial humanoid robots, Boston Dynamics is determined to compete with Tesla. After the new video was released, it had already been viewed by more than one million people in just ten hours. The old people leave and new roles appear. This is a historical necessity. There is no doubt that this year is the explosive year of humanoid robots. Netizens commented: The advancement of robots has made this year's opening ceremony look like a human, and the degree of freedom is far greater than that of humans. But is this really not a horror movie? At the beginning of the video, Atlas is lying calmly on the ground, seemingly on his back. What follows is jaw-dropping

Earlier this month, researchers from MIT and other institutions proposed a very promising alternative to MLP - KAN. KAN outperforms MLP in terms of accuracy and interpretability. And it can outperform MLP running with a larger number of parameters with a very small number of parameters. For example, the authors stated that they used KAN to reproduce DeepMind's results with a smaller network and a higher degree of automation. Specifically, DeepMind's MLP has about 300,000 parameters, while KAN only has about 200 parameters. KAN has a strong mathematical foundation like MLP. MLP is based on the universal approximation theorem, while KAN is based on the Kolmogorov-Arnold representation theorem. As shown in the figure below, KAN has

Today I would like to share a recent research work from the University of Connecticut that proposes a method to align time series data with large natural language processing (NLP) models on the latent space to improve the performance of time series forecasting. The key to this method is to use latent spatial hints (prompts) to enhance the accuracy of time series predictions. Paper title: S2IP-LLM: SemanticSpaceInformedPromptLearningwithLLMforTimeSeriesForecasting Download address: https://arxiv.org/pdf/2403.05798v1.pdf 1. Large problem background model

The latest video of Tesla's robot Optimus is released, and it can already work in the factory. At normal speed, it sorts batteries (Tesla's 4680 batteries) like this: The official also released what it looks like at 20x speed - on a small "workstation", picking and picking and picking: This time it is released One of the highlights of the video is that Optimus completes this work in the factory, completely autonomously, without human intervention throughout the process. And from the perspective of Optimus, it can also pick up and place the crooked battery, focusing on automatic error correction: Regarding Optimus's hand, NVIDIA scientist Jim Fan gave a high evaluation: Optimus's hand is the world's five-fingered robot. One of the most dexterous. Its hands are not only tactile

Target detection is a relatively mature problem in autonomous driving systems, among which pedestrian detection is one of the earliest algorithms to be deployed. Very comprehensive research has been carried out in most papers. However, distance perception using fisheye cameras for surround view is relatively less studied. Due to large radial distortion, standard bounding box representation is difficult to implement in fisheye cameras. To alleviate the above description, we explore extended bounding box, ellipse, and general polygon designs into polar/angular representations and define an instance segmentation mIOU metric to analyze these representations. The proposed model fisheyeDetNet with polygonal shape outperforms other models and simultaneously achieves 49.5% mAP on the Valeo fisheye camera dataset for autonomous driving
