Papers › Hyperbolic Fine-tuning for Large Language Models

Hyperbolic Fine-tuning for Large Language Models

5 Oct 2024arXiv:2410.04010archive 2025-07-28

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

Large language models (LLMs) have demonstrated remarkable performance on various tasks. However, it remains an open question whether the default Euclidean space is the most suitable choice for embedding tokens in LLMs. In this study, we first investigate the non-Euclidean characteristics of LLMs. Our findings reveal that token frequency follows a power-law distribution, with high-frequency tokens clustering near the origin and low-frequency tokens positioned farther away. Additionally, token embeddings exhibit a high degree of hyperbolicity, indicating a latent tree-like structure in the embedding space. Building on the observation, we propose to efficiently fine-tune LLMs in hyperbolic space to better exploit the underlying complex structures. However, we found that this fine-tuning in hyperbolic space cannot be achieved with naive application of exponential and logarithmic maps, when the embedding and weight matrices both reside in Euclidean space. To address this technique issue, we introduce a new method called hyperbolic low-rank efficient fine-tuning, HypLoRA, that performs low-rank adaptation directly on the hyperbolic manifold, avoiding the cancellation effect caused by the exponential and logarithmic maps, thus preserving the hyperbolic modeling capabilities. Through extensive experiments, we demonstrate that HypLoRA significantly enhances the performance of LLMs on reasoning tasks, particularly for complex reasoning problems. In particular, HypLoRA improves the performance in the complex AQuA dataset by up to 13.0%, showcasing its effectiveness in handling complex reasoning challenges

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.04010")

Code

Syntology Ran 14 of 21 code samples harvested from 2 repositories linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 10 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 11 ran; community: 3 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

marlin-codes/HypLLM officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

21 samples harvested; 14 ran; 1 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
10ran
7unverified

Licence: 21 of the 21 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

generate_prompt marlin-codes/HypLLM/finetune_gemma.py official repository ran no licence file found · pointer only · efa052b7627685a8 · report
generate_prompt marlin-codes/HypLLM/finetune_gemma7b.py official repository ran no licence file found · pointer only · 855c98801d59aba9 · report
generate_prompt marlin-codes/HypLLM/finetune_llama3.py official repository ran no licence file found · pointer only · 129a49595d6cd469 · report
generate_prompt marlin-codes/HypLLM/finetune_qwen.py official repository ran no licence file found · pointer only · 10b11110fd400897 · report
generate_prompt_gemma marlin-codes/HypLLM/commonsense_evaluate.py official repository ran fingerprinted no licence file found · pointer only · db94af6846fc86ac · report
generate_prompt_gemma marlin-codes/HypLLM/commonsense_evaluate_gemma.py official repository ran fingerprinted no licence file found · pointer only · 0f6cd6a20020ddc7 · report
generate_prompt_legacy marlin-codes/HypLLM/commonsense_evaluate.py official repository ran fingerprinted no licence file found · pointer only · 349264d7e81ea7aa · report
generate_prompt_llama marlin-codes/HypLLM/commonsense_evaluate_gemma.py official repository ran fingerprinted no licence file found · pointer only · bfb00dffb905f6c9 · report
generate_prompt_qwen marlin-codes/HypLLM/commonsense_evaluate.py official repository ran fingerprinted no licence file found · pointer only · 108402de33a9b9f9 · report
load_data marlin-codes/HypLLM/commonsense_evaluate_qwen.py official repository ran · our draft was wrong no licence file found · pointer only · 56a9466ff35b35bb · report
load_data marlin-codes/HypLLM/evaluate.py official repository ran no licence file found · pointer only · 9986725c1f5dc7bd · report
main marlin-codes/HypLLM/commonsense_evaluate_gemma.py official repository unverified no licence file found · pointer only · 27ce6e249f9b1a82 · report
main marlin-codes/HypLLM/commonsense_evaluate_qwen.py official repository unverified no licence file found · pointer only · e563b8e4282a0c32 · report
main marlin-codes/HypLLM/evaluate.py official repository unverified no licence file found · pointer only · 11971b0db65e9e75 · report
train marlin-codes/HypLLM/finetune_gemma.py official repository unverified no licence file found · pointer only · 89be12b59a6331d6 · report
train marlin-codes/HypLLM/finetune_gemma7b.py official repository unverified no licence file found · pointer only · 265773714d80dabf · report
train marlin-codes/HypLLM/finetune_llama3.py official repository unverified no licence file found · pointer only · fbba0cdd6457bbf4 · report
train marlin-codes/HypLLM/finetune_qwen.py official repository unverified no licence file found · pointer only · 1200fafec7c5e3d1 · report
compute_token_frequencies marlin-codes/hyplora/utils/token_frequency_distribution.py community ran · honoured contract no licence file found · pointer only · 9b3f4eb40a06e33e · report
create_dir marlin-codes/hyplora/utils/token_frequency_distribution.py community ran · our draft was wrong no licence file found · pointer only · 2ac7050b0ae37227 · report
mkdirs marlin-codes/hyplora/utils/token_frequency_distribution.py community ran · our draft was wrong no licence file found · pointer only · edf7c9e239eadabf · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections