GEAR-IBQ: standalone official live and EMA tokenizers
Encoder, learnable 16384x256 codebook and decoder from the official GEAR-IBQ checkpoint. raw.safetensors contains vq; ema.safetensors contains vq_ema. Both are preserved exactly, including names, shapes, dtypes and tensor values. The training discriminator is excluded. Original checkpoint SHA-256, pinned revision and exact-conversion evidence are in the provenance files.
This is the GEAR-trained IBQ codec, not the earlier original TencentARC IBQ checkpoint. GEAR releases tokenizers; its AR backbone is a separate training task. This bundle does not provide visual question answering or text-to-image generation on its own.
from huggingface_hub import snapshot_download
import sys, torch
folder=snapshot_download("gatilin/gear_ibq_tokenizer_16384")
sys.path.insert(0,folder)
from component import load_model
codec=load_model(folder,variant="ema")
x=torch.linspace(-1,1,3*256*256).reshape(1,3,256,256) # NCHW RGB [-1,1]
with torch.inference_mode():
quantized,_,info=codec.encode(x)
ids=info[2].reshape(1,16,16)
image=codec.decode(quantized)
Run python validate.py after installing requirements.txt. The test covers strict loading of each variant, 256px reconstruction, valid ID range, exact codebook lookup and decode parity, and agreement with native maximum-dot-product assignment. Results are in validation.json; no full-model capabilities or image-quality leaderboard scores are asserted. Native models/ibq_model.py is included unchanged.
Sources: official weights, official code, paper. Apache-2.0; original notices are retained.