arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2403.05434cs.CL
收藏

使用商业LLM处理低资源语言任务的成本-性能优化

Cost-Performance Optimization for Processing Low-Resource Language Tasks Using Commercial LLMs

IIT Kharagpur(印度理工学院卡哈拉格普尔分校);IIT Bombay(印度理工学院孟买分校)

Arijit Nag, Animesh Mukherjee, Niloy Ganguly, Soumen Chakrabarti

AI总结:

针对低资源语言在商业LLM中token成本高的问题,通过代码混合、翻译和音译策略,在保持性能的同时,最高可降低90%的成本。

摘要:

大型语言模型(LLMs)在高资源语言(HRLs)上展现出令人印象深刻的零样本/少样本推理和生成质量。其中一些模型已在低资源语言(LRLs)上进行了训练,并给出了不错的性能。由于训练LLMs的代价高昂,它们通常作为网络服务使用,客户端按输入和输出token的数量付费。token的数量在很大程度上取决于脚本和语言,以及LLM的子词词汇表。我们表明,LRLs处于定价劣势,因为知名的LLMs为LRLs生成的token数量多于HRLs。这是因为目前大多数流行的LLMs是针对HRL词汇表优化的。我们的目标是创造公平的竞争环境:降低当代LLMs处理LRLs的成本,同时确保预测和生成质量不受影响。作为减少LLM处理的token数量的手段,我们考虑了代码混合、翻译和将LRLs音译为HRLs。我们使用IndicXTREME分类和六个生成任务数据集进行了广泛研究,涵盖15种印度语言和3种其他语言,同时使用GPT-4(迄今为止发布的成本最高的LLM服务之一)作为商业LLM。我们观察并分析了涉及多种语言和任务的token数量、成本和质量的趣味模式。我们表明,选择与LLM交互的最佳策略可以将成本降低90%,同时与使用原始LRL与LLM通信相比,提供更好或相当的性能。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