Downloads · 30 days
0
nileshkendre/qwen2.5-3b-qlora-sft
qwen2.5-3b-qlora-sft is a text generation model from nileshkendre. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository contains a Parameter-Efficient Fine-Tuned (PEFT) version of Qwen2.5-3B-Instruct using the QLoRA (Quantized Low-Rank Adaptation) technique.
Downloads · 30 days
0
Access
Public
Updated Aug 4, 2026
Repo size
1.2 GB
Likes
0
Public
Click a slice to open those files.
.safetensors240 MB · 95%
From the Hugging Face model README
This repository contains a Parameter-Efficient Fine-Tuned (PEFT) version of Qwen2.5-3B-Instruct using the QLoRA (Quantized Low-Rank Adaptation) technique.
The objective of this project was to implement an end-to-end Large Language Model (LLM) fine-tuning pipeline using the Hugging Face ecosystem. The model was instruction-tuned on the Guanaco LLaMA2 1K dataset using TRL's SFTTrainer, 4-bit quantization, and LoRA adapters.
This project demonstrates practical experience with modern LLM fine-tuning techniques, efficient GPU utilization, and model publishing on Hugging Face Hub.
| Item | Value |
|---|---|
| Base Model | Qwen/Qwen2.5-3B-Instruct |
| Model Size | 3 Billion Parameters |
| Fine-Tuning Method | PEFT |
| Technique | QLoRA |
| Training Method | Supervised Fine-Tuning (SFT) |
| Framework | Hugging Face Transformers |
| Trainer | TRL SFTTrainer |
| Quantization | 4-bit NF4 |
| Dataset | mlabonne/guanaco-llama2-1k |
| Hardware | NVIDIA Tesla T4 GPU |
The primary objective of this project was to gain hands-on experience with parameter-efficient fine-tuning of Large Language Models while minimizing GPU memory consumption.
The project covers the complete workflow:
The model was fine-tuned using the public mlabonne/guanaco-llama2-1k instruction dataset.
Dataset characteristics:
The end-to-end workflow consisted of the following steps:
| Parameter | Value |
|---|---|
| Epochs | 1 |
| Batch Size | 1 |
| Gradient Accumulation | 2 |
| Learning Rate | 2e-4 |
| Optimizer | paged_adamw_8bit |
| Precision | BF16 |
| Quantization | 4-bit NF4 |
| Double Quantization | Enabled |
| Max Sequence Length | 1024 |
| LoRA Rank (r) | 64 |
| LoRA Alpha | 16 |
| LoRA Dropout | 0.1 |
LoRA adapters were applied to the following transformer projection layers:
| Metric | Value |
|---|---|
| Total Parameters | 3.21 Billion |
| Trainable Parameters | 119.7 Million |
| Trainable Percentage | 3.74% |
Only LoRA adapter weights were updated during training while the original Qwen base model remained frozen.
Parameter-Efficient Fine-Tuning (PEFT) enables efficient adaptation of Large Language Models by training only a small subset of additional parameters instead of updating the entire model.
Benefits include:
QLoRA combines Low-Rank Adaptation (LoRA) with 4-bit quantization.
Advantages include:
adapter_config.json
adapter_model.safetensors
chat_template.jinja
tokenizer.json
tokenizer_config.json
training_args.bin
README.md
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-3B-Instruct"
)
tokenizer = AutoTokenizer.from_pretrained(
"Qwen/Qwen2.5-3B-Instruct"
)
model = PeftModel.from_pretrained(
base_model,
"nileshkendre/qwen2.5-3b-qlora-sft"
)
This repository contains only the LoRA adapter weights and does not include the original Qwen2.5-3B-Instruct base model.
The model was trained on the public mlabonne/guanaco-llama2-1k dataset containing approximately 1,000 instruction-response pairs. It is intended as an educational and portfolio project demonstrating the complete QLoRA fine-tuning workflow.
Additional domain-specific fine-tuning, evaluation, and safety testing would be required before production deployment.
Possible future enhancements include:
This project was built using the following open-source technologies:
Nilesh Kendre
AI / ML Engineer | Generative AI | LLMs | Agentic AI | RAG | NLP
This repository demonstrates hands-on implementation of modern Large Language Model fine-tuning using QLoRA, PEFT, TRL, and the Hugging Face ecosystem. The project showcases practical experience in parameter-efficient training, adapter-based fine-tuning, and model deployment workflows.