{"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/x-instruction-aligning-language-model-in-low","title":"X-Instruction: Aligning Language Model in Low-resource Languages with Self-curated Cross-lingual Instructions","arxiv_id":"2405.19744","date":"2024-05-30","proceeding":null,"authors":["Chong Li","Wen Yang","Jiajun Zhang","Jinliang Lu","Shaonan Wang","Chengqing Zong"],"abstract":"Large language models respond well in high-resource languages like English but struggle in low-resource languages. It may arise from the lack of high-quality instruction following data in these languages. Directly translating English samples into these languages can be a solution but unreliable, leading to responses with translation errors and lacking language-specific or cultural knowledge. To address this issue, we propose a novel method to construct cross-lingual instruction following samples with instruction in English and response in low-resource languages. Specifically, the language model first learns to generate appropriate English instructions according to the natural web texts in other languages as responses. The candidate cross-lingual instruction tuning samples are further refined and diversified. We have employed this method to build a large-scale cross-lingual instruction tuning dataset on 10 languages, namely X-Instruction. The instruction data built using our method incorporate more language-specific knowledge compared with the naive translation method. Experimental results have shown that the response quality of the model tuned on X-Instruction greatly exceeds the model distilled from a powerful teacher model, reaching or even surpassing the ones of ChatGPT. In addition, we find that models tuned on cross-lingual instruction following samples can follow the instruction in the output language without further tuning.","url_abs":"https://arxiv.org/abs/2405.19744v1","url_pdf":"https://arxiv.org/pdf/2405.19744v1.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":"x-instruction-aligning-language-model-in-low","repo_url":"https://github.com/znlp/x-instruction","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"instruction-following","task_name":"Instruction Following"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.19744","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.19744"}},"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/znlp/x-instruction","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5},"by_repo_kind":{"official":{"samples":5,"ran":5,"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":"c70b233c8023d8d3","entry":"extract_score","repo":"znlp/x-instruction","repo_kind":"official","path":"utils/gpt4_eval.py","file_url":"https://github.com/znlp/x-instruction/blob/HEAD/utils/gpt4_eval.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c70b233c8023d8d3"}},{"code_sha256_prefix":"8074fdfa134093c8","entry":"infer_xIns","repo":"znlp/x-instruction","repo_kind":"official","path":"utils/inference.py","file_url":"https://github.com/znlp/x-instruction/blob/HEAD/utils/inference.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8074fdfa134093c8"}},{"code_sha256_prefix":"d20c54c0ae2489df","entry":"openai_requests","repo":"znlp/x-instruction","repo_kind":"official","path":"utils/chatgpt_generation.py","file_url":"https://github.com/znlp/x-instruction/blob/HEAD/utils/chatgpt_generation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d20c54c0ae2489df"}},{"code_sha256_prefix":"6356690e9f0d26f0","entry":"read_jsonl","repo":"znlp/x-instruction","repo_kind":"official","path":"utils/chatgpt_generation.py","file_url":"https://github.com/znlp/x-instruction/blob/HEAD/utils/chatgpt_generation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6356690e9f0d26f0"}},{"code_sha256_prefix":"6ca75e83760b13b8","entry":"single_prompt","repo":"znlp/x-instruction","repo_kind":"official","path":"utils/inference.py","file_url":"https://github.com/znlp/x-instruction/blob/HEAD/utils/inference.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ca75e83760b13b8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}