Meituan dNaViT: f=32 discrete codes hit OCRBench 885, GenEval2 49.5

dNaViT: Discrete Codes are General-Purpose Visual Representations

Xiaotong Li, Zhengrong Yue, Xu Huang, Jialv Zou, Minhao Jing, Wenhao Yan, Haodong Li, Hai Huang, Bo Zhao, Yan Feng, Peng Pei, Xunliang Cai

cs.CV, cs.AI

2026-11-09

Meituan's dNaViT freezes a Qwen3-VL ViT and emits f=32 discrete codes via residual modulation and grouped quantization. With Qwen3-8B: OCRBench 885, GenEval2 49.5.

What problem this solves

Vision models usually keep two interfaces. Understanding runs on pretrained semantic features. Generation runs on continuous latents built for reconstruction. Encoders and losses do not transfer. Language models avoided that split by committing to one discrete vocabulary and next-token prediction. Images fit that pattern poorly. Semantics prefers invariance to texture and lighting, while reconstruction needs glyphs, faces, and thin edges. A small codebook merges those differences into one index. Updating the encoder so reconstruction can recover them tends to hurt classification and reasoning.

dNaViT, from Meituan LongCat, is a discrete native-resolution vision tokenizer. Spatial downsampling is fixed at f=32, so each side shrinks by 32 and a 512-pixel edge leaves a 16×16 grid. The experiment asks whether that short code sequence can serve reconstruction, understanding, generation, and editing together.

Method

The base encoder is a frozen Qwen3-VL ViT, about 400M parameters, left untouched in training. A residual modulator, ResMod, adds about 100M. The tokenizer is about 500M altogether.

ResMod does not rewrite the semantic feature. It predicts a per-location scale and shift and applies them on top of the frozen map. Early and late layers are fused, then aligned to the quantizer grid. The prediction head starts at zero, so at step zero the output equals the pretrained feature. The useful picture is a residual whose direction stays the pretrained semantic vector.

Quantization is grouped product quantization. Channels split into G groups, each with its own codebook. The number of combinations is the per-group size raised to G, without storing a vocabulary that large, and the spatial length stays put. Moving from 16 to 64 groups raises the nominal bit budget and also the number of sub-tokens a language model must predict. Understanding uses 16 groups. Generation uses 16 groups plus a refiner. The 64-group variant shows up in reconstruction comparisons.

One code feeds two decoders. The semantic branch reconstructs the modulated feature with cosine similarity plus mean squared error. Cosine alone flatters the result: if features sit in a narrow cone, the angle can match while the values are still off. The pixel branch decodes back to the original resolution with pixel error, LPIPS, a ConvNeXt perceptual term, and a texture term.

Training has three stages so the two losses do not overwrite each other. Stage one skips quantization and opens a path for pixel detail. Stage two freezes ResMod and stops pixel gradients at the codebook embedding, so reconstruction does not wipe a codebook that is still learning semantics. Stage three lets pixel gradients through again. The semantic target comes from a frozen copy of ResMod, so the target cannot drift with the student.

A plain ViT pixel decoder smears small text. The Refiner is a flow-matching decoder conditioned only on the discrete codes. It follows a velocity field from noise to an image, never sees an intermediate RGB render, and takes no text. A multi-step teacher is distilled into a one-step student.

Training images mix general web photos, text-heavy pages, faces, and high-aesthetic shots. Resolution starts at 256 and goes up to about 2K. Across stages the tokenizer sees several hundred billion tokens.

Results

The reconstruction table is not a rate-matched leaderboard.

At f=32, 256 resolution, and 64 spatial positions, dNaViT-G64 reaches 25.41 dB PSNR and 0.76 SSIM. BitDance at the same compression is 25.30 dB and 0.74. Continuous DC-SAE is 23.13 dB. G16 is only 22.82 dB and 0.64. At 512, G64 is 28.12 dB and 0.81. At 1024 it is 32.90 dB and 0.91. G16 at those two resolutions is 25.47 dB / 0.71 and 28.93 dB / 0.81. FLUX-VAE at f=8 scores 32.74 dB on 256 images, with 1024 spatial positions. That is a different compression regime.

TokBench measures text and faces. At 1024 and f=32, G64 scores 63.08% text accuracy, 78.27% normalized edit similarity, and 0.67 face similarity. LlamaGen-f8, on a grid four times finer along each side, is reported at 63.89%, 78.24%, and 0.67. DC-AE, also f=32, is at 52.14%, 68.02%, and 0.50. O-MAGVIT2-f8 is higher, at 69.68%, 83.12%, and 0.74. Small text is still weak: in the small-instance bucket at 1024, G64 text accuracy is 26.79%, against 93.95% on large instances. FLUX.1-dev reaches 93.09% text accuracy and 0.96 face similarity.

