arXiv:2410.04010cs.LGcs.AI2024-10NeurIPS被引 24

用双曲空间优化大模型微调,提升推理能力

Hyperbolic Fine-Tuning for Large Language Models

  • 在双曲空间中进行低秩适配,保留语义层次结构
  • 在算术与常识推理任务上显著提升模型性能
  • 适合关注模型结构与推理效率的研究者

大型语言模型在各类任务中表现卓越,但其默认的欧几里得空间是否最优仍存疑问。本研究探究了模型中词元及其嵌入的几何特性,发现词元频率服从幂律分布:高频词(如 the、that)数量少却集中于嵌入空间原点附近,低频词(如 apple、dog)数量多且远离原点。同时,词元嵌入呈现双曲特征,表明嵌入空间存在潜在树状结构。基于此,我们提出 HypLoRA,一种在双曲空间中直接进行低秩适配的高效微调方法,全程保持双曲建模能力。在多个基础模型和推理基准(包括算术与常识推理任务)上的大量实验表明,HypLoRA 显著提升了语言模型性能。

原文摘要 · Abstract (English)

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.

大模型微调双曲空间推理增强

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。