Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔧 LLM Fine-Tuning

LoRA · QLoRA · Unsloth · Low-VRAM Training

Hands-on fine-tuning experiments on Large Language Models (LLMs) with a focus on real inference behavior.


🚀 What This Repository Covers

  • Fine-tuning open-source LLMs on low VRAM GPUs
  • LoRA and QLoRA based training workflows
  • Unsloth optimized training & inference
  • Hyperparameter impact analysis
  • Base vs Fine-Tuned inference comparison

🧠 Models Fine-Tuned

  • LLaMA-family models
  • Mistral
  • Qwen
  • Nemotron

🛠️ Techniques Used

🔹 LoRA (Low-Rank Adaptation)

  • Trainable low-rank adapters
  • Frozen base model weights
  • Efficient and stable fine-tuning

🔹 QLoRA

  • 4-bit quantized base model
  • Enables fine-tuning on consumer GPUs
  • Minor trade-off in long-context precision

🔹 Unsloth

  • Faster training and inference
  • Reduced VRAM usage
  • Optimized attention & adapter kernels

📂 Repository Structure

⚙️ Training Setup

Platform Google Colab / Kaggle
GPU T4 / P100
Precision FP16 / 4-bit
Batching Gradient Accumulation

📊 Hyperparameters Explored

Parameter Values Tested
LoRA Rank (r) 8, 16, 32
Alpha 16, 32, 64
Learning Rate 1e-4 → 2e-5
Epochs 1 – 5

🔍 Inference Observations

  • Improved instruction adherence
  • Reduced hallucination for domain prompts
  • More structured outputs
  • Overfitting with small datasets + high epochs

🧪 Evaluation Strategy

  • Prompt-based comparison (before vs after)
  • Task completion accuracy
  • Response consistency and structure

🧠 Key Learnings

  • Dataset quality > model size
  • LoRA rank tuning matters more than epochs
  • Unsloth speeds up experimentation significantly
  • Inference behavior is the real success metric

🧭 Next Experiments

  • RAG + fine-tuned models
  • Multi-dataset instruction blending
  • Adapter merging & export
  • Deployment-focused quantization

⚠️ Disclaimer: All experiments are for educational and research purposes using publicly available models and datasets.

About

This repository hands-on fine-tuning experiments on Large Language Models (LLMs) using parameter-efficient techniques such as LoRA and QLoRA, executed on limited GPU environments (Google Colab, Kaggle).

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages