ChatFiles icon indicating copy to clipboard operation
ChatFiles copied to clipboard

解析文件功能开发了吗

Open not-Ilyina opened this issue 1 year ago • 2 comments

It's straightforward, using low-rank approximation, low-rank matrix factorization.

Given a model and its fine-tuning, and a target rank $k$, extract the "best" low-rank approximation to each difference in the model weights, and export as LoRA.

The parameter $k$ can be a constant or can be unique to each matrix, e.g. $k_i$ for $W_i \in \Theta$

To summarize, given $W' - W = \Delta W$, find $\hat{A},\hat{B}$ each with $k$ rows such that the norm $||\hat{A}^T\hat{B} - \Delta W||_2$ is minimized.

not-Ilyina avatar Apr 08 '23 10:04 not-Ilyina