File size: 1,628 Bytes
3e2da47 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | {
"model": "relu-clip efflite4 distilled from CLIP ViT-L/14",
"input": {
"size": 224,
"layout": "NHWC",
"channels": "RGB",
"resize": "shortest side to 224, bicubic",
"crop": "center 224x224",
"scale": "divide by 255 to [0,1], then (x - mean) / std",
"mean": [
0.48145466,
0.4578275,
0.40821073
],
"std": [
0.26862954,
0.26130258,
0.27577711
],
"quantization": {
"dtype": "int8",
"scale": 0.015443762764334679,
"zero_point": -12,
"formula": "q = clip(round(x / scale + zero_point), -128, 127)"
}
},
"output": {
"embed_dim": 768,
"normalised": false,
"note": "L2 normalisation is deliberately left out of the graph so the accelerator subgraph stays free of reductions; do it on the host after dequantising.",
"quantization": {
"dtype": "int8",
"scale": 0.3109022378921509,
"zero_point": -5,
"formula": "x = (q - zero_point) * scale"
}
},
"text_embeddings": {
"imagenet1k_text_emb_vitl14.npz": {
"keys": [
"embs",
"labels"
],
"shape": [
1000,
768
],
"normalised": false,
"note": "average over the 80 OpenAI ImageNet templates; row norms 0.81-0.93, normalise before use"
},
"demo_prompt_emb_vitl14.npz": {
"keys": [
"text_emb",
"labels"
],
"shape": [
11,
768
],
"normalised": true,
"note": "prompts encoded verbatim, no templating"
}
},
"classification": "cosine(L2norm(image_emb), L2norm(text_emb)) -> argmax"
} |