Downloads · 30 days
0
tennyyyin/dino-fsq-sweep
dino-fsq-sweep is a robotics model from tennyyyin. Use it for the robotics task on the model card, and read the license before you ship it in a product. It is set up for pytorch.
Trained FSQ quantizer heads for a DINOv3 ViT-B/16 patch tokenizer, from the arwamrl world-model codebase. Each head takes a 768-d patch feature and squeezes it through a finite scalar quantization lattice, producing o…
Downloads · 30 days
0
Access
Public
Updated Sep 10, 2026
Repo size
1.7 GB
Likes
0
Public
Click a slice to open those files.
.pt1.7 GB · 100%
From the Hugging Face model README
Trained FSQ quantizer heads for a DINOv3 ViT-B/16 patch tokenizer, from the ar_wam_rl
world-model codebase. Each head takes a 768-d patch feature and squeezes it through a finite
scalar quantization lattice, producing one integer code per patch plus a reconstruction.
Six heads are released — the best config at each (mode, rate) point on the rate-distortion frontier. Deliberately-bad control arms from the sweep (the as-shipped default, a collapsed head) are not included.
| mode | what is quantized | use |
|---|---|---|
delta | feat[t] - feat[t-1] | tokenizes the frame-to-frame change; reconstruction is prev + v_hat, run closed-loop |
feat | feat[t] | tokenizes each frame independently; no temporal reference needed |
delta dominates feat at every rate below ~37 bits, because most of a patch feature is static
scene content that the previous frame already supplies.
1-step (h1) and 3-step closed-loop (h3) reconstruction, decoded to RGB through the frozen
DINOv3 pixel decoder, on a held-out multiview manipulation val set. PSNR (dB) / SSIM.
| head | mode | bits/patch | lattice | head | h1 PSNR/SSIM | h3 PSNR/SSIM |
|---|---|---|---|---|---|---|
delta_512codes_lin | delta | 9.0 | 3d × L8 | linear | 17.50 / 0.6430 | 16.73 / 0.6246 |
delta_4k_lin | delta | 12.0 | 4d × L8 | linear | 17.55 / 0.6440 | 16.80 / 0.6263 |
delta_16bit_MLP | delta | 16.0 | 16d × L2 | MLP-512 | 18.21 / 0.6455 | 17.59 / 0.6239 |
delta_37bit_MLP_d16L5 | delta | 37.1 | 16d × L5 | MLP-512 | 18.98 / 0.6621 | 18.42 / 0.6456 |
feat_16bit_MLP | feat | 16.0 | 16d × L2 | MLP-512 | 15.75 / 0.5460 | 15.82 / 0.5512 |
feat_37bit_MLP_d16L5 | feat | 37.1 | 16d × L5 | MLP-512 | 17.68 / 0.6153 | 17.71 / 0.6214 |
Reference points on the same val set and decoder:
| reference | h1 PSNR/SSIM | h3 PSNR/SSIM |
|---|---|---|
| true features (decoder ceiling) | 25.56 / 0.8110 | 25.51 / 0.8151 |
| copy previous frame (trivial floor) | 16.56 / 0.6292 | 15.61 / 0.6038 |
| mean feature (degenerate floor) | 12.86 / 0.5396 | 12.88 / 0.5447 |
Read these numbers with the floor in mind. PSNR here is dominated by static scene content,
which every head reconstructs well; the frame-to-frame motion is what they mostly miss. Against
the 16.56 dB copy-previous-frame floor and the 25.56 dB ceiling, the best head closes roughly a
quarter of the gap. feat_16bit_MLP sits below the copy floor — a 16-bit independent code per
patch is a harder problem than it sounds.
x (768-d) -> standardize (fixed affine, mu/sd in the state dict)
-> enc Linear(768, d) if hidden is None
or Linear(768,h) GELU Linear(h,d)
-> FSQ lattice, per-dim, straight-through -> integer code in [0, prod(levels))
-> dec Linear(d, 768) if hidden is None
or Linear(d,h) GELU Linear(h,768)
All released heads use scheme="ifsq" (equal-width cells on [-1,1] via a sigmoid squash, which
maps Gaussian activations to near-uniform codes) and input_norm="standardize". Nominal rate is
log2(prod(levels)) bits/patch.
Two notes for anyone inspecting the weights:
mu / sd are buffers carrying the training-set feature statistics, so a head restored from a
checkpoint needs no access to the training data.q.proj_in.* / q.proj_out.* are untrained dead weight. The head uses only FSQ's lattice
and substitutes its own enc/dec; FSQ's internal projections are bypassed and frozen. They
are kept in the state dict so checkpoints load strictly. Do not read anything into their values.QHead and the loader live in models/dinofsq_head.py in the
ar_wam_rl repo (models/quantizers.py supplies the FSQ
lattice). Clone it, then:
from models.dinofsq_head import CONFIGS, from_pretrained
print(sorted(CONFIGS)) # the six released names
head, cfg = from_pretrained("delta_37bit_MLP_d16L5", device="cuda") # -> (module, config)
# feats: (B, T, N, 768) DINOv3 patch features (models/dinov3.py)
prev = feats[:, 0]
for t in range(1, feats.shape[1]):
v_hat, codes, _ = head(feats[:, t] - prev) # codes: (B, N) int64
prev = prev + v_hat # closed loop: reference is the reconstruction
For feat mode, call head(feats[:, t]) and use the returned reconstruction directly.
Each .pt is a bare state_dict; configs.json holds the architecture config keyed by the same
names, which is what models/dinofsq_head.py uses to rebuild the module before loading.
Heads were fit on cached DINOv3 features (the only trainable part of the tokenizer), AdamW with a
200-step linear warmup, log-cosh reconstruction loss, no weight decay. Per-head lr and steps
are in configs.json — 8k steps at 1e-3 for the linear heads, 16k at 1e-3 for the MLP heads.
MLP heads are sensitive to learning rate: at 1e-2 the encoder collapses to a constant output and
the effective vocabulary falls to a handful of codes.