MaMMUT2 OpenCLIP Validation
Collection
Modelling validation of new MaMMUT2 (fixed pooling) + NaFlex / ModernText architecture changes in OpenCLIP. All runs across 32 epochs of CC12M • 8 items • Updated
How to use rwightman/naflex_ViT-B-32.cc12m with OpenCLIP:
import open_clip
model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:rwightman/naflex_ViT-B-32.cc12m')
tokenizer = open_clip.get_tokenizer('hf-hub:rwightman/naflex_ViT-B-32.cc12m')Two-tower CLIP with a NaFlexVit B/32 vision tower (native-aspect variable patch grids). Trained as part of NAdaMuon optimizer experiments; included as the closest prior baseline for the MaMMUT2 comparison rather than a purpose-trained control.
Research checkpoint from a B/32-scale architecture/objective comparison on CC12M (CLIP vs MaMMUT2 vs modern text decoder); not a production model.
import torch
import open_clip
model, preprocess = open_clip.create_model_from_pretrained('hf-hub:rwightman/naflex_ViT-B-32.cc12m')
tokenizer = open_clip.get_tokenizer('hf-hub:rwightman/naflex_ViT-B-32.cc12m')
image = preprocess(pil_image).unsqueeze(0)
text = tokenizer(['a dog', 'a cat', 'a bird'])
with torch.no_grad():
image_features = model.encode_image(image)
text_features = model.encode_text(text)
| run | IN1K | IN-V2 | IN-R | IN-Sk | I2T R@1 | T2I R@1 | CIDEr | BLEU-4 | METEOR |
|---|---|---|---|---|---|---|---|---|---|
| clip-siglip | 42.72 | 36.44 | 54.38 | 32.08 | 34.84 | 25.95 | |||
| clip-naflex (this model) | 40.4 | 34.43 | 50.53 | 28.55 | 34.6 | 24.25 | |||
| mammut2 (no z) | 37.8 | 31.98 | 48.8 | 27.16 | 37.52 | 24.72 | 10.02 | 2.43 | 7.37 |
| mammut2 (+z) | 38.36 | 32.47 | 49.44 | 27.12 | 38.18 | 24.54 | 10.04 | 2.41 | 7.38 |
| mammut2-naflex | 37.54 | 31.92 | 48.63 | 26.28 | 38.64 | 24.7 | 9.52 | 2.33 | 7.4 |
| mammut2-mt no-qk lr1e-3 | 38.07 | 32.78 | 50.84 | 27.28 | 37.44 | 25.18 | 10.96 | 3.58 | 7.69 |
| mammut2-mt qk lr2e-3 | 38.37 | 33.02 | 50.56 | 27.18 | 37.94 | 24.93 | 10.85 | 3.44 | 7.57 |
| mammut2-mt qk lr3e-3 | 37.05 | 31.82 | 48.41 | 26.03 | 35.92 | 24.06 | 10.29 | 3.31 | 7.35 |
All eight runs: CC12M, 32 epochs, 2x GPU, bf16 amp, wd 0.25, evaluated at epoch 32 with one harness (ImageNet zero-shot w/ OpenAI 80-prompt ensemble; COCO Karpathy-test retrieval, I2T = any-of-5-captions; caption metrics vs the 5 COCO refs, beam search). Key reads: