The learning of mathematics is still difficult for
most learners because of the lack of personalised instruction and insufficient use of intelligent tutoring systems.. This paper presents MathAssist, an offline AI-assisted framework that provides context-aware, stepwise mathematical support using text-based queries, Retrieval-Augmented Generation (RAG), and lightweight Large Language Models (LLMs). While the architecture is designed to support future multimodal extensions(e.g. image-based OCR and voice input), the current prototype processes text-based mathematical problems. A local knowledge base supports semantic retrieval, while a memory-aware serial execution strategy ensures that retrieval and LLM inference are performed sequentially, avoiding unnecessary concurrent resource usage. Nine lightweight open-source LLMs were evaluated on the MathQuest benchmark (42 problems across Easy, Medium, and Hard levels). WizardMath achieved the highest accuracy (91.06%) and was selected as the primary model; Phi-3 ranked second. Resource consumption was monitored in a Python VS Code and Streamlit test-based environment. While non-quantised models consume ∼12-13 GB RAM during inference, we note that 4-bit quantisation reduces their storage sizes to 1.8 to 4.2 GB, suggesting a plausible path toward lower-memory mobile deployment with further optimisation. The main contributions of this work are:
• An evaluation of nine lightweight LLMs on the Math-
Quest dataset, with WizardMath achieving the highest
accuracy of 91.06%.
• A serial execution strategy that keeps retrieval and LLM
inference separate and explicitly loads and unloads the
model to limit peak memory usage.
• An analysis of resource consumption that reports the
baseline (non-quantised) memory footprint and examines
the potential of 4-bit quantization for reducing the resource requirements of mobile deployment
