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 ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 15 code samples: 14 from 1 repository linked to this paper, 1 identical to code harvested from another paper's repository. Across all 15: 12 ran (of which 9 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 3 where Syntology's instrument failed) · 3 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 14 samples from 1 repository, 11 ran (9 with no instrument failure; 2 where Syntology's instrument failed); 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.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 2 of the 12 samples that ran have no recorded date.

foundationvision/unitok officialmentioned in papermentioned on GitHubpytorchSyntology: 14 samples, 11 ran (2 instrument-failed) · 3 unverified 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 (of which 9 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 3 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is 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. 1 sample is listed last, in a group without a repository. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 6 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

foundationvision/unitok official repository 14 samples, 11 ran (2 instrument-failed) · 3 unverified
AttnProjection models/unitok.py ran · metamorphic tier: deterministic MIT (permissive) · 134e8fce743a76a0 · report fixture: returned AttnProjection · level recorded 2026-09-22
GeGluMlp models/unitok.py ran · metamorphic tier: deterministic MIT (permissive) · 1d52d9cc8d6405fe · report fixture: returned GeGluMlp · level recorded 2026-09-22
InvMbConvLNBlock models/unitok.py ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 925747adc8e48ca7 · report fixture: returned InvMbConvLNBlock · level recorded 2026-09-22
InvStem models/unitok.py ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 04d969cadbc4e6f5 · report fixture: returned InvStem · level recorded 2026-09-22
NormalizedEmbedding models/unitok.py ran · metamorphic tier: deterministic MIT (permissive) · c7585f75fa769b15 · report fixture: returned NormalizedEmbedding · level recorded 2026-09-22
PlainAttention models/unitok.py ran · metamorphic tier: deterministic MIT (permissive) · 329e243c3200b380 · report fixture: returned PlainAttention · level recorded 2026-09-22
Upsample2d models/unitok.py ran · metamorphic tier: deterministic MIT (permissive) · aadb57a18aa01718 · report fixture: returned Upsample2d · level recorded 2026-09-22
VectorQuantizer in 26 papers models/unitok.py ran · metamorphic tier: deterministic MIT (permissive) · 150dd2792a2bcac8 · report fixture: returned VectorQuantizer · level recorded 2026-09-22
VectorQuantizerM models/unitok.py ran · metamorphic tier: deterministic MIT (permissive) · 3ce435874422947f · report fixture: returned VectorQuantizerM · level recorded 2026-09-22
get_cosine_scheduler eval/llamagen/autoregressive/train/train_c2i.py ran · our draft was wrong MIT (permissive) · a8580707adda13dd · report fixture: signature optimizer:SGD/0/?, num_training_steps:int/0/int, num_cycles:float/0/float, last_epoch:int/0/int, base_lr:float/0/float, end_lr:float/0/float · returned LambdaLR · level recorded, date not recorded
get_entropy_loss models/unitok.py ran · our draft was wrong fingerprinted MIT (permissive) · b9ad16069d39de05 · report fixture: signature latent_embed:Tensor/2/float, codebook_embed:Tensor/2/float, inv_entropy_tau:float/0/float · returned Tensor · level recorded 2026-09-22
UniTok models/unitok.py unverified MIT (permissive) · 0201eaaed93053b2 · report
ViTaminDecoder models/unitok.py unverified MIT (permissive) · 694e2f6925e2eea4 · report
_init_conv models/unitok.py unverified MIT (permissive) · a0df8fea0fc36b20 · report
Repository not located 1 sample, 1 ran (1 instrument-failed) · 0 unverified
1 sample is identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
creat_optimizer in 5 papers repository not located ran · our draft was wrong licence of this copy not recorded · ba65976c1d96a7cb · report fixture: signature model:callable/0/?, weight_decay:float/0/float, learning_rate:float/0/float, betas:tuple/1/float, logger:Logger/0/? · returned AdamW · level recorded, date not recorded

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for UniTok (graph method: UniTok). 13 bricks; individually on a fixture: 10 ran (of which 9 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified. The assembly has not been run end-to-end.

  1. UniTok entry · level 0 · unverified · 0201eaaed93053b2
  2. AttnProjection helper · level 1 · ran · 134e8fce743a76a0
  3. GeGluMlp helper · level 1 · ran · 1d52d9cc8d6405fe
  4. VectorQuantizerM helper · level 1 · ran · 3ce435874422947f
  5. ViTaminDecoder helper · level 0 · unverified · 694e2f6925e2eea4
  6. PlainAttention helper · level 1 · ran · 329e243c3200b380
  7. VectorQuantizer model · level 1 · ran · 150dd2792a2bcac8
  8. InvMbConvLNBlock helper · level 1 · ran · 925747adc8e48ca7
  9. InvStem helper · level 1 · ran · 04d969cadbc4e6f5
  10. Upsample2d helper · level 1 · ran · aadb57a18aa01718
  11. NormalizedEmbedding helper · level 1 · ran · c7585f75fa769b15
  12. get_entropy_loss helper · level 1 · ran · our draft was wrong · b9ad16069d39de05
  13. _init_conv helper · level 0 · unverified · a0df8fea0fc36b20

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2502.20321") returns these assemblies with each brick's role and wiring (how to connect).

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