Skip to content

Fine-tuned using parameter-efficient LoRA adapters on 945k+ customer support tweets, enabling context-aware response generation while reducing memory by 60% using 8-bit quantization.

Notifications You must be signed in to change notification settings

ferozk0333/Fine-Tuning-Gemma-with-LoRA-for-Customer-Support-Automation

Repository files navigation

Fine-Tuning-Gemma-with-LoRA-for-Customer-Support-Automation

This project fine-tunes the Gemma-7b model using LoRA (Low-Rank Adaptation) on a customer support tweet dataset from Hugging Face to generate automated support replies efficiently.

Objective

Train a memory-efficient LLM to generate accurate, context-aware customer support responses.

Tools & Libraries

Steps

  1. Load Dataset & Tokenizer

    • Used mo-customer-support-tweets-945k dataset.
    • Loaded and modified the tokenizer with a [PAD] token.
  2. Tokenize Dataset

    • Tokenized both input (customer inquiries) and output (responses).
    • Used padding and truncation.
  3. Load & Prepare Gemma Model

    • Loaded model in 8-bit with load_in_8bit=True.
    • Configured LoRA (rank=16, alpha=32, dropout=0.1).
    • Applied LoRA to attention modules (q_proj, v_proj).
  4. Training Setup

    • Defined TrainingArguments (batch size, epochs, learning rate, fp16).
    • Used Trainer and DataCollatorForSeq2Seq.
  5. Train & Save

    • Trained for 3 epochs with gradient accumulation.
    • Saved both model and tokenizer for inference.

About

Fine-tuned using parameter-efficient LoRA adapters on 945k+ customer support tweets, enabling context-aware response generation while reducing memory by 60% using 8-bit quantization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published