smollm2-360m-physics-gguf
Author: Akhil Vallala
Base Model: akhilfau/fine-tuned-smolLM2-360M-with-on-combined_Instruction_dataset
Architecture: LLaMA (SmolLM2)
Parameter count: 362M
Format: GGUF (Q4_K_M, Q8_0, FP16)
License: Apache 2.0
Model Type: Instruction-tuned Small Language Model (SLM)
Use Case: Solving physics word problems on mobile devices
Model Overview
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.
Datasets Used
- ๐ camel-ai/physics: Publicly available dataset with 20,000+ physics QA pairs
- ๐ Seed dataset: Extracted from 1000 Solved Problems in Classical Physics
- ๐ง Synthetic dataset: 6,279 rigorously validated question-answer pairs generated using a GPT-4o-based multi-agent system
These datasets were formatted for instruction tuning using structured promptโresponse pairs.
Training Details
- Model: SmolLM2-360M
- Fine-tuning: Instruction fine-tuning with LoRA (Low-Rank Adaptation)
- Libraries: Hugging Face Transformers, TRL, Lighteval
- Training Epochs: 3 (best accuracy observed at 3โ5 epochs)
- Fine-tuning Objective: Maximize performance on MMLU College Physics
- Best Model Accuracy:
24.51%
on MMLU College Physics
Evaluation
Evaluated with: Lighteval
Benchmark: MMLU College Physics
Performance:
Dataset | Accuracy (SmolLM2-360M-Instruct) |
---|---|
MMLU: College Physics | 24.51% |
Instruction-Tuned camel-ai | 25.49% |
Combined Instruction Dataset | 24.51% |
GGUF Quantization
Model is provided in multiple quantization formats:
Format | Size | Accuracy Retention | Inference Speed | RAM Usage | Target Use |
---|---|---|---|---|---|
Q4_K_M |
~271MB | ~95โ97% | Fast | ~600โ800MB | Ideal for mid-range mobile devices |
Q8_0 |
~386MB | ~99% | Medium | ~1โ1.5GB | Best for higher-end devices |
FP16 |
~800MB | 100% | Slow | ~2GB+ | Reference use only |
How to Use
# Using llama.cpp
./main -m smollm2-360m-physics-gguf.Q4_K_M.gguf -p "What is the acceleration of a 2kg mass falling from 5 meters?"
Or via llama-cpp-python
:
from llama_cpp import Llama
llm = Llama(model_path="smollm2-360m-physics-gguf.Q4_K_M.gguf")
output = llm("What is the potential energy of a 3kg object at 10 meters?")
Intended Use
- ๐ Physics tutoring apps
- ๐ถ Offline mobile inference
- ๐งโ๐ซ Educational tools for conceptual reasoning
- ๐ Low-power deployment scenarios
Limitations
- Not trained on multiple-choice formatted data (MCQ output mismatch possible)
- Topic imbalance in datasets may affect generalization
- Not suitable for non-physics or open-domain tasks
Carbon Footprint
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.
Citation
@misc{vallala2025tinyphysics,
title={Tiny-Physics: A Compact Large Language Model for Physics Word Problems on Mobile Devices},
author={Akhil Vallala},
year={2025},
howpublished={\url{https://huggingface.co/akhilfau/smollm2-360m-physics-gguf}},
}
- Downloads last month
- 59