The GaLore algorithm was originally designed to perform lower-order gradient approximation for matrices using Singular Value Decomposition (SVD). This pull request extends the algorithm to support general tensor decomposition, allowing it to handle tensors of dimension greater than 2. A particular example is given in the usage of Neural Operators which are used to solve Partial Differential Equations (The tensors here are 5 dimensional).
Changes:
Implemented the GaLoreProjectorTensor class in Python to perform projection using orthogonal matrix decomposition for low-rank approximation of gradients for general tensors.
The GaLore algorithm was originally designed to perform lower-order gradient approximation for matrices using Singular Value Decomposition (SVD). This pull request extends the algorithm to support general tensor decomposition, allowing it to handle tensors of dimension greater than 2. A particular example is given in the usage of Neural Operators which are used to solve Partial Differential Equations (The tensors here are 5 dimensional).
Changes:
GaLoreProjectorTensor
class in Python to perform projection using orthogonal matrix decomposition for low-rank approximation of gradients for general tensors.get_orthogonal_matrix
method to compute the orthogonal matrix using Tucker decomposition instead of SVD.transform
andinverse_transform
methods to handle general tensors using thetenalg.multi_mode_dot
function from TensorLy.project
andproject_back
methods to work with general tensors.Benefits:
Please review the changes and provide any feedback or suggestions for improvement. Let me know if you have any questions or concerns.