Fine-Tuning and Evaluating Distilled DeepSeek Models for Code Reasoning
Authors
Abstract
Source code reasoning is a critical aspect of software engineering, demanding language models capable of understanding, generating, and reasoning about complex program logic. This paper evaluates the effectiveness of distilled large language models (LLMs) fine-tuned for reasoning over code. We focus on three models distilled from DeepSeek-R1: two based on the Qwen architecture (with 1.5B and 7B parameters) and one based on LLaMA (8B parameters). All models were fine-tuned on the CodeAlpaca-DeepSeek-32B-Reasoning dataset, which emphasizes logical coherence in code generation and comprehension tasks. Performance was assessed using the ROUGE-L metric. The results demonstrate that the DeepSeek-Distill-Qwen-1.5B model achieved the highest ROUGE-L score at 43%, followed by the Qwen-7B model at 40%. In contrast, the LLaMA-8B model lagged significantly behind with only 10%. These findings suggest that the Qwen-based models outperform their LLaMA-based counterpart, despite having fewer parameters. The superior performance of the Qwen architecture highlights the importance of architectural compatibility and distillation strategy in enhancing reasoning capabilities for code tasks. This study provides empirical evidence that smaller, well-distilled models can rival or surpass larger models in specific domains. It suggests that optimizing architectural alignment and task-specific fine-tuning is more beneficial than merely increasing model size, especially for practical deployments requiring computational efficiency. ©2025 IEEE.
Keywords
Code reasoning
DeepSeek Distilled
Fine-tuning
LLMs
Model Reasoning
BibTeX
OpenAlex ↗@inproceedings{W7126045949,
author = {Van-Viet Nguyen and Huu-Khanh Nguyen and Kim-Son Nguyen and Hue Luong Thi Minh and Duc-Quang Vu and The-Vinh Nguyen and Tan-Ha Mai},
title = {{Fine-Tuning and Evaluating Distilled DeepSeek Models for Code Reasoning}},
booktitle = {International Conference on Advanced Computing and Analytics (ACOMPA)},
year = {2025},
month = {11},
pages = {37--41},
doi = {10.1109/acompa69200.2025.00013},
url = {https://doi.org/10.1109/acompa69200.2025.00013}
}