Thanks for your response. We have addressed your concerns here.
>I am confused about the necessity of adopting a stack-based data structure to merge the local A_i and B_i modules. It seems that we can just adopt a set to store all modules.
While storing all modules in a set does indeed have the same memory cost as our proposed method, it remains impractical in real-world scenarios for two primary reasons:
**(1) Incompatibility with LoRA Implementation:** LoRA is not implementable when stored separately. In LoRA-fine-tuned language models, the LoRA modules can be utilized without merging them into the base model parameters, allowing the LoRA modules and the original model parameters to be stored together. As discussed in the LoRA paper [1], the forward pass is represented as:
$h = \Delta x + W x=W x+BAx,$
where $BA$ represents the LoRA parameter. In our FLoRA approach, the A and B are global LoRA modules. However, if we store all modules separately, the inference stage would require the computation:
$h = \Delta x + Wx = Wx + B_0A_0x + B_1A_1x + B_2A_2x + … + B_{K-1}A_{K-1} x,$
This necessitates applying $K$ LoRA modules within a single base model, which introduces iterative computations that are inefficient and impractical during the inference stage. Moreover, current LoRA codebases do not support this approach, where a single base model integrates multiple LoRA modules. The inconvenience of using a set to store LoRA modules becomes particularly problematic as the number of clients increases.
**(2) Incompatibility with Multi-Round Federated Fine-Tuning:** Storing LoRA modules to a set cannot effectively support multi-round federated fine-tuning. In subsequent rounds, fine-tuning requires an updated base model, necessitating updating the base model on the server or the clients. Updating on the server, as discussed in our rebuttal, incurs significantly higher communication costs. Conversely, updating on the clients imposes a substantial computational burden on each client, making this approach impractical.
>It appears that the communication cost is linear to the number of selected clients and the rank of A and B modules. Could the method still save communication costs when the number of selected clients is large or the rank is large?
Yes, we are indeed able to save communication costs when using a widely applied LoRA rank.
LoRA is commonly employed for fine-tuning models because it significantly reduces computational resource demands. This advantage hinges on the premise that the LoRA rank is much smaller than the rank of the model parameters themselves. The key prerequisite for using LoRA is that the number of parameters in LoRA must be substantially smaller than that of the base model. Otherwise, the benefits of LoRA would be negated, making full fine-tuning a more efficient option. Therefore, the LoRA rank should not be so large that it surpasses the communication resources required for transmitting the model’s original parameters.
Regarding the number of selected clients, it is important to note that the commonly used LoRA rank is typically about 1/100 of the base model size. For instance, in the case of Llama-7b, which has 4096x4096 full parameters, a typical LoRA configuration might use only 16x4096 parameters. This relationship can be expressed as:
$P_{LoRA} << P_{full}$
,where $P$ is the parameter size. When the clients send parameters to the server, FLoRA can consistently save communication costs because:
$P_{LoRA} < P_{full}$
This inequality holds true whenever LoRA is used. Moreover, when the server sends parameters back to the clients, FLoRA can also save communication costs under the condition:
$2K < P_{full}/P_{LoRA}$
Given that $P_{full}/P_{LoRA}$ is typically greater than 100 in fine-tuning scenarios, and federated fine-tuning server generally lack the communication resources to support extensive client communication (e.g., current works use 10 clients [2]), FLoRA proves effective in reducing communication cost.
References:
[1] Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., ... & Chen, W. (2021). Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685.
[2] Chen, J., Xu, W., Guo, S., Wang, J., Zhang, J., & Wang, H. (2022). Fedtune: A deep dive into efficient federated fine-tuning with pre-trained transformers. arXiv preprint arXiv:2211.08025.