TechyCode commited on
Commit
a020885
·
verified ·
1 Parent(s): 9534366

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +69 -3
README.md CHANGED
@@ -1,3 +1,69 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - tinyllama
5
+ - sciq
6
+ - multiple-choice
7
+ - peft
8
+ - lora
9
+ - 4bit
10
+ - quantization
11
+ - instruction-tuning
12
+ datasets:
13
+ - allenai/sciq
14
+ language:
15
+ - en
16
+ library_name: transformers
17
+ pipeline_tag: text-generation
18
+ ---
19
+
20
+ # 🧠 TinyLLaMA-1.1B LoRA Fine-tuned on SciQ Dataset
21
+
22
+ This is a **TinyLLaMA-1.1B** model fine-tuned using **LoRA (Low-Rank Adaptation)** on the [SciQ](https://huggingface.co/datasets/allenai/sciq) multiple-choice question answering dataset. It uses **4-bit quantization** via `bitsandbytes` to reduce memory usage and improve inference efficiency.
23
+
24
+ ## 🧪 Use Cases
25
+
26
+ This model is suitable for:
27
+
28
+ - Educational QA bots
29
+ - MCQ-style reasoning
30
+ - Lightweight inference on constrained hardware (e.g., GPUs with <8GB VRAM)
31
+
32
+ ## 🛠️ Training Details
33
+
34
+ - Base Model: `TinyLlama/TinyLlama-1.1B-Chat-v1.0`
35
+ - Dataset: `allenai/sciq` (Science QA)
36
+ - Method: Parameter-Efficient Fine-Tuning using LoRA
37
+ - Quantization: 4-bit using `bitsandbytes`
38
+ - Framework: 🤗 Transformers + PEFT + Datasets
39
+
40
+ ## 🧬 Model Architecture
41
+
42
+ - Model: Causal Language Model
43
+ - Fine-tuned layers: `q_proj`, `v_proj` (via LoRA)
44
+ - Quantization: 4-bit (bnb config)
45
+
46
+ ## 📊 Evaluation
47
+
48
+ - Accuracy: **100%** on a 1000-sample SciQ subset
49
+ - Eval Loss: ~0.19
50
+
51
+ ## 💡 How to Use
52
+
53
+ ```python
54
+ from transformers import AutoModelForCausalLM, AutoTokenizer
55
+
56
+ model = AutoModelForCausalLM.from_pretrained("your-username/tinyllama-sciq-lora")
57
+ tokenizer = AutoTokenizer.from_pretrained("your-username/tinyllama-sciq-lora")
58
+
59
+ prompt = """Question: What is the boiling point of water?\nChoices:\nA. 50°C\nB. 75°C\nC. 90°C\nD. 100°C\nAnswer:"""
60
+ inputs = tokenizer(prompt, return_tensors="pt")
61
+ outputs = model.generate(**inputs, max_new_tokens=20)
62
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
63
+
64
+ ## 🔐 License
65
+ This model is released under the MIT License.
66
+
67
+ ## 🙌 Credits
68
+ FineTuned By - [Uditanshu Pandey](https://huggingface.co/TechyCode)
69
+ Based on - [TinyLLaMA-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)