Paper Feed

Issue 25 · Project 05 GitHub AI / ML ✓ read

ShareLab-SII/UniAR

[ICML 2026] The official implementation of paper "Unified Multimodal Autoregressive Modeling with Shared Context—Visual Tokenizer is Key to Unification"

TL;DR: UniAR (Qwen Team + Fudan, ICML 2026) is a unified autoregressive model doing image understanding, generation, and editing in one Transformer, built around a single argument: the reason most "unified" models feel stitched together is that they use two separate visual tokenizers — a semantic encoder for understanding and a VQ codebook for generation. UniAR uses one discrete tokenizer for both, so the model can read its own generated tokens in-context without re-encoding. Code, SFT and RL checkpoints, and a live HF demo are all out.

The core idea

Most unified models (Chameleon-style excepted) split the visual pathway: a CLIP/SigLIP-like continuous encoder feeds understanding, while a separate VQ tokenizer or diffusion head handles generation. That split means the model's generated output lives in a different representation space than its input pathway — to reason about an image it just made, it has to decode to pixels and re-encode. UniAR's claim, right in the title, is that unification is a tokenizer problem, not an architecture problem.

Their tokenizer is a multi-level BSQ (Binary Spherical Quantization — lookup-free, so no codebook collapse) that fuses shallow features (texture, low-level detail) with deep features (semantics) into one discrete code stream, with an effective vocabulary of 2⁶⁴ codes. Because the codes carry both semantic and reconstructive information, the same token sequence serves as input for understanding and as target for generation — one shared context for chat, generation, and editing turns.

Two supporting tricks make this practical:

  • Parallel bitwise prediction: multiple spatially grouped, multi-level codes are predicted jointly per AR step, giving 32× visual compression — a 1024×1024 image costs only 256 AR tokens. That's a big deal for AR image generation, where token count is usually the bottleneck (VQGAN-style setups need thousands of tokens at that resolution).
  • A DiT decoder (SD3-medium transformer with semantic feature injection) turns discrete codes into pixels and handles resolution upsampling, so the AR model doesn't have to carry the burden of pixel fidelity.

Training includes an RL stage: GRPO with a multi-reward stack on image generation, run as a distributed system with separate decode servers, reward servers, and training nodes. Both UniAR-SFT and UniAR-RL checkpoints are released.

Typical unified model CLIP encoder VQ tokenizer LLM generated image must be decoded and re-encoded to be understood

UniAR Multi-level BSQ tokenizer (2⁶⁴) AR model generated tokens are directly readable in shared context DiT decoder → pixels

The dual-tokenizer split forces a decode–re-encode round trip between generation and understanding; UniAR's single BSQ tokenizer keeps everything in one token space, with a DiT decoder only at the pixel boundary.

What's released and what the evidence looks like

Released: full inference code, SFT and RL checkpoints on HF (AR model + BSQ encoder + SD3 transformer + SD3 pipeline), a multi-node batch inference/eval harness with converters for GenEval, OneIG-Bench, LongText-Bench, and ImgEdit, RL training docs, and a Gradio demo on HF Spaces.

Notably, the README contains zero benchmark numbers — no GenEval score, no understanding benchmarks, nothing quantitative beyond the 32× compression claim. The eval scripts and benchmark converters exist, but you'll have to go to the paper or project page for results. For an ICML acceptance from the Qwen team I'd expect the numbers to be respectable, but the README doesn't let you check.

Also missing: visual decoder training code (an open TODO), so you can't retrain or fine-tune the pixel decoder — only the AR side. No license is stated in the README. Stars are modest (54), but it's a month old.

Assessment

The framing is the interesting part. "Which tokenizer design enables unification" is a live debate — Chameleon showed pure discrete tokens hurt understanding quality; most successors retreated to dual pathways or diffusion heads. UniAR's answer (fuse shallow + deep features via lookup-free BSQ, huge effective vocabulary, offload fidelity to a DiT decoder) is a concrete, testable position, and the shared-context payoff is real for editing: multi-turn edits shouldn't accumulate re-encoding artifacts, since the model never leaves token space between turns. That's exactly what to stress-test in the demo — chain three or four edits and see if identity and detail hold.

The DiT decoder is a slight hedge on purity: pixel synthesis is still handled by an SD3-derived diffusion transformer, so "autoregressive generation" here means AR over semantic-ish codes with a diffusion renderer — closer to X-Omni (which they acknowledge) than to raw AR-in-pixel-token-space. That's a reasonable engineering choice, but worth knowing.

Lineage matters too: this comes out of the Qwen team, and design choices here (BSQ tokenizer, parallel bitwise prediction) may well foreshadow what lands in future Qwen omni-modal releases.

Try it

Fastest path is the HF Space demo. Locally (needs Python 3.12, CUDA 12.1+, ≥24 GB VRAM):

git clone https://github.com/ShareLab-SII/UniAR.git && cd UniAR
pip install -e . && pip install flash-attn --no-build-isolation
huggingface-cli download ShareLab-SII/UniAR-RL --local-dir checkpoints/UniAR-RL

python inference/generate.py --model_path checkpoints/UniAR-RL \
  --prompt "A cute anime girl." --output_path output.png

python inference/chat.py --model_path checkpoints/UniAR-RL \
  --image demo.jpeg --prompt "Describe this image in detail."