Cost-Performance Optimization for Processing Low-Resource Language Tasks Using Commercial LLMs
作者: Arijit Nag, Animesh Mukherjee, Niloy Ganguly, Soumen Chakrabarti
分类: cs.CL
发布日期: 2024-03-08 (更新: 2024-04-18)
💡 一句话要点
提出低资源语言任务的成本优化方法以提升处理效率
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 低资源语言 大型语言模型 成本优化 自然语言处理 多语言翻译
📋 核心要点
- 现有的LLMs在处理低资源语言时,因生成token数量多而导致成本高,影响其应用。
- 论文提出通过代码混合、翻译和音译等方法,减少LLMs处理低资源语言时的token数量。
- 实验结果表明,采用最佳策略与LLM交互可将成本降低90%,且性能优于原始低资源语言的处理方式。
📝 摘要(中文)
大型语言模型(LLMs)在高资源语言(HRLs)上展现出卓越的零/少样本推理和生成质量,但在低资源语言(LRLs)上表现相对较差。由于训练LLMs的高昂成本,通常以网络服务形式提供,客户按输入和输出的token数量收费。研究表明,LRLs在定价上处于劣势,因为当前流行的LLMs在处理LRLs时生成的token数量多于HRLs。本文旨在降低LRLs的处理成本,同时确保预测和生成质量不受影响。通过代码混合、翻译和音译等方式减少LLMs处理的token数量,进行了一项广泛的研究,使用GPT-4作为商业LLM,分析了多种语言和任务的token数量、成本和质量的有趣模式。选择最佳的与LLM交互策略可以将成本降低90%,同时在性能上保持或优于使用原始LRL的方式。
🔬 方法详解
问题定义:本文解决的是低资源语言在大型语言模型处理中的高成本问题。现有方法在处理低资源语言时,因生成的token数量较多,导致用户面临较高的费用。
核心思路:通过代码混合、翻译和音译等技术手段,减少低资源语言的token数量,从而降低处理成本,同时保持模型的预测和生成质量。
技术框架:研究采用了GPT-4作为基础模型,设计了一个包含数据预处理、token优化和模型交互策略的整体框架,针对15种印度语言及其他3种语言进行了实验。
关键创新:最重要的创新在于提出了一种新的交互策略,能够显著降低低资源语言的处理成本,同时在性能上与原始语言处理相当,填补了现有LLMs在低资源语言处理中的空白。
关键设计:在实验中,采用了针对不同语言的token优化策略,设计了相应的损失函数以平衡生成质量与token数量,确保在降低成本的同时不损失模型性能。
📊 实验亮点
实验结果显示,通过优化交互策略,处理低资源语言的成本可降低90%。在多种语言和任务上,所提出的方法在生成质量上与传统方法相当,甚至在某些情况下表现更佳,展现出显著的性能提升。
🎯 应用场景
该研究的潜在应用领域包括多语言翻译、跨文化交流和低资源语言的自然语言处理等。通过优化低资源语言的处理成本,可以促进这些语言的数字化和信息获取,提升其在全球化背景下的使用价值和影响力。
📄 摘要(原文)
Large Language Models (LLMs) exhibit impressive zero/few-shot inference and generation quality for high-resource languages (HRLs). A few of them have been trained on low-resource languages (LRLs) and give decent performance. Owing to the prohibitive costs of training LLMs, they are usually used as a network service, with the client charged by the count of input and output tokens. The number of tokens strongly depends on the script and language, as well as the LLM's subword vocabulary. We show that LRLs are at a pricing disadvantage, because the well-known LLMs produce more tokens for LRLs than HRLs. This is because most currently popular LLMs are optimized for HRL vocabularies. Our objective is to level the playing field: reduce the cost of processing LRLs in contemporary LLMs while ensuring that predictive and generative qualities are not compromised. As means to reduce the number of tokens processed by the LLM, we consider code-mixing, translation, and transliteration of LRLs to HRLs. We perform an extensive study using the IndicXTREME classification and six generative tasks dataset, covering 15 Indic and 3 other languages, while using GPT-4 (one of the costliest LLM services released so far) as a commercial LLM. We observe and analyze interesting patterns involving token count, cost, and quality across a multitude of languages and tasks. We show that choosing the best policy to interact with the LLM can reduce cost by 90% while giving better or comparable performance compared to communicating with the LLM in the original LRL.