Model reference · open weights

UniAR-SFT

LLMs ShareLab-SII Image→text 1 build Open weights 544 dl/mo

UniAR-SFT is an open-weight language model from ShareLab-SII. UniAR-SFT (BF16) weighs 19.3 GB; the smallest configuration that runs it is RTX 4090 24 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • UniAR-SFT is a 9.6B parameter unified autoregressive multimodal model developed by ShareLab-SII for image understanding, generation, and editing.
  • It utilizes a Qwen3-8B backbone and a BSQ visual tokenizer to operate within a shared context, with this specific checkpoint representing the supervised fine-tuned version prior to reinforcement learning.
  • The model supports a context length of 32,768 tokens, operates in English, and is released under the Apache 2.0 license.

Summary of the ShareLab-SII/UniAR-SFT model card, 2026-10-01

What it is

Released byShareLab-SII
Released2026-06-16
Parameters9.6B
VRAM19.3 GB for the weights

What it runs on

Memory and cards for UniAR-SFT (BF16)

19.3 GBweights, file size
147 MBcache per 1K tokens
2.0 GBruntime overhead, at least
32,768 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 4060 Ti 16 GB
2 smaller cards
RTX 3090 24 GB113K23.4 GB
RTX 4090 24 GB113K23.4 GB
RTX 5090 32 GB82all 32K31.0 GB
L40S 48 GB184all 32K44.0 GB
A100 80 GB4711all 32K78.2 GB
H100 80 GB4310all 32K78.1 GB
RTX PRO 6000 Blackwell 96 GB5614all 32K93.8 GB
DGX Spark (GB10) 128 GB unified6716all 32K107 GB
H200 141 GB9323all 32K138 GB
B200 180 GB12431all 32K176 GB
2× RTX 4060 Ti 16 GB
tensor parallel
61all 32K15.4 GB a card
2× RTX 4090 24 GB
tensor parallel
194all 32K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
194all 32K23.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
122.5 GB26.1 GB
527.3 GB45.5 GB
831.0 GB60.0 GB
1640.6 GB98.6 GB
3260.0 GB176 GB
6498.6 GB331 GB

One card, with vLLM's small-card settings.

From the model card

What ShareLab-SII says about UniAR-SFT

Read the model card

UniAR is a unified autoregressive multimodal model for image understanding, image generation, and image editing in a single Transformer. UniAR-SFT is the supervised fine-tuned checkpoint (before RL).

Model Description

UniAR uses a single discrete visual tokenizer (BSQ) as the key bridge between understanding and generation, enabling a shared context where the model can directly interpret its own generated visual tokens. Key components:

  • Backbone: Qwen3-8B
  • Visual Tokenizer: BSQ-quantized SigLiP2-So400M ViT with DeepStack connections
  • Visual Decoder: SD3.5-Medium DiT with SigLIP feature injection
  • Training: Pre-training (1T tokens) → SFT

This checkpoint (UniAR-SFT) is the supervised fine-tuned model before RL. It provides a good starting point for custom RL training.

Checkpoint Contents

This is a self-contained checkpoint with all components needed for both understanding and generation:

ComponentPathDescription
AR model*.safetensorsUnified autoregressive model weights
BSQ encoderbsq_encoder/BSQ quantized image tokenizer
SD3 transformersd3_transformer/SD3 transformer with visual feature injection
SD3 pipelinesd3_pipeline/SD3 VAE + text encoders

Usage

Installation

conda create -n uniar python=3.12 -y
conda activate uniar

git clone https://github.com/ShareLab-SII/UniAR.git
cd UniAR
pip install -e .            # inference dependencies

Image Understanding

import torch
from transformers import AutoProcessor
from uniar import UniARForConditionalGeneration

model_path = "ShareLab-SII/UniAR-SFT"
model = UniARForConditionalGeneration.from_pretrained(
    model_path,
    torch_dtype=torch.bfloat16,
    attn_implementation="flash_attention_2",
).cuda().eval()
processor = AutoProcessor.from_pretrained(model_path)

messages = [{"role": "user", "content": [
    {"type": "image", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"},
    {"type": "text", "text": "Describe this image in detail."},
]}]

inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)
inputs.pop("mm_token_type_ids", None)

with torch.no_grad(), torch.autocast("cuda", dtype=torch.bfloat16):
    output_ids = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
output_ids = [o[len(i):] for i, o in zip(inputs.input_ids, output_ids)]

print(processor.batch_decode(output_ids, skip_special_tokens=True)[0])

Image Generation

import torch
from transformers import AutoProcessor
from uniar import UniARForConditionalGeneration, UniARVisualDecoder
from inference.visual_inputs import prepare_visual_inputs

model_path = "ShareLab-SII/UniAR-SFT"
device = torch.device("cuda")

ar_model = UniARForConditionalGeneration.from_pretrained(
    model_path,
    torch_dtype=torch.bfloat16,
    attn_implementation="flash_attention_2",
).to(device).eval()
processor = AutoProcessor.from_pretrained(model_path, padding_side="left")
visual_decoder = UniARVisualDecoder.from_pretrained(model_path, device=device)

# prepare inputs
visual_inputs = prepare_visual_inputs(
    ["A cute anime girl."],
    ar_model,
    processor,
    ar_height=960,
    ar_width=960,
)

# autogressively generate visual indices
indices = ar_model.generate_visual(
    **visual_inputs,
    temperature=1.0,
    cfg=1.5,
    show_progress=True,
)

# decode visual indices into image
images = visual_decoder.decode(
    indices,
    ar_height=960,
    ar_width=960,
    upsampling_ratio=1.067,
)

images[0].save("output.png")

Citation

@article{peng2026unified,
  title={Unified Multimodal Autoregressive Modeling with Shared Context-Visual Tokenizer is Key to Unification},
  author={Peng, Wujian and Meng, Lingchen and Cai, Yuxuan and Zhuang, Xianwei and Yang, Yuhuan and Fang, Rongyao and Wu, Chenfei and Lin, Junyang and Wu, Zuxuan and Bai, Shuai},
  journal={arXiv preprint arXiv:2606.18249},
  year={2026}
}

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms