Engineering strategies for efficient supervised fine-tuning domain-specific LLMs: A Cultural Heritage Case Study

Authors

  • Reynier Hernández Palacios Universidad de Camagüey
  • Reynaldo Alonso Reyes Universidad de Camagüey "Ignacio Agramonte Loynaz"

Keywords:

Large Language Models, Supervised Fine-Tuning, Domain Adaptation, Parameter-Efficient Fine-Tuning, Question Answering Systems

Abstract

Large Language Models (LLMs) achieve strong performance on general-purpose tasks, yet their adaptation to highly specialized domains remains challenging under computational constraints. This work presents a methodological case study on supervised fine-tuning (SFT) of the Qwen 1.5 7B model for question–answering tasks in a specialized domain, using cultural heritage as a validation case. We propose a resource-efficient fine-tuning pipeline that combines parameter-efficient adaptation techniques and computational optimizations, including DoRA, QLoRA with low-bit quantization, Flash Attention, and gradient checkpointing, enabling training on consumer-grade hardware (NVIDIA RTX 3090, 24 GB VRAM). The model was fine-tuned on a dataset of 1,000 to 4,000 question–answer pairs, generated through LLM-assisted workflows and validated via expert review. Systematic qualitative evaluation demonstrated clear improvements in domain-specific contextualization and error reduction compared to the base model. These results demonstrate the feasibility of specializing LLMs for highly contextual domains under resource-constrained environments and provide a replicable methodological framework for domain adaptation projects.

References

Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D., Wu, J., Winter, C., ... Amodei, D. (2020). Language models are few-shot learners. Advances in Neural Information Processing Systems, 33, 1877-1901.

Chen, T., Xu, B., Zhang, C., & Guestrin, C. (2016). Training deep nets with sublinear memory cost. arXiv preprint arXiv:1604.06174.

Dao, T., Fu, D. Y., Ermon, S., Rudra, A., & Ré, C. (2022). FlashAttention: Fast and memory-efficient exact attention with IO-awareness. Advances in Neural Information Processing Systems, 35, 16344-16359.

Dettmers, T., Pagnoni, A., Holtzman, A., & Zettlemoyer, L. (2023). QLoRA: Efficient fine-tuning of quantized LLMs. Advances in Neural Information Processing Systems, 36.

Gururangan, S., Marasović, A., Swayamdipta, S., Lo, K., Beltagy, I., Downey, D., & Smith, N. A. (2020). Don't stop pretraining: Adapt language models to domains and tasks. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 8342-8360.

Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., & Chen, W. (2022). LoRA: Low-rank adaptation of large language models. International Conference on Learning Representations.

Kestemont, M., Manjavacas, E., & Daelemans, W. (2022). LLMs in digital humanities research. Proceedings of the Computational Humanities Research Conference 2022, 311-326.

Landis, J. R., & Koch, G. G. (1977). The measurement of observer agreement for categorical data. Biometrics, 33(1), 159–174.

Liu, S., Wang, C., Yin, H., Molchanov, P., Wang, Y. C., Cheng, K. T., & Chen, M. H. (2024). DoRA: Weight-decomposed low-rank adaptation. arXiv preprint arXiv:2402.09353.

Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., & Liu, P. J. (2020). Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140), 1-67.

Schofield, A., Thompson, P., & Mimno, D. (2023). Humanities scholars and the use of large language models. Digital Scholarship in the Humanities, 38(4), 1567-1582.

Zhao, W. X., Zhou, K., Li, J., Tang, T., Wang, X., Hou, Y., Min, Y., Zhang, B., Zhang, J., Dong, Z., Du, Y., Yang, C., Chen, Y., Chen, Z., Jiang, J., Ren, R., Li, Y., Tang, X., Liu, Z., ... Wen, J. R. (2023). A survey of large language models. arXiv preprint arXiv:2303.18223.

Published

2026-04-23

How to Cite

Hernández Palacios, R., & Alonso Reyes, R. . (2026). Engineering strategies for efficient supervised fine-tuning domain-specific LLMs: A Cultural Heritage Case Study. Revista Cubana De Transformación Digital, 7, e303:1–13. Retrieved from https://rctd.uic.cu/rctd/article/view/303