How can large language models (LLMs) process and translate endangered languages? Many languages lack a large corpus to train a decent LLM; therefore existing LLMs rarely perform well in unseen, endangered languages. On the contrary, we observe that 2000 endangered languages, though without a large corpus, have a grammar book or a dictionary. We propose LINGOLLM, a training-free approach to enable an LLM to process unseen languages that hardly occur in its pre-training. Our key insight is to demonstrate linguistic knowledge of an unseen language in an LLM's prompt, including a dictionary, a grammar book, and morphologically analyzed input text. We implement LINGOLLM on top of two models, GPT-4 and Mixtral, and evaluate their performance on 5 tasks across 8 endangered or low-resource languages. Our results show that LINGOLLM elevates translation capability from GPT-4's 0 to 10.5 BLEU for 10 language directions. Our findings demonstrate the tremendous value of linguistic knowledge in the age of LLMs for endangered languages. Our data, code, and model generations can be found at https://github.com/LLiLab/llm4endangeredlang.
翻译:大型语言模型(LLMs)如何处理和翻译濒危语言?许多语言缺乏大规模语料库来训练优秀的LLM,因此现有LLM在未见过的濒危语言上表现不佳。相反,我们观察到2000种濒危语言虽无大规模语料,但拥有语法书或词典。我们提出LINGOLLM,一种无需训练的方法,使LLM能够处理其预训练中几乎未出现的未见语言。我们的核心见解是在LLM的提示中展示未见语言的语言学知识,包括词典、语法书以及经过形态分析的输入文本。我们在GPT-4和Mixtral两个模型上实现了LINGOLLM,并在8种濒危或低资源语言的5项任务上评估其性能。结果表明,LINGOLLM将GPT-4在10个语言方向上的翻译能力从0 BLEU提升至10.5 BLEU。我们的发现证明了在LLM时代,语言学知识对濒危语言具有巨大价值。我们的数据、代码和模型生成结果可在https://github.com/LLiLab/llm4endangeredlang获取。