{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/taste-teaching-large-language-models-to","title":"TasTe: Teaching Large Language Models to Translate through Self-Reflection","arxiv_id":"2406.08434","date":"2024-06-12","proceeding":null,"authors":["Yutong Wang","Jiali Zeng","Xuebo Liu","Fandong Meng","Jie zhou","Min Zhang"],"abstract":"Large language models (LLMs) have exhibited remarkable performance in various natural language processing tasks. Techniques like instruction tuning have effectively enhanced the proficiency of LLMs in the downstream task of machine translation. However, the existing approaches fail to yield satisfactory translation outputs that match the quality of supervised neural machine translation (NMT) systems. One plausible explanation for this discrepancy is that the straightforward prompts employed in these methodologies are unable to fully exploit the acquired instruction-following capabilities. To this end, we propose the TasTe framework, which stands for translating through self-reflection. The self-reflection process includes two stages of inference. In the first stage, LLMs are instructed to generate preliminary translations and conduct self-assessments on these translations simultaneously. In the second stage, LLMs are tasked to refine these preliminary translations according to the evaluation results. The evaluation results in four language directions on the WMT22 benchmark reveal the effectiveness of our approach compared to existing methods. Our work presents a promising approach to unleash the potential of LLMs and enhance their capabilities in MT. The codes and datasets are open-sourced at https://github.com/YutongWang1216/ReflectionLLMMT.","url_abs":"https://arxiv.org/abs/2406.08434v1","url_pdf":"https://arxiv.org/pdf/2406.08434v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"taste-teaching-large-language-models-to","repo_url":"https://github.com/yutongwang1216/reflectionllmmt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"instruction-following","task_name":"Instruction Following"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"nmt","task_name":"NMT"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.08434","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.08434"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yutongwang1216/reflectionllmmt","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":4,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"1182381b66bc654d","entry":"get_eval_ds_config","repo":"yutongwang1216/reflectionllmmt","repo_kind":"official","path":"train/trainer/utils/ds_utils.py","file_url":"https://github.com/yutongwang1216/reflectionllmmt/blob/HEAD/train/trainer/utils/ds_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1182381b66bc654d"}},{"code_sha256_prefix":"bc9a14cb2f220424","entry":"get_train_ds_config","repo":"yutongwang1216/reflectionllmmt","repo_kind":"official","path":"train/trainer/utils/ds_utils.py","file_url":"https://github.com/yutongwang1216/reflectionllmmt/blob/HEAD/train/trainer/utils/ds_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bc9a14cb2f220424"}},{"code_sha256_prefix":"e617041853afd002","entry":"only_optimize_lora_parameters","repo":"yutongwang1216/reflectionllmmt","repo_kind":"official","path":"train/trainer/utils/module/lora.py","file_url":"https://github.com/yutongwang1216/reflectionllmmt/blob/HEAD/train/trainer/utils/module/lora.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e617041853afd002"}},{"code_sha256_prefix":"d533afcd5be0bb1b","entry":"post_processing","repo":"yutongwang1216/reflectionllmmt","repo_kind":"official","path":"infer/infer_prompt.py","file_url":"https://github.com/yutongwang1216/reflectionllmmt/blob/HEAD/infer/infer_prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d533afcd5be0bb1b"}},{"code_sha256_prefix":"2c2516c9976fbb3d","entry":"func","repo":"yutongwang1216/reflectionllmmt","repo_kind":"official","path":"infer/infer_prompt.py","file_url":"https://github.com/yutongwang1216/reflectionllmmt/blob/HEAD/infer/infer_prompt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2c2516c9976fbb3d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}