paper

A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Time

arXiv:2309.07418

Abstract

Large language models (LLMs) have played a pivotal role in revolutionizing various facets of our daily existence. Solving attention regression is a fundamental task in optimizing LLMs. In this work, we focus on giving a provable guarantee for the one-layer attention network objective function . Here is Kronecker product between and . is a matrix in , is the -th block of . The are variables we want to learn. and is one entry at -th row and -th column of , is the -column vector of , and is the vectorization of . In a multi-layer LLM network, the matrix can be viewed as the output of a layer, and can be viewed as the input of a layer. The matrix version of can be viewed as and can be viewed as . We provide an iterative greedy algorithm to train loss function up that runs in time. Here denotes the time of multiplying matrix another matrix, and denotes the exponent of matrix multiplication.

A Fast Optimization View: Reformulating Single Layer Attention in LLM Based on Tensor and SVM Trick, and Solving It in Matrix Multiplication Time · wovepaper