xVal: A Continuous Numerical Tokenization for Scientific Language Models

Siavash Golkar, Mariel Pettee, Michael Eickenberg, Alberto Bietti, Miles Cranmer +9 more
10/4/2023
stat.MLcs.AIcs.CL

Official code: PolymathicAI/xVal (153 stars, last commit 2024-04-04).

Abstract

Due in part to their discontinuous and discrete default encodings for numbers, Large Language Models (LLMs) have not yet been commonly used to process numerically-dense scientific datasets. Rendering datasets as text, however, could help aggregate diverse and multi-modal scientific data into a single training corpus, thereby potentially facilitating the development of foundation models for science. In this work, we introduce xVal, a strategy for continuously tokenizing numbers within language models that results in a more appropriate inductive bias for scientific applications. By training specially-modified language models from scratch on a variety of scientific datasets formatted as text, we find that xVal generally outperforms other common numerical tokenization strategies on metrics including out-of-distribution generalization and computational efficiency.

View on arXivView PDF

Code Implementations(1)

PolymathicAI/xValOfficial100%

Repository for code used in the xVal paper

15313Python, Jupyter NotebookOct 4, 20232 years ago

Similar Papers

Cite this paper

@article{golkar2023xval,
  title  = {xVal: A Continuous Numerical Tokenization for Scientific Language Models},
  author = {Siavash Golkar and Mariel Pettee and Michael Eickenberg and Alberto Bietti and Miles Cranmer and Geraud Krawezik and Francois Lanusse and Michael McCabe and Ruben Ohana and Liam Parker and Bruno Régaldo-Saint Blancard and Tiberiu Tesileanu and Kyunghyun Cho and Shirley Ho},
  year   = {2023},
  eprint = {2310.02989},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.02989v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.02989.svg)](https://codeofpaper.com/paper/2310.02989)

Discussion