← All models

MODEL EXPLORER / MULTIMODAL MILESTONES

Meet in a shared image–text space

Where do the image and text meet?

Curated by TensorVizCLIP · 4-step tour
Static architecture
Where do the image and text meet?
Opening the interactive graph…
Architecture snapshot · No Python requiredDownload graph ↓

RECORDED NUMERICAL EXAMPLE

Pair the batch in both directions.

Recorded similarities for three synthetic image/token pairs. Compare pairing order and temperature using the same untrained encoder weights.

Rows are images; columns are texts in the displayed order. Diagonal targets encode the supplied pairing, not model knowledge. Temperature rescales the same cosines before both softmax directions. These random encoders have no learned image–text alignment.

Cosine similarity · images × texts

Min 0.1821 · Max 0.2774

Recorded cell values
Row / col012
00.24130.18210.2245
10.2570.1940.2446
20.27740.22010.2607
Image → text probabilities

Min 0.1811 · Max 0.4513

Recorded cell values
Row / col012
00.45130.19380.3549
10.44560.18110.3733
20.44860.19790.3535
Text → image probabilities

Min 0.2493 · Max 0.4406

Recorded cell values
Row / col012
00.25470.31880.4265
10.25610.30330.4406
20.24930.33240.4183

Each heatmap uses its own scale. Mint is positive, rust is negative, and the lightest color is zero. Table values are rounded to four significant digits.

Text column order · original index
0
1
2
Target column per image
0
1
2

Bars share one scale within this example. Values are rounded to four significant digits.

Temperature
0.07
Symmetric contrastive loss
1.163
Mean image-row entropy · nats
1.043
Verified by the local recipe
  • Both projected modalities have unit norm; logits are scaled pairwise cosines
  • Joint pair permutations preserve the objective; text-only permutations move similarity columns
  • The text attention is causal and the symmetric loss equals both diagonal log-probabilities
  • Both encoders and the learned log-temperature receive gradients; a small SGD step lowers this batch loss

Download the source and run.py to reproduce these checks. Choosing an example here replays recorded values.

ABOUT THIS EXAMPLE

Trace two independent encoders into normalized embeddings, then compare both directions of the image–text contrastive objective.

Training method · 2021

CLIP

One width-eight, two-head block per encoder. Four image patches plus a class token; four text positions with fixed final EOS pooling. Linear projections into four shared features and learned log-temperature.

Source, capture & limitations +

Reduced untrained ViT/text towers with a vocabulary of sixteen, fixed-length inputs, GELU and no tokenizer or augmentation pipeline. Text pooling assumes EOS occupies the final position. Synthetic pairs teach the objective, not image–text understanding or zero-shot accuracy.

Original TensorViz teaching example. PyTorch provides the underlying operators.

No separate redistribution license has been declared for these project examples.

Content revision
f82eeaabb5d24e21
Source SHA-256
a7e72c3bbad2e899038b77cab7a58e4115cbe191500180e55a0058316f782711
Captured
2026-09-17 · Python 3.13.13 / Torch 2.7.1

Reduced image/text encoders, normalized cosine scores, symmetric contrastive loss, pairing permutations, causal text visibility and gradient checks. Synthetic images and token IDs; no trained semantic alignment.

Read the model manifest ↗