Downloads · 30 days
0
IntelLabs/lonas-llama-7b-commonsense-adapter
lonas-llama-7b-commonsense-adapter is a machine learning model from IntelLabs. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
The super-adapter-network fine-tuned on LLaMA-7B with some commonsense reasoning datasets using LoNAS.
Downloads · 30 days
0
Access
Public
Updated Feb 12, 2025
Repo size
286 MB
Likes
4
Public
Click a slice to open those files.
.safetensors286 MB · 100%
From the Hugging Face model README
The super-adapter-network fine-tuned on LLaMA-7B with some commonsense reasoning datasets using LoNAS.
Large Language Models (LLMs) continue to grow, reaching hundreds of billions of parameters and making it challenging for Deep Learning practitioners with resource-constrained systems to use them, e.g., fine-tuning these models for a downstream task of their interest. Adapters, such as low-rank adapters (LoRA), have been proposed to reduce the number of trainable parameters in a model, reducing memory requirements and enabling smaller systems to fine-tune these models. Orthogonal to this work, Neural Architecture Search (NAS) has been used to discover compressed and more efficient architectures without sacrificing performance compared to similar base models. This paper introduces a novel approach, LoNAS, to use NAS on language models by exploring a search space of elastic low-rank adapters while reducing memory and compute requirements of full-scale NAS, resulting in high-performing compressed models obtained from weight-sharing super-networks. Compared to models fine-tuned with LoRA, these models contain fewer total parameters, reducing the inference time with only minor decreases in accuracy and, in some cases, even improving accuracy. We discuss the limitations of LoNAS and share observations for the research community regarding its generalization capabilities, which have motivated our follow-up work.
Please note, we only provide the model adapter and do not provide a copy of the base yahma/llama-7b-hf model. Any use of this adapter requires a separate download of the base model.
Unified commonsense reasoning dataset: commonsense_15k.json.
BoolQ, PIQA, SIQA, HellaSwag, WinoGrande, ARC-e, ARC-c, OBQA.
Refer to https://github.com/IntelLabs/Hardware-Aware-Automated-Machine-Learning/tree/main/LoNAS#evaluation:
CUDA_VISIBLE_DEVICES=${DEVICES} python run_commonsense.py \
--dataset_path None \
--model_name_or_path yahma/llama-7b-hf \
--lora \
--lora_weights lonas-llama-7b-commonsense \
--nncf_config nncf_config/unified_commonsense/nncf_lonas_llama_7b.json \
--do_test \
--output_dir lonas-llama-7b-commonsense/results
Results of the heuristic sub-network discoverd from the super-network:
| Method | Total Params. | TFLOPs | BoolQ | PIQA | SIQA | HellaSwag | WinoG | Arc-e | Arc-c | OBQA | Average |
|---|---|---|---|---|---|---|---|---|---|---|---|
| LoRA | 6.7B | 1.7 | 62.6 | 75.3 | 67.9 | 52.9 | 58.6 | 79.2 | 58.3 | 71.2 | 65.8 |
| LoNAS | 5.6B | 1.4 | 62.9 | 73.0 | 68.7 | 51.4 | 63.9 | 72.3 | 58.5 | 71.0 | 65.2 |
Repository: https://github.com/IntelLabs/Hardware-Aware-Automated-Machine-Learning/tree/main/LoNAS
Paper:
Intel is committed to respecting human rights and avoiding causing or contributing to adverse impacts on human rights. See Intel’s Global Human Rights Principles. Intel’s products and software are intended only to be used in applications that do not cause or contribute to adverse impacts on human rights.
| Ethical Considerations | Description |
|---|---|
| Data | The adapter was trained using the commonsense_15k data mixture as described above. |
| Human life | The model is not intended to inform decisions central to human life or flourishing. |
| Mitigations | No additional risk mitigation strategies were considered during model development. |
| Risks and harms | This model has not been assessed for harm or biases, and should not be used for sensitive applications where it may cause harm. |
| Use cases | - |
@inproceedings{munoz-etal-2024-lonas,
title = "{L}o{NAS}: Elastic Low-Rank Adapters for Efficient Large Language Models",
author = "Munoz, Juan Pablo and
Yuan, Jinjie and
Zheng, Yi and
Jain, Nilesh",
editor = "Calzolari, Nicoletta and
Kan, Min-Yen and
Hoste, Veronique and
Lenci, Alessandro and
Sakti, Sakriani and
Xue, Nianwen",
booktitle = "Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)",
month = may,
year = "2024",
address = "Torino, Italia",
publisher = "ELRA and ICCL",
url = "https://aclanthology.org/2024.lrec-main.940",
pages = "10760--10776",
}
Apache-2.0