Abstract:
This project focuses on fine-tuning four lightweight language models—Phi-1, Phi-1.5, Phi-2, and TinyL- lama—for novel recipe generation using a recipe dataset sourced from MongoDB. The process involved data preprocessing, tokenization, fine-tuning with Parameter-Efficient Fine-Tuning (PEFT) and Quan- tized Low-Rank Adaptation (QLoRA), and evaluation using BLEU, METEOR, BERTScore, and Per- plexity metrics. The results show that Phi-1.5 achieved the best performance (BLEU: 0.7399, METEOR: 0.9281, BERTScore: 0.9533, Perplexity: 39.55), indicating high-quality and coherent recipe generation. TinyLlama exhibited potential hallucination due to its high perplexity (5044.15). This work demon- strates the efficacy of efficient fine-tuning techniques for domain-specific text generation in culinary applications.