Leveraging LLMs for recipe generation: Knowledge distillation with GPT-2, BART, T5, and LoRA fine-tuning

Loading...
Thumbnail Image

Publisher

Institute of Electrical and Electronics Engineers Inc.

Citation

N. Sakib, N. Gope and M. A. Hosen, "Leveraging LLMs for Recipe Generation: Knowledge Distillation with GPT-2, BART, T5, and LoRA Fine-Tuning," 2025 IEEE International Conference on Future Machine Learning and Data Science (FMLDS), Los Angeles, CA, USA, 2025, pp. 694-700, doi: 10.1109/FMLDS67896.2025.00117.

Abstract

Automatic recipe generation transforms ingredient lists into coherent and logically sequenced cooking instructions, a task that challenges even state-of-the-art language models due to redundancy, inconsistency, and fluency issues. This study proposes an efficient and scalable recipe generation framework using fine-tuned Large Language Models (T5, BART, GPT-2) combined with Low-Rank Adaptation (LoRA) and Knowledge Distillation. To mitigate data scarcity and enhance diversity, a clustering-based downsampling approach was applied to extract 1,000 high-quality samples from a large-scale recipe dataset, followed by systematic preprocessing and refinement using a teacher model. Experimental results demonstrate that BART outperforms in ROUGE metrics, reflecting superior structure and fidelity, while T5 achieves the highest BLEU score, indicating more fluent and semantically rich instructions. The integration of LoRA allowed for parameter-efficient fine-tuning, enabling high performance under limited computational resources. Compared to baseline models, the proposed framework yields significantly more coherent, diverse, and instructionally relevant recipes, establishing a robust foundation for scalable, real-world AI-driven culinary applications.

Description

Publisher Link

Department

Type

Conference Proceeding