GQ-VAE: A gated quantized VAE for learning variable length tokens

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Datta, Theo, Huang, Kayla, Kakade, Sham, Brandfonbrener, David
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915694720843776
author Datta, Theo
Huang, Kayla
Kakade, Sham
Brandfonbrener, David
author_facet Datta, Theo
Huang, Kayla
Kakade, Sham
Brandfonbrener, David
contents While most frontier models still use deterministic frequency-based tokenization algorithms such as byte-pair encoding (BPE), there has been significant recent work to design learned neural tokenizers. However, these schemes generally add to underlying language model complexity and force large changes to architecture, making them hard to implement at large scales. To overcome these challenges, we propose the gated quantized variational autoencoder (GQ-VAE), a novel architecture that can be independently pre-trained to serve as a drop-in replacement for existing tokenizers. The key innovation of the architecture is to learn to encode variable-length discrete tokens. GQ-VAE improves compression and language modeling performance over a standard VQ-VAE tokenizer, and approaches the compression rate and language modeling performance of BPE. Interestingly, if we use BPE with a smaller vocabulary, such that the compression is equivalent between GQ-VAE and BPE, we find that GQ-VAE improves downstream language model learning. We conclude with a discussion of several exciting avenues for future work. Code can be found at https://github.com/Theo-Datta-115/gq-vae.
format Preprint
id arxiv_https___arxiv_org_abs_2512_21913
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle GQ-VAE: A gated quantized VAE for learning variable length tokens
Datta, Theo
Huang, Kayla
Kakade, Sham
Brandfonbrener, David
Machine Learning
While most frontier models still use deterministic frequency-based tokenization algorithms such as byte-pair encoding (BPE), there has been significant recent work to design learned neural tokenizers. However, these schemes generally add to underlying language model complexity and force large changes to architecture, making them hard to implement at large scales. To overcome these challenges, we propose the gated quantized variational autoencoder (GQ-VAE), a novel architecture that can be independently pre-trained to serve as a drop-in replacement for existing tokenizers. The key innovation of the architecture is to learn to encode variable-length discrete tokens. GQ-VAE improves compression and language modeling performance over a standard VQ-VAE tokenizer, and approaches the compression rate and language modeling performance of BPE. Interestingly, if we use BPE with a smaller vocabulary, such that the compression is equivalent between GQ-VAE and BPE, we find that GQ-VAE improves downstream language model learning. We conclude with a discussion of several exciting avenues for future work. Code can be found at https://github.com/Theo-Datta-115/gq-vae.
title GQ-VAE: A gated quantized VAE for learning variable length tokens
topic Machine Learning
url https://arxiv.org/abs/2512.21913