Quantization does not wipe linear semantics. On ImageNet-1K linear probes, continuous dNaViT scores 80.40% and discrete G16 scores 79.47%, a drop of 0.93 points. The frozen QwenViT baseline is 80.45%. Among discrete models in the table, G16 beats UniTok at 78.56% and UniAR at 66.54%. Emu3.5 falls to 8.39%. ImageNet-R rises from 65.19% continuous to 68.09% discrete, and ObjectNet from 56.48% to 59.79%. UniTok remains ahead on ImageNet-R, ObjectNet, and ImageNet-Sketch, at 71.10%, 60.53%, and 51.03%.

The understanding model attaches frozen G16 codes to Qwen3-8B. Alignment, pretraining, mid-training, and supervised fine-tuning use about 70B, 150B, 60B, and 30B tokens.

ModelMMMUMMMU-ProMathVistaOCRBenchDocVQA
Qwen3-VL-8B (continuous)69.655.977.289696.1
UniAR-8B44.322.7-83391.4
Emu3-Chat-8B31.6-47.668776.3
dNaViT-8B70.744.579.088596.2

Document tasks sit close to the continuous 8B model. OmniDocBench edit distance is 0.17/0.22 (English/Chinese), against 0.17/0.26 for Qwen3-VL-8B. Lower is better. CharXiv description/reasoning is 86.5/51.0, above Qwen3-VL-8B at 83.0/46.4, and the highest pair in the table. MathVision is 56.5 against 53.9. The other side is not as close: MMMU-Pro 44.5 vs 55.9, InfoVQA 79.2 vs 83.1, MMStar 66.7 vs 70.9, and OCRBench v2 English 57.6 vs 65.4. Page-level OCR caught up. Harder multiple-choice and infographic questions did not.

Generation uses G16-R, an 8B model, at 32× spatial compression. GenEval2 overall is 49.5, the highest score among models that report it, ahead of SenseNova-U1-8B at 40.5, Qwen-Image at 33.8, and Emu3.5 (34.1B) at 25.4. Qwen-Image-Bench is 52.17, the best open-weight entry in the table, 0.11 above Qwen-Image-2512 at 52.06. Proprietary systems sit between 54.07 and 64.69. SpatialGenEval is 0.68, second to SenseNova at 0.72. LongText-Bench is 0.94 in both English and Chinese.

On the English full set of GEdit-Bench, dNaViT-8B scores 7.41 semantic consistency, 7.20 perceptual quality, and 7.30 overall. That is above BAGEL at 6.52 and below Qwen-Image-Edit at 7.56 and Emu3.5 at 7.59. Emu3.5 uses 16× compression. dNaViT uses 32×.

Against the original QwenViT features, mean token cosine similarity is 0.8857 for G16 and 0.9367 for G64. The paper notes that the two variants differ in training setup and duration, so group count is not an isolated variable.

Why it matters

A shared code index can enter a language model as a new embedding and can also be looked up again for a pixel decoder. The f=32 grid matches the frozen ViT, so long documents do not have to be cropped square first. Several understanding numbers already belong in the same table as Qwen3-VL-8B, and GenEval2 is higher than larger autoregressive models despite coarser spatial tokens.

This is a test of whether one discrete interface can carry both jobs. The paper describes the data budget as much smaller: several hundred billion tokens for the tokenizer, and about 310B across the four understanding stages. Token counts for the comparison models are not listed side by side. Editing still trails the strongest open editors.

Limitations

Reconstruction baselines are not at the same bit rate, and G16 and G64 were not trained for the same duration. Understanding, generation, and editing comparisons are whole-model comparisons. Data, resolution, and scoring can all differ.

A shared vocabulary is not yet one network. Understanding reads 16 group indices. Generation also passes through the Refiner. Each spatial site emits G sub-tokens, so part of the length saved by f=32 comes back as extra indices. The 64-group codes reconstruct better, but the understanding runs stay on 16 groups. MMMU-Pro is 44.5, 11.4 points behind Qwen3-VL-8B at 55.9. Matching page OCR does not mean the discrete model is level across the board. At 1.7B, the eight-benchmark average is 65.05 for discrete codes and 66.96 for continuous features with ResMod. Codebook size K appears only in the bit-budget formula. The paper never states the value.

Terms

Source

Related papers

All paper explainers