{"id":{"repo_id":"pretoria","oai_identifier":"oai:repository.up.ac.za:2263/104632"},"canonical_url":"https://search.ndltd.org/etd/pretoria/oai:repository.up.ac.za:2263/104632","repository":{"repo_id":"pretoria","name":"University of Pretoria","base_url":"https://repository.up.ac.za/server/oai/request"},"display":{"title":"Optimizing translation for low-resource languages : efficient fine-tuning with custom prompt engineering in large language models","abstract":"Training large language models (LLMs) can be prohibitively expensive. However, the emergence of new Parameter-Efficient Fine-Tuning (PEFT) strategies provides a cost-effective approach to unlocking the potential of LLMs across a variety of natural language processing (NLP) tasks. In this thesis, we selected the Mistral 7B LLM as our primary model due to its superior performance, which exceeds that of LLAMA 2 13B on multiple benchmarks. Using PEFT methods, we aim to significantly reduce the cost of fine-tuning while maintaining high levels of performance. Despite their advancements, LLMs often struggle with translation tasks for low-resource languages, particularly morphologically rich African languages. To address this, we employ customized prompt engineering techniques to enhance LLM translation capabilities for these languages. Our experimentation focused on fine tuning the Mistral 7B model to identify the best-performing ensemble using a custom prompt strategy. The results obtained from the fine-tuned Mistral 7B model were compared with several models: Serengeti, Gemma, Google Translate API, and No Language Left Behind (NLLB). Specifically, Serengeti and Gemma were fine-tuned using the same custom prompt strategy as the Mistral 7B model, while Google Translate API, NLLB and Gemma which are pre-trained to handle English-to-Zulu and English-to-Xhosa translations, were evaluated directly on the test data set. This comparative analysis allowed us to assess the efficacy of the main experimental model against both custom-tuned and pre-trained translation models. LLMs have traditionally struggled to produce high-quality translations, especially for morphologically rich low-resource languages. Our experiments revealed that the key to improving translation performance lies in using the correct prompt during fine-tuning. We developed a custom prompt that significantly improved translation quality for English-to-Zulu and English-to Xhosa language pairs. We fine-tuned the Mistral 7B model for 30 GPU days, we compared its performance to the NLLB model and Google Translate API on the same test dataset. Although NLLB achieved the highest scores across BLEU,G-Eval (cosinesimilarity), and Chrf++(F1score), our main model’s results still performed competitively against it. Furthermore, we showed that our custom prompt template can improve the translation accuracy of other models, such as Gemma and Serengeti, when applied to high-quality bilingual datasets. Thus, demonstrated that our custom prompt strategy is adaptable across different LLMs architectures, bilingual settings, and is highly effective in accelerating learning for low-resource language translation.","abstract_html":"Training large language models (LLMs) can be prohibitively expensive. However, the emergence of new Parameter-Efficient Fine-Tuning (PEFT) strategies provides a cost-effective approach to unlocking the potential of LLMs across a variety of natural language processing (NLP) tasks. In this thesis, we selected the Mistral 7B LLM as our primary model due to its superior performance, which exceeds that of LLAMA 2 13B on multiple benchmarks. Using PEFT methods, we aim to significantly reduce the cost of fine-tuning while maintaining high levels of performance. Despite their advancements, LLMs often struggle with translation tasks for low-resource languages, particularly morphologically rich African languages. To address this, we employ customized prompt engineering techniques to enhance LLM translation capabilities for these languages. Our experimentation focused on fine tuning the Mistral 7B model to identify the best-performing ensemble using a custom prompt strategy. The results obtained from the fine-tuned Mistral 7B model were compared with several models: Serengeti, Gemma, Google Translate API, and No Language Left Behind (NLLB). Specifically, Serengeti and Gemma were fine-tuned using the same custom prompt strategy as the Mistral 7B model, while Google Translate API, NLLB and Gemma which are pre-trained to handle English-to-Zulu and English-to-Xhosa translations, were evaluated directly on the test data set. This comparative analysis allowed us to assess the efficacy of the main experimental model against both custom-tuned and pre-trained translation models. LLMs have traditionally struggled to produce high-quality translations, especially for morphologically rich low-resource languages. Our experiments revealed that the key to improving translation performance lies in using the correct prompt during fine-tuning. We developed a custom prompt that significantly improved translation quality for English-to-Zulu and English-to Xhosa language pairs. We fine-tuned the Mistral 7B model for 30 GPU days, we compared its performance to the NLLB model and Google Translate API on the same test dataset. Although NLLB achieved the highest scores across BLEU,G-Eval (cosinesimilarity), and Chrf++(F1score), our main model’s results still performed competitively against it. Furthermore, we showed that our custom prompt template can improve the translation accuracy of other models, such as Gemma and Serengeti, when applied to high-quality bilingual datasets. Thus, demonstrated that our custom prompt strategy is adaptable across different LLMs architectures, bilingual settings, and is highly effective in accelerating learning for low-resource language translation.","abstract_has_math":false,"creators":[],"institution":"University of Pretoria","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":"Computer Science","school":null,"contributors":[],"advisors":["Marivate, Vukosi","Sefara, Joseph"],"committee_chairs":[],"committee_members":[],"year":2025,"date_issued":"2025-10","date_published":"2025-10","updated_at":"2026-12-01T14:17:54Z","subjects":["UCTD","Sustainable Development Goals (SDGs)","Prompt engineering","In-context-learning (ICL)","Mistral 7B","Large language model (LLM)","Parameter-efficient fine-tuning (PEFT)"],"languages":["en"],"rights":["Unrestricted","© 2024 University of Pretoria. All rights reserved. The copyright in this work vests in the University of Pretoria. No part of this work may be reproduced or transmitted in any form or by any means, without the prior written permission of the University of Pretoria."],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["http://hdl.handle.net/2263/104632","https://doi.org/10.25403/UPresearchdata.30338983.v1"],"render_values":[{"text":"http://hdl.handle.net/2263/104632","href":"https://hdl.handle.net/2263/104632","code":true},{"text":"https://doi.org/10.25403/UPresearchdata.30338983.v1","href":"https://doi.org/10.25403/UPresearchdata.30338983.v1","code":true}]},{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["*"],"render_values":[{"text":"*","href":null,"code":true}]},{"key":"dc:identifier.other","label":"Dc Identifier Other","values":["A2026"],"render_values":[{"text":"A2026","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.25403/UPresearchdata.30278812","outbound_label":"DOI","outbound_source":"dc:identifier.doi","record_url":"https://doi.org/10.25403/UPresearchdata.30278812","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier.doi","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Apretoria%3Aoai%3Arepository.up.ac.za%3A2263%2F104632","prefix":"oai_dc"},"source_record":{"url":"https://repository.up.ac.za/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Arepository.up.ac.za%3A2263%2F104632","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Marivate, Vukosi","Sefara, Joseph"]},{"key":"dc:contributor.department","label":"Department","values":["Computer Science"]},{"key":"dc:contributor.other","label":"Dc Contributor Other","values":["Khoboko, Pitso Walter"]},{"key":"person:email","label":"Person Email","values":["u21824772@tuks.co.za"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-10-07T07:27:06Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2025-10-07T07:27:06Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2026-04"]},{"key":"dc:date.issued","label":"Date","values":["2025-10"]},{"key":"dc:publisher","label":"Institution","values":["University of Pretoria"]},{"key":"dc:type","label":"Dc Type","values":["Dissertation"]},{"key":"thesis:degree_college","label":"Thesis Degree College","values":["Faculty of Engineering, Built Environment and Information Technology"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["UCTD","Sustainable Development Goals (SDGs)","Prompt engineering","In-context-learning (ICL)","Mistral 7B","Large language model (LLM)","Parameter-efficient fine-tuning (PEFT)"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["© 2024 University of Pretoria. All rights reserved. The copyright in this work vests in the University of Pretoria. No part of this work may be reproduced or transmitted in any form or by any means, without the prior written permission of the University of Pretoria."]},{"key":"dc:rights.accessrights","label":"Access Rights","values":["Unrestricted"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["*"]},{"key":"dc:identifier.doi","label":"DOI","values":["https://doi.org/10.25403/UPresearchdata.30278812"]},{"key":"dc:identifier.other","label":"Dc Identifier Other","values":["A2026"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["http://hdl.handle.net/2263/104632","https://doi.org/10.25403/UPresearchdata.30338983.v1"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"datacite:subject.sdg","label":"Datacite Subject Sdg","values":["SDG-04: Quality Education"]},{"key":"dc:description","label":"Description","values":["Dissertation (MSc (Computer Science))--Universiy of Pretoria, 2025."]},{"key":"dc:description.abstract","label":"Abstract","values":["Training large language models (LLMs) can be prohibitively expensive. However, the emergence of new Parameter-Efficient Fine-Tuning (PEFT) strategies provides a cost-effective approach to unlocking the potential of LLMs across a variety of natural language processing (NLP) tasks. In this thesis, we selected the Mistral 7B LLM as our primary model due to its superior performance, which exceeds that of LLAMA 2 13B on multiple benchmarks. Using PEFT methods, we aim to significantly reduce the cost of fine-tuning while maintaining high levels of performance. Despite their advancements, LLMs often struggle with translation tasks for low-resource languages, particularly morphologically rich African languages. To address this, we employ customized prompt engineering techniques to enhance LLM translation capabilities for these languages. Our experimentation focused on fine tuning the Mistral 7B model to identify the best-performing ensemble using a custom prompt strategy. The results obtained from the fine-tuned Mistral 7B model were compared with several models: Serengeti, Gemma, Google Translate API, and No Language Left Behind (NLLB). Specifically, Serengeti and Gemma were fine-tuned using the same custom prompt strategy as the Mistral 7B model, while Google Translate API, NLLB and Gemma which are pre-trained to handle English-to-Zulu and English-to-Xhosa translations, were evaluated directly on the test data set. This comparative analysis allowed us to assess the efficacy of the main experimental model against both custom-tuned and pre-trained translation models. LLMs have traditionally struggled to produce high-quality translations, especially for morphologically rich low-resource languages. Our experiments revealed that the key to improving translation performance lies in using the correct prompt during fine-tuning. We developed a custom prompt that significantly improved translation quality for English-to-Zulu and English-to Xhosa language pairs. We fine-tuned the Mistral 7B model for 30 GPU days, we compared its performance to the NLLB model and Google Translate API on the same test dataset. Although NLLB achieved the highest scores across BLEU,G-Eval (cosinesimilarity), and Chrf++(F1score), our main model’s results still performed competitively against it. Furthermore, we showed that our custom prompt template can improve the translation accuracy of other models, such as Gemma and Serengeti, when applied to high-quality bilingual datasets. Thus, demonstrated that our custom prompt strategy is adaptable across different LLMs architectures, bilingual settings, and is highly effective in accelerating learning for low-resource language translation."]},{"key":"dc:description.degree","label":"Dc Description Degree","values":["MSc (Computer Science)"]},{"key":"dc:description.sponsorship","label":"Dc Description Sponsorship","values":["Masters Research Bursary University of Pretoria, First Payment (2023-2025) Data Science for Social Impact"]},{"key":"dc:title","label":"Title","values":["Optimizing translation for low-resource languages : efficient fine-tuning with custom prompt engineering in large language models"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"datacite:subject.sdg":["SDG-04: Quality Education"],"dc:contributor.advisor":["Marivate, Vukosi","Sefara, Joseph"],"dc:contributor.department":["Computer Science"],"dc:contributor.other":["Khoboko, Pitso Walter"],"dc:date.accessioned":["2025-10-07T07:27:06Z"],"dc:date.available":["2025-10-07T07:27:06Z"],"dc:date.created":["2026-04"],"dc:date.issued":["2025-10"],"dc:description":["Dissertation (MSc (Computer Science))--Universiy of Pretoria, 2025."],"dc:description.abstract":["Training large language models (LLMs) can be prohibitively expensive. However, the emergence of new Parameter-Efficient Fine-Tuning (PEFT) strategies provides a cost-effective approach to unlocking the potential of LLMs across a variety of natural language processing (NLP) tasks. In this thesis, we selected the Mistral 7B LLM as our primary model due to its superior performance, which exceeds that of LLAMA 2 13B on multiple benchmarks. Using PEFT methods, we aim to significantly reduce the cost of fine-tuning while maintaining high levels of performance. Despite their advancements, LLMs often struggle with translation tasks for low-resource languages, particularly morphologically rich African languages. To address this, we employ customized prompt engineering techniques to enhance LLM translation capabilities for these languages. Our experimentation focused on fine tuning the Mistral 7B model to identify the best-performing ensemble using a custom prompt strategy. The results obtained from the fine-tuned Mistral 7B model were compared with several models: Serengeti, Gemma, Google Translate API, and No Language Left Behind (NLLB). Specifically, Serengeti and Gemma were fine-tuned using the same custom prompt strategy as the Mistral 7B model, while Google Translate API, NLLB and Gemma which are pre-trained to handle English-to-Zulu and English-to-Xhosa translations, were evaluated directly on the test data set. This comparative analysis allowed us to assess the efficacy of the main experimental model against both custom-tuned and pre-trained translation models. LLMs have traditionally struggled to produce high-quality translations, especially for morphologically rich low-resource languages. Our experiments revealed that the key to improving translation performance lies in using the correct prompt during fine-tuning. We developed a custom prompt that significantly improved translation quality for English-to-Zulu and English-to Xhosa language pairs. We fine-tuned the Mistral 7B model for 30 GPU days, we compared its performance to the NLLB model and Google Translate API on the same test dataset. Although NLLB achieved the highest scores across BLEU,G-Eval (cosinesimilarity), and Chrf++(F1score), our main model’s results still performed competitively against it. Furthermore, we showed that our custom prompt template can improve the translation accuracy of other models, such as Gemma and Serengeti, when applied to high-quality bilingual datasets. Thus, demonstrated that our custom prompt strategy is adaptable across different LLMs architectures, bilingual settings, and is highly effective in accelerating learning for low-resource language translation."],"dc:description.degree":["MSc (Computer Science)"],"dc:description.sponsorship":["Masters Research Bursary University of Pretoria, First Payment (2023-2025) Data Science for Social Impact"],"dc:identifier.citation":["*"],"dc:identifier.doi":["https://doi.org/10.25403/UPresearchdata.30278812"],"dc:identifier.other":["A2026"],"dc:identifier.uri":["http://hdl.handle.net/2263/104632","https://doi.org/10.25403/UPresearchdata.30338983.v1"],"dc:language.iso":["en"],"dc:publisher":["University of Pretoria"],"dc:rights":["© 2024 University of Pretoria. All rights reserved. The copyright in this work vests in the University of Pretoria. No part of this work may be reproduced or transmitted in any form or by any means, without the prior written permission of the University of Pretoria."],"dc:rights.accessrights":["Unrestricted"],"dc:subject":["UCTD","Sustainable Development Goals (SDGs)","Prompt engineering","In-context-learning (ICL)","Mistral 7B","Large language model (LLM)","Parameter-efficient fine-tuning (PEFT)"],"dc:title":["Optimizing translation for low-resource languages : efficient fine-tuning with custom prompt engineering in large language models"],"dc:type":["Dissertation"],"others:access_status":["open.access"],"person:email":["u21824772@tuks.co.za"],"thesis:degree_college":["Faculty of Engineering, Built Environment and Information Technology"]},"updated_at":"2026-12-01T14:17:54Z"}