Update README.md
Browse files
README.md
CHANGED
|
@@ -1,202 +1,233 @@
|
|
| 1 |
---
|
| 2 |
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 3 |
library_name: peft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
-
# Model Card for
|
| 7 |
-
|
| 8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
|
|
|
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
## Model Details
|
| 13 |
|
| 14 |
### Model Description
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
- **
|
| 21 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
| 28 |
-
### Model Sources
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
- **
|
| 33 |
-
- **Paper [optional]:** [More Information Needed]
|
| 34 |
-
- **Demo [optional]:** [More Information Needed]
|
| 35 |
|
| 36 |
## Uses
|
| 37 |
|
| 38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 39 |
-
|
| 40 |
### Direct Use
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
### Downstream Use
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
| 51 |
|
| 52 |
### Out-of-Scope Use
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
|
| 58 |
## Bias, Risks, and Limitations
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
| 63 |
|
| 64 |
### Recommendations
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
|
|
|
| 69 |
|
| 70 |
## How to Get Started with the Model
|
| 71 |
|
| 72 |
-
Use the code below to
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
## Training Details
|
| 77 |
|
| 78 |
### Training Data
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
|
|
|
|
|
|
|
| 83 |
|
| 84 |
### Training Procedure
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
#### Preprocessing [optional]
|
| 89 |
-
|
| 90 |
-
[More Information Needed]
|
| 91 |
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
#### Training Hyperparameters
|
| 94 |
|
| 95 |
-
- **Training regime:**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
-
#### Speeds, Sizes, Times
|
| 98 |
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
[More Information Needed]
|
| 102 |
|
| 103 |
## Evaluation
|
| 104 |
|
| 105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 106 |
-
|
| 107 |
### Testing Data, Factors & Metrics
|
| 108 |
|
| 109 |
#### Testing Data
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
|
| 115 |
#### Factors
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
|
| 121 |
#### Metrics
|
| 122 |
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
|
|
|
| 126 |
|
| 127 |
### Results
|
| 128 |
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
#### Summary
|
| 132 |
-
|
| 133 |
|
|
|
|
| 134 |
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
|
| 141 |
## Environmental Impact
|
| 142 |
|
| 143 |
-
|
| 144 |
|
| 145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
| 147 |
-
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
|
| 155 |
### Model Architecture and Objective
|
| 156 |
|
| 157 |
-
|
|
|
|
|
|
|
| 158 |
|
| 159 |
### Compute Infrastructure
|
| 160 |
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
#### Hardware
|
| 164 |
|
| 165 |
-
|
| 166 |
|
| 167 |
#### Software
|
| 168 |
|
| 169 |
-
|
|
|
|
| 170 |
|
| 171 |
-
## Citation
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
|
| 175 |
**BibTeX:**
|
| 176 |
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
|
| 179 |
**APA:**
|
| 180 |
|
| 181 |
-
[
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
|
| 185 |
-
|
| 186 |
|
| 187 |
-
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
-
## More Information
|
| 190 |
|
| 191 |
-
|
| 192 |
|
| 193 |
-
## Model Card Authors
|
| 194 |
|
| 195 |
-
|
| 196 |
|
| 197 |
## Model Card Contact
|
| 198 |
|
| 199 |
-
[
|
|
|
|
| 200 |
### Framework versions
|
| 201 |
|
| 202 |
- PEFT 0.8.2
|
|
|
|
| 1 |
---
|
| 2 |
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 3 |
library_name: peft
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- conversational-ai
|
| 7 |
+
- chatbot
|
| 8 |
+
- lora
|
| 9 |
+
- qlora
|
| 10 |
+
- peft
|
| 11 |
+
- nlp
|
| 12 |
+
- openassistant
|
| 13 |
+
- fine-tuning
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# Model Card for Lumo
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
**Lumo** is a lightweight conversational AI adapter fine-tuned using **QLoRA** on top of the open-source **TinyLLaMA 1.1B Chat** base model. It is designed for **learning, experimentation, and student projects**, with a focus on accessibility and transparency.
|
| 19 |
|
| 20 |
+
**Note:** This repository contains **only the LoRA adapter weights**, not the base model.
|
| 21 |
|
| 22 |
## Model Details
|
| 23 |
|
| 24 |
### Model Description
|
| 25 |
|
| 26 |
+
- **Developed by:** Aditya Verma
|
| 27 |
+
- **Model type:** Conversational Language Model (LoRA Adapter)
|
| 28 |
+
- **Language(s) (NLP):** English
|
| 29 |
+
- **License:** Apache 2.0
|
| 30 |
+
- **Finetuned from model:** [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
+
### Model Sources
|
| 33 |
|
| 34 |
+
- **Repository:** Adi362/Lumo
|
| 35 |
+
- **Base Model:** [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
|
| 36 |
+
- **Training Framework:** Hugging Face Transformers + PEFT
|
|
|
|
|
|
|
| 37 |
|
| 38 |
## Uses
|
| 39 |
|
|
|
|
|
|
|
| 40 |
### Direct Use
|
| 41 |
|
| 42 |
+
This model is intended for:
|
| 43 |
+
- Local conversational chatbots
|
| 44 |
+
- Educational AI experiments
|
| 45 |
+
- Student projects involving LLMs
|
| 46 |
+
- Learning how LoRA fine-tuning works
|
| 47 |
+
- Prototyping lightweight AI assistants
|
| 48 |
|
| 49 |
+
*The adapter must be loaded together with the base TinyLLaMA model.*
|
| 50 |
|
| 51 |
+
### Downstream Use
|
| 52 |
|
| 53 |
+
The adapter can be:
|
| 54 |
+
- Combined with other LoRA adapters
|
| 55 |
+
- Further fine-tuned on domain-specific datasets
|
| 56 |
+
- Integrated into APIs or applications
|
| 57 |
+
- Used as a base for research or experimentation
|
| 58 |
|
| 59 |
### Out-of-Scope Use
|
| 60 |
|
| 61 |
+
This model is **not intended** for:
|
| 62 |
+
- High-stakes decision making
|
| 63 |
+
- Medical, legal, or financial advice
|
| 64 |
+
- Production-grade commercial systems without further evaluation
|
| 65 |
+
- Safety-critical applications
|
| 66 |
|
| 67 |
## Bias, Risks, and Limitations
|
| 68 |
|
| 69 |
+
- **Bias:** The model may reflect biases present in the training data (OpenAssistant).
|
| 70 |
+
- **Hallucinations:** It can produce incorrect or misleading information.
|
| 71 |
+
- **Factuality:** Responses should not be treated as factual guarantees.
|
| 72 |
+
- **Performance:** Capabilities are limited by the small size (1.1B parameters) and scope of the base model.
|
| 73 |
|
| 74 |
### Recommendations
|
| 75 |
|
| 76 |
+
Users (both direct and downstream) should:
|
| 77 |
+
- Validate outputs independently.
|
| 78 |
+
- Avoid using the model for critical applications.
|
| 79 |
+
- Apply additional safety layers when deploying in public-facing systems.
|
| 80 |
|
| 81 |
## How to Get Started with the Model
|
| 82 |
|
| 83 |
+
Use the code below to load the base model and the Lumo adapter.
|
| 84 |
+
|
| 85 |
+
```python
|
| 86 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 87 |
+
from peft import PeftModel
|
| 88 |
+
import torch
|
| 89 |
+
|
| 90 |
+
BASE_MODEL = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
|
| 91 |
+
LORA_MODEL = "Adi362/Lumo"
|
| 92 |
|
| 93 |
+
# 1. Load Base Model
|
| 94 |
+
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
|
| 95 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 96 |
+
BASE_MODEL,
|
| 97 |
+
torch_dtype=torch.float32,
|
| 98 |
+
device_map=None
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
+
# 2. Load Lumo Adapter
|
| 102 |
+
model = PeftModel.from_pretrained(model, LORA_MODEL)
|
| 103 |
+
model.eval()
|
| 104 |
|
| 105 |
## Training Details
|
| 106 |
|
| 107 |
### Training Data
|
| 108 |
|
| 109 |
+
The model was trained on a filtered subset of the **OpenAssistant Conversations** dataset.
|
| 110 |
|
| 111 |
+
- **Dataset Name:** OpenAssistant Conversations (English, filtered)
|
| 112 |
+
- **Data Type:** Human–assistant dialogue pairs
|
| 113 |
+
- **Content:** Diverse conversational topics, instructions, and queries.
|
| 114 |
|
| 115 |
### Training Procedure
|
| 116 |
|
| 117 |
+
#### Preprocessing
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
+
The dataset underwent the following preprocessing steps:
|
| 120 |
+
- **Filtering:** Retained only English language conversations.
|
| 121 |
+
- **Formatting:** Constructed user–assistant pairs and formatted them using standard chat-style prompts to suit the base model's expectations.
|
| 122 |
|
| 123 |
#### Training Hyperparameters
|
| 124 |
|
| 125 |
+
- **Training regime:** **QLoRA** (4-bit base model quantization + LoRA adapters)
|
| 126 |
+
- **Precision:** 4-bit (nf4)
|
| 127 |
+
- **Optimizer:** Paged AdamW (8-bit)
|
| 128 |
+
- **Learning Rate:** 2e-4
|
| 129 |
+
- **Epochs:** 2
|
| 130 |
+
- **Batch Size:** 1 (with gradient accumulation)
|
| 131 |
+
- **Trainable Parameters:** ~1.1% of total model parameters
|
| 132 |
|
| 133 |
+
#### Speeds, Sizes, Times
|
| 134 |
|
| 135 |
+
- **Training Time:** ~4–5 hours on a single GPU.
|
|
|
|
|
|
|
| 136 |
|
| 137 |
## Evaluation
|
| 138 |
|
|
|
|
|
|
|
| 139 |
### Testing Data, Factors & Metrics
|
| 140 |
|
| 141 |
#### Testing Data
|
| 142 |
|
| 143 |
+
No formal benchmark datasets were used for this version. The model is intended for educational purposes and low-stakes experimentation.
|
|
|
|
|
|
|
| 144 |
|
| 145 |
#### Factors
|
| 146 |
|
| 147 |
+
Evaluation focused on:
|
| 148 |
+
- **Language:** English only.
|
| 149 |
+
- **Domain:** General conversational ability and basic instruction following.
|
| 150 |
|
| 151 |
#### Metrics
|
| 152 |
|
| 153 |
+
Evaluation was qualitative, focusing on:
|
| 154 |
+
1. **Coherence:** Ability to maintain a conversation flow.
|
| 155 |
+
2. **Instruction Following:** Ability to execute simple prompts.
|
| 156 |
+
3. **Identity:** Correctly identifying itself as an AI assistant.
|
| 157 |
|
| 158 |
### Results
|
| 159 |
|
| 160 |
+
The model demonstrates basic conversational fluency and can handle simple instructions. As a lightweight adapter (~1.1B parameters), it may struggle with complex reasoning or highly specific factual queries compared to larger models.
|
|
|
|
|
|
|
|
|
|
| 161 |
|
| 162 |
+
## Model Examination
|
| 163 |
|
| 164 |
+
*Not applicable for this version.*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
|
| 166 |
## Environmental Impact
|
| 167 |
|
| 168 |
+
Carbon emissions were estimated based on the training hardware and duration.
|
| 169 |
|
| 170 |
+
- **Hardware Type:** NVIDIA Tesla T4 (Cloud GPU)
|
| 171 |
+
- **Hours used:** ~4-5 hours
|
| 172 |
+
- **Cloud Provider:** Google Colab
|
| 173 |
+
- **Compute Region:** Unknown (Colab default)
|
| 174 |
+
- **Carbon Emitted:** Negligible (Low-scale training not formally measured).
|
| 175 |
|
| 176 |
+
## Technical Specifications
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
### Model Architecture and Objective
|
| 179 |
|
| 180 |
+
- **Base Architecture:** Transformer (TinyLLaMA 1.1B)
|
| 181 |
+
- **Adaptation Method:** Low-Rank Adaptation (LoRA)
|
| 182 |
+
- **Objective:** Causal Language Modeling (Next-token prediction)
|
| 183 |
|
| 184 |
### Compute Infrastructure
|
| 185 |
|
|
|
|
|
|
|
| 186 |
#### Hardware
|
| 187 |
|
| 188 |
+
- **GPU:** Single NVIDIA Tesla T4 (16GB VRAM)
|
| 189 |
|
| 190 |
#### Software
|
| 191 |
|
| 192 |
+
- **Orchestration:** Google Colab
|
| 193 |
+
- **Libraries:** Hugging Face Transformers, PEFT, PyTorch, BitsAndBytes
|
| 194 |
|
| 195 |
+
## Citation
|
|
|
|
|
|
|
| 196 |
|
| 197 |
**BibTeX:**
|
| 198 |
|
| 199 |
+
```bibtex
|
| 200 |
+
@misc{verma2025lumo,
|
| 201 |
+
author = {Verma, Aditya},
|
| 202 |
+
title = {Lumo: A LoRA-fine-tuned conversational adapter based on TinyLLaMA},
|
| 203 |
+
year = {2025},
|
| 204 |
+
publisher = {Hugging Face},
|
| 205 |
+
howpublished = {\url{[https://huggingface.co/Adi362/Lumo](https://huggingface.co/Adi362/Lumo)}}
|
| 206 |
+
}
|
| 207 |
|
| 208 |
**APA:**
|
| 209 |
|
| 210 |
+
> Verma, A. (2025). *Lumo: A LoRA-fine-tuned conversational adapter based on TinyLLaMA* [Large Language Model]. Hugging Face. https://huggingface.co/Adi362/Lumo
|
|
|
|
|
|
|
| 211 |
|
| 212 |
+
## Glossary
|
| 213 |
|
| 214 |
+
* **LoRA (Low-Rank Adaptation):** A parameter-efficient fine-tuning technique that freezes the pre-trained model weights and injects trainable rank decomposition matrices into each layer, significantly reducing the number of trainable parameters.
|
| 215 |
+
* **QLoRA (Quantized LoRA):** An efficient fine-tuning approach that quantizes the base model to 4-bit precision (reducing memory usage) while keeping the LoRA adapters in higher precision for training.
|
| 216 |
+
* **PEFT (Parameter-Efficient Fine-Tuning):** A library by Hugging Face that enables efficient adaptation of pre-trained language models to various downstream applications without fine-tuning all the model's parameters.
|
| 217 |
+
* **TinyLlama:** A compact 1.1 billion parameter language model pre-trained on around 1 trillion tokens, designed to be run on edge devices and consumer hardware.
|
| 218 |
|
| 219 |
+
## More Information
|
| 220 |
|
| 221 |
+
This model was created as a student project to demonstrate the feasibility of fine-tuning valid conversational assistants on consumer-grade hardware (Google Colab free tier) using the QLoRA technique.
|
| 222 |
|
| 223 |
+
## Model Card Authors
|
| 224 |
|
| 225 |
+
Aditya Verma
|
| 226 |
|
| 227 |
## Model Card Contact
|
| 228 |
|
| 229 |
+
For bugs, feature requests, or general feedback, please open an issue on the [Project GitHub Repository](https://github.com/Adi362/Lumo) or the Hugging Face Community tab.
|
| 230 |
+
|
| 231 |
### Framework versions
|
| 232 |
|
| 233 |
- PEFT 0.8.2
|