TL;DR
FoNE introduces a Fourier feature-based single-token embedding for numbers in LLMs, improving efficiency and accuracy in numerical tasks by directly encoding numbers with Fourier features.
Contribution
FoNE is a novel method that maps numbers into a compact Fourier feature embedding, enabling single-token representation and superior performance on numerical tasks.
Findings
FoNE achieves 99% accuracy on 6-digit addition with 64x less data.
FoNE uses fewer tokens per number compared to subword and digit-wise embeddings.
FoNE attains 100% accuracy on large test sets for basic arithmetic operations.
Abstract
Large Language Models (LLMs) typically represent numbers using multiple tokens, which requires the model to aggregate these tokens to interpret numerical values. This fragmentation makes both training and inference less efficient and adversely affects the model's performance on number-related tasks. Inspired by the observation that pre-trained LLMs internally learn Fourier-like features for number tokens, we propose Fourier Number Embedding (FoNE), a novel method that directly maps numbers into the embedding space with their Fourier features. FoNE encodes each number as a single token with only two embedding dimensions per digit, effectively capturing numerical values without fragmentation. This compact representation accelerates both training and inference. Compared to traditional subword and digit-wise embeddings, FoNE not only reduces computational overhead but also achieves higher…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
