MultiHashFormer: Hash-based Generative Language Models

Huiyin Xue, Atsuki Yamaguchi, Nikolaos Aletras

arXiv:2606.28057 · 2026-06-29 공개 · arXiv · PDF

llm transformer parameter-efficiency multilingual hash-based autoregression hash-encoder hash-decoder

Abstract

Language models (LMs) represent tokens using embedding matrices that scale linearly with the vocabulary size. To constrain the parameter footprint, prior work proposes hashing many tokens into a single vector within encoder-only models. While this offers parameter efficiency, many-to-one collisions prevent its use in causal LMs. In this paper, we propose MultiHashFormer, a new framework that allows hash-based autoregression. Each token is represented as a unique hash signature, a short sequence of discrete hash IDs, generated by multiple independent hash functions. A Hash Encoder compresses this signature into a single latent vector for processing by a Transformer decoder. Then, a Hash Decoder generates the hash signature of the next token, which is then mapped back to text. We evaluate our approach at the 100M, 1B and 3B parameter scales, demonstrating that MultiHashFormer consistently outperforms standard Transformer LMs across multiple benchmarks. Furthermore, we show that our model handles multilingual vocabulary expansion with a constant parameter footprint without any modifications.

한국어 요약

한 줄 요약

MultiHashFormer는 해시 기반 생성 언어 모델로, 매개변수 효율성을 유지하면서 성능을 향상시킨다.

핵심 기여도

핵심 아이디어

기존 해시 기반 모델은 인코더-디코더 구조에서만 사용되며, 인과적 생성 모델(causal LM)에서는 토큰 충돌 문제로 제한적이었다. MultiHashFormer는 이 문제를 해시 서명이라는 새로운 토큰 표현 방식으로 해결한다. 각 토큰은 여러 해시 함수를 통해 생성된 고유한 해시 ID 시퀀스로 표현되며, 이는 충돌 가능성을 줄인다. Hash Encoder는 이 해시 서명을 단일 잠재 벡터로 압축하고, Hash Decoder는 다음 토큰의 해시 서명을 생성하여 텍스트로 복원한다. 이는 인과적 생성 과정을 유지하면서 매개변수 증가 없이 대규모 어휘를 처리할 수 있게 한다.

기술적 접근법

주요 결과

의의 및 한계

MultiHashFormer는 매개변수 증가 없이 대규모 어휘와 다국어 처리를 가능하게 하며, 생성 언어 모델의 효율성을 높이는 새로운 접근법을 제시한다. 그러나 해시 충돌 가능성은 여전히 존재하며, 특정 어휘 구조에 따라 성능 차이가 발생할 수 있다. 또한, 해시 기반 표현이 의미적 유사성을 완전히 반영하지 못할 수 있다.

실용적 활용

MultiHashFormer는 매개변수 예산이 제한된 대규모 언어 모델 개발, 다국어 지원 모델, 실시간 텍스트 생성 시스템 등에 적용 가능하다. 특히, 매개변수 증가 없이 어휘 확장을 지원하는 점에서 클라우드 기반 NLP 서비스에 유용할 수 있다.