TIPSv2-L/14 image encoder for LiteRT

Standalone image encoder from Google TIPSv2-L/14, producing two global embeddings and spatial patch features. Text encoders and task heads are not included. 448 is the native resolution; 224 reduces computation and memory use.

Files

Resolution Format File Size (MiB)
224 FP32 fp32/224/model.tflite 1156.7
224 A16W8 a16w8/224/model.tflite 298.7
224 A16W8 Qualcomm NPU a16w8/224/model_qualcomm.tflite 298.7
448 FP32 fp32/448/model.tflite 1159.7
448 A16W8 a16w8/448/model.tflite 301.7
448 A16W8 Qualcomm NPU a16w8/448/model_qualcomm.tflite 301.7

Use FP32 as the floating baseline and for CPU inference. Portable A16W8 uses INT8 transformer FC weights and INT16 activation interfaces. It retains FLOAT32 public input/output, patch embedding, and LayerNorm fallback computation. A16W8 CPU execution can be slow.

model_qualcomm.tflite files are dedicated Qualcomm NPU compilation inputs with UINT16 activations. They require a compatible vendor compiler/runtime, contain no embedded vendor context, and do not support CPU fallback. Their Softmax outputs use zero point 0 and scale 1/32768.

The graphs omit redundant attention mask zero-adds and Qualcomm value transposes. Runtime validation and performance measurements for these updated graphs are pending; validation.json distinguishes structural checks from historical source-file evidence.

Usage

Signature: main. Input: pixel_values, FLOAT32 NCHW [1,3,S,S], with fixed S=224 or S=448. Convert to RGB, resize directly to the square with PIL bilinear interpolation, and divide by 255. Do not crop or apply ImageNet mean/std normalization.

Output Shape Meaning
cls_token [1,1024] Global token trained with web captions
secondary_cls_token [1,1024] Global token trained with synthetic captions
patch_features [1,256,1024] or [1,1024,1024] Spatial patch tokens

Outputs are post-LayerNorm and are not L2-normalized. Apply task-specific normalization outside the model. Zero-shot text/image applications also need the matching source text encoder.

pip install ai-edge-litert==2.3.0 numpy Pillow
python run_tipsv2_tflite.py --model fp32/224/model.tflite --image image.jpg --output features.npz --threads 4

The example uses CPU. Load models by filename to support external weight buffers, particularly for large FP32 files.

Quantization

A16W8 uses static TorchAO post-training quantization with 500 calibration images per resolution. LayerScale is folded into FP32 projection weights and biases before calibration. FC weights are symmetric INT8 per output channel, with INT64 biases and activation ranges adjusted for INT32 accumulation. See quantization.json for the recipe and calibration identities.

Source and license

Source revision: 52847a71eb02a3082c370fbcd98cd799687bd4d0. File hashes, operator counts and interfaces are in model_info.json. The original model and implementation are by Google, under Apache 2.0. See the TIPS repository, TIPSv2 paper, LICENSE and NOTICE.

Downloads last month
63
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for litert-community/TIPSv2-L14-LiteRT

Finetuned
(3)
this model

Paper for litert-community/TIPSv2-L14-LiteRT