LLM-Adapters
Code for EMNLP 2023 Paper on Parameter-Efficient Fine-Tuning of LLMs
GraphCanon updated today · GitHub synced today
Decision brief
LLM-Adapters offers Python-based tools for efficient fine-tuning of language models with Apache-2.0 licensing.
Good fit when
- Optimizing resource usage when you need to fine-tune large language models without altering their core parameters
- Your project involves parameter-efficient updates, following the latest research trends outlined in EMNLP 2023
Avoid when
- You require a full retraining approach that modifies all model weights, not just adapters
- Your project timeline does not allow for integrating and testing new methodologies from recent papers like EMNLP 2023
Observed Jul 12, 2026 · Source: enrich:decision_facts
Verify the decision
Maintenance and security
Full trust report- Maintenance
- Dormant (896d since push)
- As of today
- Provenance
- Not a fork · Organization account
- As of today
- Security (OSV)
- No lockfile
- As of 1mo
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
pip install LLM-Adapters PyPISimilar tools
Same-category neighbours. No typed graph edges are catalogued for this tool yet.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
Repository contains code and resources related to the research paper on developing an adapter family for parameter-efficient fine-tuning of large language models.
Capability facts
- Languages
- python
Source: github.language+pyproject.toml · Aug 24, 2026
Categories
Compatibility
Sourced claims from the README excerpt - not unsourced marketing copy.
Source: README excerpt (regex_v1, Aug 24, 2026)
pip install -r requirements.txtSource link
Source: README excerpt (regex_v1, Aug 24, 2026)
ased commonsense170k dataset and the The LLaMA-13B-Parallel model outformances ChatGPT on 8 commonsense benchmarks.Source link
Tags
README
LLM-Adapters
LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language Models
LLM-Adapters is an easy-to-use framework that integrates various adapters into LLMs and can execute adapter-based PEFT methods of LLMs for different tasks. LLM-Adapter is an extension of HuggingFace's PEFT library, many thanks for their amazing work! Please find our paper at this link: https://arxiv.org/abs/2304.01933.The framework includes state-of-the-art open-access LLMs: LLaMa, OPT, BLOOM, and GPT-J, as well as widely used adapters such as Bottleneck adapters, Parallel adapters, and LoRA.
Supported Adapters:
- LoRA: LORA: LOW-RANK ADAPTATION OF LARGE LANGUAGE MODELS
- AdapterH: Parameter-Efficient Transfer Learning for NLP
- AdapterP: GMAD-X: An Adapter-Based Framework for Multi-Task Cross-Lingual Transfer
- Parallel: TOWARDS A UNIFIED VIEW OF PARAMETER-EFFICIENT TRANSFER LEARNING
- Prefix Tuning: Prefix-Tuning: Optimizing Continuous Prompts for Generation, P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Tasks
- P-Tuning: GPT Understands, Too
- Prompt Tuning: The Power of Scale for Parameter-Efficient Prompt Tuning
Latest News 🔥🔥
- [2023-08-10] LLM-Adapters has been accepted by EMNLP 2023.
- [2023-07-16] we released commonsense170k dataset and the The LLaMA-13B-Parallel model outformances ChatGPT on 8 commonsense benchmarks.
- [2023-04-21] We released math10k dataset and the LLaMA-13B adapter checkpoints. The LLaMA-13B-Parallel model achieves 91% of GPT-3.5 performance!
- [2023-04-10] We can support GPT-Neo and ChatGLM now!
- [2023-04-04] Release code and dataset
Special Announcement
The math_10k.json data is collected with the training sets of GSM8K, MAWPS, and AQuA(1000 examples). However, MAWPS consists of AddSub, MultiArith, SingleOp, SingleEq, SimulEq-S, SimulEq-L. Thus, we can't utilize MultiArith, AddSub, and SingleEq as evaluation benchmarks with models trained with math_10k.json. We evaluate the PEFT methods on the MAWPS test set instead, and the result table has been updated (The findings in the paper are consistent). Furthermore, two variations of math_10k.json have been uploaded, math_7K.json where the MAWPS samples have been deleted, and math_14k.json where the MAWPS samples have been deleted as well and we combine ChatGPT and GPT-4 rationales. Sincerely apologize for any inconvenience!
Setup
- Install dependencies
pip install -r requirements.txt
- Set environment variables, or modify the files referencing
BASE_MODEL:
# Files referencing `BASE_MODEL`
# export_hf_checkpoint.py
# export_state_dict_checkpoint.py
export BASE_MODEL=yahma/llama-7b-hf
Both finetune.py and generate.py use --base_model flag as shown further below.
- If bitsandbytes doesn't work, install it from source. Windows users can follow these instructions.
Training(finetune.py)
This file contains some code related to prompt construction and tokenization.In this file, specify different adapters and different sets of data, so that different models can be trained.
Example usage for multiple GPUs:
WORLD_SIZE=2 CUDA_VISIBLE_DEVICES=0,1 torchrun --nproc_per_node=2 --master_port=3192 finetune.py \
--base_m
For agents
This page has a .md twin and JSON over the API.