Fine-tuning a model changed one of its big matrices of weights. Storing the whole change costs as much as the matrix itself, but this change is special: every row is the same pattern, scaled by some amount. Write compress(change): return two short lists, [column, row], that rebuild it: change[i][j] = column[i] * row[j] for every i and j.
Fine-tuning changed a grid of weights, and storing the change costs as much as the grid. But look at the rows: every one is the same pattern times some amount. Store an amount per row and the pattern, and a million numbers become two thousand.
compress(change)| change | a list of rows, every row the same pattern times some amount | e.g. [[2, −4, 6, 1, −2], [1, −2, 3, 0.5, −1], [… |
| returns | [column, row] with change[i][j] == column[i] * row[j] | |