Instructions to use 1112lee/kaggle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use 1112lee/kaggle with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2-medium") model = PeftModel.from_pretrained(base_model, "1112lee/kaggle") - Notebooks
- Google Colab
- Kaggle
Download working/peft/docs/source/package_reference/loha.md from 1112lee/kaggle: direct link, hf CLI and curl.
- Browser
- Download file 2.23 kB
-
https://huggingface.co/1112lee/kaggle/resolve/main/working/peft/docs/source/package_reference/loha.md
- Command line
-
hf download hf://1112lee/kaggle/working/peft/docs/source/package_reference/loha.md
-
curl -L -o loha.md https://huggingface.co/1112lee/kaggle/resolve/main/working/peft/docs/source/package_reference/loha.md
LoHa
Low-Rank Hadamard Product (LoHa), is similar to LoRA except it approximates the large weight matrix with more low-rank matrices and combines them with the Hadamard product. This method is even more parameter-efficient than LoRA and achieves comparable performance.
The abstract from the paper is:
In this work, we propose a communication-efficient parameterization, FedPara, for federated learning (FL) to overcome the burdens on frequent model uploads and downloads. Our method re-parameterizes weight parameters of layers using low-rank weights followed by the Hadamard product. Compared to the conventional low-rank parameterization, our FedPara method is not restricted to low-rank constraints, and thereby it has a far larger capacity. This property enables to achieve comparable performance while requiring 3 to 10 times lower communication costs than the model with the original layers, which is not achievable by the traditional low-rank methods. The efficiency of our method can be further improved by combining with other efficient FL optimizers. In addition, we extend our method to a personalized FL application, pFedPara, which separates parameters into global and local ones. We show that pFedPara outperforms competing personalized FL methods with more than three times fewer parameters.
LoHaConfig
[[autodoc]] tuners.loha.config.LoHaConfig
LoHaModel
[[autodoc]] tuners.loha.model.LoHaModel