akhilfau commited on
Commit
c1fc40e
·
verified ·
1 Parent(s): caabd76

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +98 -0
README.md ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ smollm2-360m-physics-gguf
2
+
3
+ **Author**: [Akhil Vallala](https://www.linkedin.com/in/akhil-fau)
4
+ **Base Model**: [`akhilfau/fine-tuned-smolLM2-360M-with-on-combined_Instruction_dataset`](https://huggingface.co/akhilfau/fine-tuned-smolLM2-360M-with-on-combined_Instruction_dataset)
5
+ **Architecture**: LLaMA (SmolLM2)
6
+ **Parameter count**: 362M
7
+ **Format**: GGUF (Q4_K_M, Q8_0, FP16)
8
+ **License**: Apache 2.0
9
+ **Model Type**: Instruction-tuned Small Language Model (SLM)
10
+ **Use Case**: Solving physics word problems on mobile devices
11
+
12
+ Model Overview
13
+
14
+ This GGUF model is a quantized version of the **Tiny-Physics** model, based on SmolLM2-360M and fine-tuned for **physics word problem solving** using both real and synthetic datasets. It is designed to deliver accurate, low-latency performance on **mobile and edge devices**.
15
+
16
+ Datasets Used
17
+
18
+ - 📘 **camel-ai/physics**: Publicly available dataset with 20,000+ physics QA pairs
19
+ - 📘 **Seed dataset**: Extracted from *1000 Solved Problems in Classical Physics*
20
+ - 🧠 **Synthetic dataset**: 6,279 rigorously validated question-answer pairs generated using a GPT-4o-based multi-agent system
21
+
22
+ These datasets were formatted for instruction tuning using structured prompt–response pairs.
23
+
24
+ Training Details
25
+
26
+ - **Model**: SmolLM2-360M
27
+ - **Fine-tuning**: Instruction fine-tuning with LoRA (Low-Rank Adaptation)
28
+ - **Libraries**: Hugging Face Transformers, TRL, Lighteval
29
+ - **Training Epochs**: 3 (best accuracy observed at 3–5 epochs)
30
+ - **Fine-tuning Objective**: Maximize performance on MMLU College Physics
31
+ - **Best Model Accuracy**: `24.51%` on MMLU College Physics
32
+
33
+ Evaluation
34
+
35
+ **Evaluated with**: [Lighteval](https://github.com/huggingface/lighteval)
36
+ **Benchmark**: [MMLU College Physics](https://huggingface.co/datasets/hendrycks_test)
37
+ **Performance**:
38
+ | Dataset | Accuracy (SmolLM2-360M-Instruct) |
39
+ |-----------------------------|----------------------------------|
40
+ | MMLU: College Physics | 24.51% |
41
+ | Instruction-Tuned camel-ai | 25.49% |
42
+ | Combined Instruction Dataset| 24.51% |
43
+
44
+ GGUF Quantization
45
+
46
+ Model is provided in multiple quantization formats:
47
+ | Format | Size | Accuracy Retention | Inference Speed | RAM Usage | Target Use |
48
+ |----------|--------|--------------------|------------------|---------------|------------------------------------|
49
+ | `Q4_K_M` | ~271MB | ~95–97% | Fast | ~600–800MB | Ideal for mid-range mobile devices |
50
+ | `Q8_0` | ~386MB | ~99% | Medium | ~1–1.5GB | Best for higher-end devices |
51
+ | `FP16` | ~800MB | 100% | Slow | ~2GB+ | Reference use only |
52
+
53
+ How to Use
54
+
55
+ ```bash
56
+ # Using llama.cpp
57
+ ./main -m smollm2-360m-physics-gguf.Q4_K_M.gguf -p "What is the acceleration of a 2kg mass falling from 5 meters?"
58
+ ```
59
+
60
+ Or via `llama-cpp-python`:
61
+
62
+ ```python
63
+ from llama_cpp import Llama
64
+
65
+ llm = Llama(model_path="smollm2-360m-physics-gguf.Q4_K_M.gguf")
66
+ output = llm("What is the potential energy of a 3kg object at 10 meters?")
67
+ ```
68
+
69
+ Intended Use
70
+
71
+ - 📚 **Physics tutoring apps**
72
+ - 📶 **Offline mobile inference**
73
+ - 🧑‍🏫 **Educational tools for conceptual reasoning**
74
+ - 🔋 **Low-power deployment scenarios**
75
+
76
+ Limitations
77
+
78
+ - Not trained on multiple-choice formatted data (MCQ output mismatch possible)
79
+ - Topic imbalance in datasets may affect generalization
80
+ - Not suitable for non-physics or open-domain tasks
81
+
82
+ Carbon Footprint
83
+
84
+ Training and fine-tuning consumed approx. **2.64 kg CO₂e**, equivalent to a ~7-mile car ride. This was achieved using local GPU resources (RTX A5500) and energy-efficient batch tuning with LoRA.
85
+
86
+
87
+
88
+ Citation
89
+
90
+ ```bibtex
91
+ @misc{vallala2025tinyphysics,
92
+ title={Tiny-Physics: A Compact Large Language Model for Physics Word Problems on Mobile Devices},
93
+ author={Akhil Vallala},
94
+ year={2025},
95
+ howpublished={\url{https://huggingface.co/akhilfau/smollm2-360m-physics-gguf}},
96
+ }
97
+ ```
98
+