arXiv:2410.09303

Exact Byte-Level Probabilities from Tokenized Language Models for FIM-Tasks and Model Ensembles

Buu Phan, Brandon Amos, Itai Gat, Marton Havasi, Matthew Muckley, Karen Ullrich

제출 2024-10-11

원문 초록

Tokenization is associated with many poorly understood shortcomings in language models (LMs), yet remains an important component for long sequence scaling purposes. This work studies how tokenization impacts model performance by analyzing and comparing the stochastic behavior of tokenized models with their byte-level, or token-free, counterparts. We discover that, even when the two models are statistically equivalent, their predictive distributions over the next byte can be substantially different, a phenomenon we term as "tokenization bias''. To fully characterize this phenomenon, we introduce the Byte-Token Representation Lemma, a framework that establishes a mapping between the learned token distribution and its equivalent byte-level distribution. From this result, we develop a next-byte sampling algorithm that eliminates tokenization bias without requiring further training or optimization. In other words, this enables zero-shot conversion of tokenized LMs into statistically equivalent token-free ones. We demonstrate its broad applicability with two use cases: fill-in-the-middle (FIM) tasks and model ensembles. In FIM tasks where input prompts may terminate mid-token, leading to out-of-distribution tokenization, our method mitigates performance degradation and achieves an approximately 18% improvement in FIM coding benchmarks, consistently outperforming the standard token healing fix. For model ensembles where each model employs a distinct vocabulary, our approach enables seamless integration, resulting in improved performance (up to 3.7%) over individual models across various standard baselines in reasoning, knowledge, and coding.

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

arXiv:2410.06665v4cs.LG공통 태그 LEMMA공식 코드 · Papers with Code

기약 표현의 관점에서 재조명한 다중 치환 등변성

Revisiting Multi-Permutation Equivariance through the Lens of Irreducible Representations

본 논문은 치환 및 관련 군(group)의 표현에 대한 등변(equivariant) 선형 레이어의 특성화를 탐구합니다. 매개변수 공유(parameter-sharing)를 통해 이러한 문제를 다루는 전통적인 접근법과 달리, 본 연구에서는 기약 표현(irreducible representation)과 슈어의 보조정리(Schur's lemma)에 기반한 대안적 방법론을 고려합니다. 이 방법론을 사용하여 DeepSets, 2-IGN 그래프 등변 네트워크, 딥 가중치 공간(DWS, Deep Weight Space) 네트워크와 같은 기존 모델에 대한 대안적 유도를 도출합니다. DWS 네트워크에 대한 유도는 기존 결과에 비해 훨씬 간단합니다. 나아가, 군의 화환곱(wreath product)에 대한 등변성이 요구되는 비정렬 대칭 집합으로 접근법을 확장합니다. 이전 연구들은 거의 모든 화환 등변 레이어가 샴(Siamese) 구조를 갖는 다소 제한적인 환경에서 이 문제를 다루었습니다. 이와 대조적으로, 본 논문에서는 이러한 경우의 레이어에 대한 완전한 특성화를 제시하며 일부 환경에서는 방대한 수의 추가적인 비-샴(non-Siamese) 레이어가 존재함을 보입니다. 또한 이러한 추가 비-샴 레이어가 그래프 이상치 탐지, 가중치 공간 정렬, 바세르슈타인 거리(Wasserstein distance) 학습과 같은 태스크에서 성능을 향상시킬 수 있음을 실증적으로 보여줍니다. 코드는 \href{https://github.com/yonatansverdlov/Irreducible-Representations-of-Deep-Weight-Spaces}{GitHub}에서 확인할 수 있습니다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.