arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.04010cs.LGcs.AIcs.CLcs.NE
收藏

双曲微调用于大语言模型

Hyperbolic Fine-Tuning for Large Language Models

HKUST(GZ)(香港科技大学(广州));HKUST(香港科技大学);Indian Institute of Science(印度科学研究院);Yale University(耶鲁大学);Stanford University(斯坦福大学);The Chinese University of Hong Kong(香港中文大学)

Menglin Yang, Ram Samarth B B, Aosong Feng, Bo Xiong, Jihong Liu, Irwin King, Rex Ying

AI总结:

HypLoRA通过在双曲空间中进行低秩适应,提升大语言模型在算术和常识推理任务中的性能。

摘要:

大语言模型(LLMs)在各种任务中展示了出色的性能。然而,仍然存在一个开放性问题:默认的欧几里得空间是否是LLMs最合适的选择。在本研究中,我们研究了LLMs的几何特性,特别关注令牌及其嵌入。我们的发现表明,令牌频率遵循幂律分布,其中高频令牌(例如,the、that)构成少数,而低频令牌(例如,apple、dog)构成多数。此外,高频令牌聚集在原点附近,而低频令牌在嵌入空间中位置更远。此外,令牌嵌入表现出双曲特性,表明嵌入空间中存在潜在的树状结构。受这些观察的启发,我们提出了HypLoRA,一种高效的微调方法,它在双曲空间中运行以更好地利用这些潜在的层次结构。HypLoRA在双曲空间中直接执行低秩适应,从而在整个微调过程中保持双曲建模能力。在各种基础模型和推理基准,特别是算术和常识推理任务中进行的广泛实验表明,HypLoRA显著提高了LLM的性能。

英文摘要:

Large language models (LLMs) have demonstrated remarkable performance across various tasks. However, it remains an open question whether the default Euclidean space is the most suitable choice for LLMs. In this study, we investigate the geometric characteristics of LLMs, focusing specifically on tokens and their embeddings. Our findings reveal that token frequency follows a power-law distribution, where high-frequency tokens (e.g., the, that ) constitute the minority, while low-frequency tokens (e.g., apple, dog) constitute the majority. Furthermore, high-frequency tokens cluster near the origin, whereas low-frequency tokens are positioned farther away in the embedding space. Additionally, token embeddings exhibit hyperbolic characteristics, indicating a latent tree-like structure within the embedding space. Motivated by these observations, we propose HypLoRA, an efficient fine-tuning approach that operates in hyperbolic space to exploit these underlying hierarchical structures better. HypLoRA performs low-rank adaptation directly in hyperbolic space, thereby preserving hyperbolic modeling capabilities throughout the fine-tuning process. Extensive experiments across various base models and reasoning benchmarks, specifically arithmetic and commonsense reasoning tasks, demonstrate that HypLoRA substantially improves LLM performance.

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

↑