Close Menu
techwavedispatch.com

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    I Put the Best Digital Notebooks to the Test. Here Are My Favorites (2026)

    November 14, 2026

    Winemakers are learning that conservation can be good for business

    November 14, 2026

    Parameter-Efficient Fine-Tuning using πŸ€— PEFT

    November 14, 2026
    Facebook X (Twitter) Instagram
    Trending
    • I Put the Best Digital Notebooks to the Test. Here Are My Favorites (2026)
    • Winemakers are learning that conservation can be good for business
    • Parameter-Efficient Fine-Tuning using πŸ€— PEFT
    • OpenAI reassigns robotics researchers to other teams as general-purpose models might make specialized robotics AI unnecessary
    • 10 Best Early Black Friday Headphone Deals (2026): Up to 50% Off
    • Zero-shot image-to-text generation with BLIP-2
    • It’s Time to Run an Audit of All the Cloud Storage Links You’ve Shared
    • Anthropic can already retrain Mythos with “a fraction of the compute originally needed,” says former researcher Coxon
    Facebook X (Twitter) Instagram
    techwavedispatch.com
    Subscribe
    Saturday, November 14
    • Home
    • AI Tools & Software
    • Machine Learning
    • Generative AI
    • Robotics & Automation
    • Future Tech & Hardware
    • AI in Business
    • Ethics & Regulations
    • More
      • Gadgets & Smart Devices
      • Cybersecurity & AI
      • Tech Breakthroughs
    techwavedispatch.com
    Home»AI Tools & Software»Parameter-Efficient Fine-Tuning using πŸ€— PEFT
    AI Tools & Software

    Parameter-Efficient Fine-Tuning using πŸ€— PEFT

    adminBy adminNovember 14, 2026No Comments5 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Parameter-Efficient Fine-Tuning using πŸ€— PEFT
    Share
    Facebook Twitter LinkedIn Pinterest Email



    Motivation

    Large Language Models (LLMs) based on the transformer architecture, like GPT, T5, and BERT have achieved state-of-the-art results in various Natural Language Processing (NLP) tasks. They have also started foraying into other domains, such as Computer Vision (CV) (VIT, Stable Diffusion, LayoutLM) and Audio (Whisper, XLS-R). The conventional paradigm is large-scale pretraining on generic web-scale data, followed by fine-tuning to downstream tasks. Fine-tuning these pretrained LLMs on downstream datasets results in huge performance gains when compared to using the pretrained LLMs out-of-the-box (zero-shot inference, for example).

    However, as models get larger and larger, full fine-tuning becomes infeasible to train on consumer hardware. In addition, storing and deploying fine-tuned models independently for each downstream task becomes very expensive, because fine-tuned models are the same size as the original pretrained model. Parameter-Efficient Fine-tuning (PEFT) approaches are meant to address both problems!

    PEFT approaches only fine-tune a small number of (extra) model parameters while freezing most parameters of the pretrained LLMs, thereby greatly decreasing the computational and storage costs. This also overcomes the issues of catastrophic forgetting, a behaviour observed during the full finetuning of LLMs. PEFT approaches have also shown to be better than fine-tuning in the low-data regimes and generalize better to out-of-domain scenarios. It can be applied to various modalities, e.g., image classification and stable diffusion dreambooth.

    It also helps in portability wherein users can tune models using PEFT methods to get tiny checkpoints worth a few MBs compared to the large checkpoints of full fine-tuning, e.g., bigscience/mt0-xxl takes up 40GB of storage and full fine-tuning will lead to 40GB checkpoints for each downstream dataset whereas using PEFT methods it would be just a few MBs for each downstream dataset all the while achieving comparable performance to full fine-tuning. The small trained weights from PEFT approaches are added on top of the pretrained LLM. So the same LLM can be used for multiple tasks by adding small weights without having to replace the entire model.

    In short, PEFT approaches enable you to get performance comparable to full fine-tuning while only having a small number of trainable parameters.

    Today, we are excited to introduce the πŸ€— PEFT library, which provides the latest Parameter-Efficient Fine-tuning techniques seamlessly integrated with πŸ€— Transformers and πŸ€— Accelerate. This enables using the most popular and performant models from Transformers coupled with the simplicity and scalability of Accelerate. Below are the currently supported PEFT methods, with more coming soon:

    1. LoRA: LORA: LOW-RANK ADAPTATION OF LARGE LANGUAGE MODELS
    2. Prefix Tuning: P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Tasks
    3. Prompt Tuning: The Power of Scale for Parameter-Efficient Prompt Tuning
    4. P-Tuning: GPT Understands, Too



    Use Cases

    We explore many interesting use cases here. These are a few of the most interesting ones:

    1. Using πŸ€— PEFT LoRA for tuning bigscience/T0_3B model (3 Billion parameters) on consumer hardware with 11GB of RAM, such as Nvidia GeForce RTX 2080 Ti, Nvidia GeForce RTX 3080, etc using πŸ€— Accelerate’s DeepSpeed integration: peft_lora_seq2seq_accelerate_ds_zero3_offload.py. This means you can tune such large LLMs in Google Colab.

    2. Taking the previous example a notch up by enabling INT8 tuning of the OPT-6.7b model (6.7 Billion parameters) in Google Colab using πŸ€— PEFT LoRA and bitsandbytes: Open In Colab

    3. Stable Diffusion Dreambooth training using πŸ€— PEFT on consumer hardware with 11GB of RAM, such as Nvidia GeForce RTX 2080 Ti, Nvidia GeForce RTX 3080, etc. Try out the Space demo, which should run seamlessly on a T4 instance (16GB GPU): smangrul/peft-lora-sd-dreambooth.

    peft lora dreambooth gradio space
    PEFT LoRA Dreambooth Gradio Space



    Training your model using πŸ€— PEFT

    Let’s consider the case of fine-tuning bigscience/mt0-large using LoRA.

    1. Let’s get the necessary imports
      from transformers import AutoModelForSeq2SeqLM
    + from peft import get_peft_model, LoraConfig, TaskType
      model_name_or_path = "bigscience/mt0-large"
      tokenizer_name_or_path = "bigscience/mt0-large"
    
    1. Creating config corresponding to the PEFT method
    peft_config = LoraConfig(
        task_type=TaskType.SEQ_2_SEQ_LM, inference_mode=False, r=8, lora_alpha=32, lora_dropout=0.1
    )
    
    1. Wrapping base πŸ€— Transformers model by calling get_peft_model
      model = AutoModelForSeq2SeqLM.from_pretrained(model_name_or_path)
    + model = get_peft_model(model, peft_config)
    + model.print_trainable_parameters()
    # output: trainable params: 2359296 || all params: 1231940608 || trainable%: 0.19151053100118282
    

    That’s it! The rest of the training loop remains the same. Please refer example peft_lora_seq2seq.ipynb for an end-to-end example.

    1. When you are ready to save the model for inference, just do the following.
    model.save_pretrained("output_dir") 
    
    

    This will only save the incremental PEFT weights that were trained. For example, you can find the bigscience/T0_3B tuned using LoRA on the twitter_complaints raft dataset here: smangrul/twitter_complaints_bigscience_T0_3B_LORA_SEQ_2_SEQ_LM. Notice that it only contains 2 files: adapter_config.json and adapter_model.bin with the latter being just 19MB.

    1. To load it for inference, follow the snippet below:
      from transformers import AutoModelForSeq2SeqLM
    + from peft import PeftModel, PeftConfig
    
      peft_model_id = "smangrul/twitter_complaints_bigscience_T0_3B_LORA_SEQ_2_SEQ_LM"
      config = PeftConfig.from_pretrained(peft_model_id)
      model = AutoModelForSeq2SeqLM.from_pretrained(config.base_model_name_or_path)
    + model = PeftModel.from_pretrained(model, peft_model_id)
      tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
    
      model = model.to(device)
      model.eval()
      inputs = tokenizer("Tweet text : @HondaCustSvc Your customer service has been horrible during the recall process. I will never purchase a Honda again. Label :", return_tensors="pt")
    
      with torch.no_grad():
          outputs = model.generate(input_ids=inputs["input_ids"].to("cuda"), max_new_tokens=10)
          print(tokenizer.batch_decode(outputs.detach().cpu().numpy(), skip_special_tokens=True)[0])
    # 'complaint'
    



    Next steps

    We’ve released PEFT as an efficient way of tuning large LLMs on downstream tasks and domains, saving a lot of compute and storage while achieving comparable performance to full finetuning. In the coming months, we’ll be exploring more PEFT methods, such as (IA)3 and bottleneck adapters. Also, we’ll focus on new use cases such as INT8 training of whisper-large model in Google Colab and tuning of RLHF components such as policy and ranker using PEFT approaches.

    In the meantime, we’re excited to see how industry practitioners apply PEFT to their use cases – if you have any questions or feedback, open an issue on our GitHub repo πŸ€—.

    Happy Parameter-Efficient Fine-Tuning!

    Finetuning ParameterEfficient PEFT
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    admin
    • Website

    Related Posts

    OpenAI reassigns robotics researchers to other teams as general-purpose models might make specialized robotics AI unnecessary

    November 14, 2026

    Zero-shot image-to-text generation with BLIP-2

    November 14, 2026

    Anthropic can already retrain Mythos with “a fraction of the compute originally needed,” says former researcher Coxon

    November 14, 2026
    Leave A Reply Cancel Reply

    Top Posts

    NVIDIA Is Investigating Reports That CEO Jensen Huang Was The Target Of Chinese Spy Efforts

    November 8, 202619 Views

    ADIndex: Layer-Adaptive Sparse Attention Indexing via Group-Level Distillation

    November 11, 20265 Views

    Anthropic releases new Mythos and Fable models amid RSI concerns

    November 9, 20265 Views

    One Policy for 100 Household Tasks: Our Solution for the 2026 BEHAVIOR Challenge

    November 11, 20264 Views
    Don't Miss
    Gadgets & Smart Devices

    I Put the Best Digital Notebooks to the Test. Here Are My Favorites (2026)

    By adminNovember 14, 20260

    Comparing Our Favorite Digital NotebooksOur Favorite Smart PensNeo Smartpen M1+ for $129: If you don’t…

    Winemakers are learning that conservation can be good for business

    November 14, 2026

    Parameter-Efficient Fine-Tuning using πŸ€— PEFT

    November 14, 2026

    OpenAI reassigns robotics researchers to other teams as general-purpose models might make specialized robotics AI unnecessary

    November 14, 2026
    About Us

    Welcome to TechWave Dispatch

    At TechWave Dispatch, we bring you the latest news, insights, and developments from the ever-evolving world of technology. Our mission is to keep readers informed about the innovations shaping our digital future.

    From artificial intelligence and machine learning to cybersecurity, robotics, smart devices, and groundbreaking technologies, we cover the topics that matter in today's fast-moving tech landscape.

    Our Picks

    I Put the Best Digital Notebooks to the Test. Here Are My Favorites (2026)

    November 14, 2026

    Winemakers are learning that conservation can be good for business

    November 14, 2026

    Parameter-Efficient Fine-Tuning using πŸ€— PEFT

    November 14, 2026
    Most Popular

    Who Controls Scientific Discovery? – O’Reilly

    November 6, 20260 Views

    After blocking Muse, Amazon now lets users text Alexa to help them shop

    November 6, 20260 Views

    A controlled world for robot learning and evaluation

    November 6, 20260 Views
    Facebook X (Twitter) Instagram Pinterest
    • Terms and Conditions
    • Privacy Policy
    • Contact Us
    • About Us
    Β© 2026 TechWave Dispatch. All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.