Papers › UniTok: A Unified Tokenizer for Visual Generation and Understanding

UniTok: A Unified Tokenizer for Visual Generation and Understanding

27 Feb 2025arXiv:2502.20321archive 2025-07-28

Chuofan Ma, Yi Jiang, Junfeng Wu, Jihan Yang, Xin Yu, Zehuan Yuan, Bingyue Peng, Xiaojuan Qi

Visual generative and understanding models typically rely on distinct tokenizers to process images, presenting a key challenge for unifying them within a single framework. Recent studies attempt to address this by connecting the training of VQVAE (for autoregressive generation) and CLIP (for understanding) to build a unified tokenizer. However, directly combining these training objectives has been observed to cause severe loss conflicts. In this paper, we show that reconstruction and semantic supervision do not inherently conflict. Instead, the underlying bottleneck stems from limited representational capacity of discrete token space. Building on these insights, we introduce UniTok, a unified tokenizer featuring a novel multi-codebook quantization mechanism that effectively scales up the vocabulary size and bottleneck dimension. In terms of final performance, UniTok sets a new record of 0.38 rFID and 78.6% zero-shot accuracy on ImageNet. Besides, UniTok can be seamlessly integrated into MLLMs to unlock native visual generation capability, without compromising the understanding performance. Additionally, we show that UniTok favors cfg-free generation, reducing gFID from 14.6 to 2.5 on ImageNet 256×256 benchmark. GitHub: https://github.com/FoundationVision/UniTok.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2502.20321")

Code

Syntology Ran 12 of 15 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 3 ran · our draft was wrong; 9 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 11 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

foundationvision/unitok officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 12 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
9ran
3unverified

Licence: 1 of the 15 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from foundationvision/unitok. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

AttnProjection foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 134e8fce743a76a0 · report
GeGluMlp foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 1d52d9cc8d6405fe · report
InvMbConvLNBlock foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 925747adc8e48ca7 · report
InvStem foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 04d969cadbc4e6f5 · report
NormalizedEmbedding foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic MIT (permissive) · c7585f75fa769b15 · report
PlainAttention foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 329e243c3200b380 · report
Upsample2d foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic MIT (permissive) · aadb57a18aa01718 · report
VectorQuantizer foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 150dd2792a2bcac8 · report
VectorQuantizerM foundationvision/unitok/models/unitok.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 3ce435874422947f · report
get_cosine_scheduler FoundationVision/UniTok/eval/llamagen/autoregressive/train/train_c2i.py official repository ran · our draft was wrong MIT (permissive) · a8580707adda13dd · report
get_entropy_loss foundationvision/unitok/models/unitok.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · b9ad16069d39de05 · report
UniTok foundationvision/unitok/models/unitok.py official repository unverified MIT (permissive) · 0201eaaed93053b2 · report
ViTaminDecoder foundationvision/unitok/models/unitok.py official repository unverified MIT (permissive) · 694e2f6925e2eea4 · report
_init_conv foundationvision/unitok/models/unitok.py official repository unverified MIT (permissive) · a0df8fea0fc36b20 · report
creat_optimizer identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · ba65976c1d96a7cb · report

Tasks

Quantization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIP

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections