Qwen LoRA Chatbot

A LoRA fine-tuned version of Qwen/Qwen2.5-0.5B trained on instruction-following data using PEFT and TRL.

Model Details

Developed By

Swayam Saini

Model Type

PEFT / LoRA Adapter for Causal Language Modeling

Base Model

Qwen/Qwen2.5-0.5B

Language

English

Frameworks

  • Transformers
  • PEFT
  • TRL

PEFT Version

0.19.1

Training Dataset

Dataset used:

yahma/alpaca-cleaned

The dataset contains instruction-response pairs designed to improve instruction-following behavior.

Fine-Tuning Configuration

  • LoRA Rank (r): 16
  • LoRA Alpha: 32
  • LoRA Dropout: 0.05
  • Precision: FP16
  • Trainer: TRL SFTTrainer

Model Architecture

This repository contains a LoRA adapter trained on top of:

Qwen/Qwen2.5-0.5B

The final chatbot is created by combining:

Base Model + LoRA Adapter

Files

  • adapter_model.safetensors
  • adapter_config.json
  • tokenizer.json
  • tokenizer_config.json
  • chat_template.jinja

Intended Use

This model can be used for:

  • Conversational AI
  • Chatbots
  • Question Answering
  • Educational demonstrations
  • LLM fine-tuning experiments

Limitations

This model may:

  • Hallucinate facts
  • Produce inaccurate information
  • Reflect biases present in training data

Outputs should be reviewed before use in production systems.

Deployment

The adapter can be loaded using:

from transformers import AutoModelForCausalLM
from peft import PeftModel

base_model = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen2.5-0.5B"
)

model = PeftModel.from_pretrained(
    base_model,
    "sainiswayam9/qwen-lora-chatbot"
)

Project Summary

This project demonstrates:

  • LoRA fine-tuning
  • Parameter-efficient training
  • Hugging Face Model Hub integration
  • Hugging Face Space deployment
  • End-to-end LLM workflow

Author

Swayam Saini

Downloads last month
40
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sainiswayam9/qwen-lora-chatbot

Adapter
(418)
this model

Space using sainiswayam9/qwen-lora-chatbot 1