03 · MoLF
Keep both pathways, update one
So the better parameterization depends on the task, and the spectrum of a finished FFT run is a poor guide to which one it is. MoLF,
short for Mixture of LoRA and Full fine-tuning, moves that choice into the optimizer, so one method can get close to the better of the
two without picking one in advance. We still tuned its dense learning rate and scheduler in each setting, as we did for the baselines.
We call the two pathways experts, but nothing is routed per token: both process the whole batch, and only the weight update is sparse.
1
A dense and a low-rank pathway in every linear projection
The dense weight W is the FFT pathway. Each (A, B) pair is a rank-r LoRA pathway with RS-LoRA scaling. Standard MoLF uses one rank-128
pathway, and because B starts at zero, training starts from exactly the pretrained model.
\[ y = W_{\text{base}}\,x + \sum_{i=1}^{N} \frac{\alpha_i}{\sqrt{r_i}}\, B_i A_i\big(\mathrm{Dropout}(x)\big) \]
2
Both pathways keep their optimizer state current
Every pathway gets the batch gradient and updates its Adam moments at every step, selected or not, and the step counters advance
together. A pathway that sat out for many steps resumes from current moments instead of cold ones.
\[ \begin{aligned} m_t^{(i)} &= \beta_1 m_{t-1}^{(i)} + (1-\beta_1)\, g_t^{(i)} \\ v_t^{(i)} &= \beta_2 v_{t-1}^{(i)} +
(1-\beta_2)\big(g_t^{(i)}\big)^2 \end{aligned} \]
3
Score by expected preconditioned descent
AdamW steps along m/√v, so the raw gradient norm misses the per-coordinate scaling that sets
the actual step. EPD estimates, to first order, how much the loss would drop if this pathway took its Adam step, divided by its
parameter count. It is a heuristic, and it moves with the learning rate, the parameter count and the LoRA scale.
\[ S_t^{(i)} = \frac{\eta_t^{(i)}}{N^{(i)}_{\text{params}}} \sum_{\theta\in\Theta_i}
\frac{\big(m_t^{(i)}\big)^2}{\sqrt{v_t^{(i)}}+\epsilon} \]
4
Update the winner, merge at the end
Within each module, the pathway with the higher score takes the AdamW step, weight decay included, and the other keeps its weights; we
call this Top-1 routing. Every projection decides on its own. After training the LoRA pathway folds into the dense weight, so you ship
a plain checkpoint with no adapter and no router.
\[ W_{\text{final}} = W_{\text{base}} + \sum_{i=1}^{N} \frac{\alpha_i}{\sqrt{r_i}}\, B_i A_i \]