🤖 chatbot-v2 — TinyLLaMA Instruction-Tuned Chatbot (LoRA)
chatbot-v2
is a lightweight, instruction-following conversational AI model based on TinyLLaMA and fine-tuned using LoRA adapters. It has been trained on a carefully curated mixture of open datasets covering assistant-like responses, code generation, summarization, safety alignment, and dialog reasoning.
This model is ideal for embedding into mobile or edge apps with low-resource inference needs or running via an API.
🧠 Base Model
- Model:
TinyLlama/TinyLlama-1.1B-Chat
- Architecture: Decoder-only Transformer (GPT-style)
- Fine-tuning method: LoRA (low-rank adapters)
- LoRA Parameters:
r=16
alpha=32
dropout=0.05
- Target modules:
q_proj
,v_proj
📚 Training Datasets
The model was fine-tuned on the following instruction-following, summarization, and dialogue datasets:
tatsu-lab/alpaca
— Stanford Alpaca datasetdatabricks/databricks-dolly-15k
— Dolly instruction dataknkarthick/dialogsum
— Summarization of dialogsAnthropic/hh-rlhf
— Harmless/helpful/honest alignment dataOpenAssistant/oasst1
— OpenAssistant dialoguesnomic-ai/gpt4all_prompt_generations
— Instructional prompt-response pairssahil2801/CodeAlpaca-20k
— Programming/code generation instructionsOpen-Orca/OpenOrca
— High-quality responses to complex questions
🔧 Intended Use
This model is best suited for:
- Conversational agents / chatbots
- Instruction-following assistants
- Lightweight AI on edge devices (via server inference)
- Educational tools and experiments
🚫 Limitations
- This model is not suitable for production use without safety reviews.
- It may generate inaccurate or biased responses, as training data is from public sources.
- It is not safe for sensitive or medical domains.
💬 Example Prompt
Instruction:
Explain the difference between supervised and unsupervised learning.
Response:
Supervised learning uses labeled data to train models, while unsupervised learning uses unlabeled data to discover patterns or groupings in the data…
📥 How to Load the Adapters
To use this model, load the base TinyLLaMA model and apply the LoRA adapters:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained(
"TinyLlama/TinyLlama-1.1B-Chat",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat")
model = PeftModel.from_pretrained(base_model, "sahil239/chatbot-v2")
📄 License
This model is distributed under the Apache 2.0 License.
🙏 Acknowledgements
Thanks to the open-source datasets and projects: Alpaca, Dolly, OpenAssistant, Anthropic, OpenOrca, CodeAlpaca, GPT4All, and Hugging Face.