Hyperbolic Fine-Tuning for Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yang, Menglin, B, Ram Samarth B, Feng, Aosong, Xiong, Bo, Liu, Jihong, King, Irwin, Ying, Rex
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912883244269568
author Yang, Menglin
B, Ram Samarth B
Feng, Aosong
Xiong, Bo
Liu, Jihong
King, Irwin
Ying, Rex
author_facet Yang, Menglin
B, Ram Samarth B
Feng, Aosong
Xiong, Bo
Liu, Jihong
King, Irwin
Ying, Rex
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_04010
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Hyperbolic Fine-Tuning for Large Language Models
Yang, Menglin
B, Ram Samarth B
Feng, Aosong
Xiong, Bo
Liu, Jihong
King, Irwin
Ying, Rex
Machine Learning
Artificial Intelligence
Computation and Language
Neural and Evolutionary Computing
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.
title Hyperbolic Fine-Tuning for Large Language Models
topic Machine Learning
Artificial Intelligence
Computation and Language
Neural and Evolutionary Computing
url https://arxiv.org/abs/2410.04010