Session D: Automatic Control, IT and Artificial Intelligence

Comparing QLoRA fine-tuning of a general-purpose and a mathema-tically specialized LLM on Serbian mathematics competition tasks

Marina Svičević¹*, Miloš Pavković², Nemanja Vučićević¹, Aleksandar Milenković¹, Aleksandar Milutinović¹
1 University of Kragujevac, Faculty of Science, Kragujevac, Serbia
2 Singidunum University, Belgrade, Serbia
Corresponding author: Marina Svičević · marina.svicevic@pmf.kg.ac.rs

Abstract

This paper examines the effect of QLoRA fine-tuning of locally executable large language models on mathematics competition tasks for high school students in Serbia. The main focus is on comparing the general-purpose model Mistral-7B-Instruct and the mathematically specialized model Mathstral-7B, in order to determine whether prior specialization for mathematical reasoning affects the success of fine-tuning on a small, domain-specific corpus of tasks in Serbian. For the purposes of the study, an automatic evaluation framework was applied, in which generated solutions were assessed according to several criteria, including final answer accuracy, logical coherence of the solution, and explanation quality. The results indicate different effects of fine-tuning for the observed models: the general-purpose model showed a slight performance decline, while the mathematically specialized model showed an improvement. This outcome suggests that models previously adapted to mathematical reasoning may benefit more from domain-specific fine-tuning, while also confirming that Serbian mathematics competition tasks remain a highly demanding test for locally executable large language models.

Keywords

Large language modelsQLoRA fine-tuningMistral-7B-InstructMathstral-7BMathematics competitionsAutomatic evaluationMathematical reasoning

Cite this paper

Recommended citation · Engineering TODAY style
M. Svičević, M. Pavković, N. Vučićević, A. Milenković, and A. Milutinović, “Comparing QLoRA fine-tuning of a general-purpose and a mathema-tically specialized LLM on Serbian mathematics competition tasks”, Proceedings of the XII International Triennial Conference Engineering TODAY (ET 2026), Vrnjačka Banja (Serbia), pp. D97–D103, https://doi.org/10.46793/ET26.D12S, (2026)