SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.12732 · 2023

CLIP-KD: An Empirical Study of CLIP Model Distillation

arXiv · PDF · Open in the Atlas

Code that ran

9 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 7 failures of our instrument; 9 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2307.12732.json · badge: /api/ran/2307.12732.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
winycg/clip-kd canonical (classifier label)
classifier basis: census
9 ran · 9 no recorded run
FunctionStatusWhere it lives
basic_clean Ran
ran; our contract draft was wrong, not the code
winycg/clip-kd/src/open_clip/tokenizer.py
pointer only (licence: NONE); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("98f385d847636a3e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_to_custom_text_state_dict Ran
ran, violated the contract we drafted
winycg/clip-kd/src/open_clip/model.py
pointer only (licence: NONE); the stored copy get_code serves, from deep-real/dcp, is pointer only (licence: NONE) · get_code("f19962ebb134b3d7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_cast_dtype Ran
ran; our contract draft was wrong, not the code
winycg/clip-kd/src/open_clip/model.py
pointer only (licence: NONE) · get_code("dcd422d66b0581d8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_grad Ran
ran; our contract draft was wrong, not the code
winycg/clip-kd/src/open_clip/loss.py
pointer only (licence: NONE) · get_code("ba49abe4c9f896d0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_pairs Ran
ran; our contract draft was wrong, not the code
winycg/clip-kd/src/open_clip/tokenizer.py
pointer only (licence: NONE) · get_code("d919ae32e5e4e616")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

image_transform Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
winycg/clip-kd/src/open_clip/transform.py
pointer only (licence: NONE) · get_code("181856ae1295b257")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_state_dict Ran
ran; our contract draft was wrong, not the code
winycg/clip-kd/src/open_clip/factory.py
pointer only (licence: NONE); the stored copy get_code serves, from zqhang/PointAD, is pointer only (licence: NONE) · get_code("4b3a4d17e1df3140")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

register_pooler Ran
ran on a synthesized input
winycg/clip-kd/src/open_clip/hf_model.py
pointer only (licence: NONE); the stored copy get_code serves, from WHU-USI3DV/TreeCLS, is pointer only (licence: NONE) · get_code("2a377da4a76a2d44")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

whitespace_clean Ran
ran; our contract draft was wrong, not the code
winycg/clip-kd/src/open_clip/tokenizer.py
pointer only (licence: NONE); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_model_from_openai_state_dict Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/model.py
pointer only (licence: NONE) · get_code("1ae9f5eab925c792")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

gather_features Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/loss.py
pointer only (licence: NONE); the stored copy get_code serves, from lxa9867/imagefolder, is pointer only (licence: NOASSERTION) · get_code("ddcbd45e940484ee")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_model_config Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/factory.py
pointer only (licence: NONE) · get_code("5c7cf820e99443ff")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_tokenizer Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/factory.py
pointer only (licence: NONE) · get_code("9b7c99fcbb58f26f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

list_pretrained Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/pretrained.py
pointer only (licence: NONE) · get_code("70a24b5107b6b553")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

list_pretrained_models_by_tag Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/pretrained.py
pointer only (licence: NONE) · get_code("b206733fa0764571")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

list_pretrained_tags_by_model Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/pretrained.py
pointer only (licence: NONE) · get_code("1e11392669acc284")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_openai_model Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/openai.py
pointer only (licence: NONE) · get_code("a1693b09a14a516f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

sim_stats Not yet run
unverified (harvested, no recorded run)
winycg/clip-kd/src/open_clip/loss.py
pointer only (licence: NONE) · get_code("486bb91e77fa750a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, winycg/clip-kd when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 15 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 3 the same month, 15 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_pairs 258 other papers
61 dated earlier, 4 the same month, 185 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
45 dated earlier, 4 the same month, 176 later, 5 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
basic_clean 218 other papers
45 dated earlier, 4 the same month, 163 later, 5 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 215 more not named here
get_cast_dtype 66 other papers
9 dated earlier, 57 later
2103.00020 (2021-03)
Learning Transferable Visual Models From Natural Language Supervision
2210.08402 (2022-10)
LAION-5B: An open large-scale dataset for training next generation image-text models
2212.07143 (2022-12)
Reproducible scaling laws for contrastive language-image learning
and 63 more not named here
gather_features 57 other papers
8 dated earlier, 49 later · 1 only as an assembly brick
2206.01670 (2022-06)
Egocentric Video-Language Pretraining
2212.00638 (2022-12)
Finetune like you pretrain: Improved finetuning of zero-shot vision models
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
and 54 more not named here
convert_to_custom_text_state_dict 49 other papers
8 dated earlier, 41 later
2103.00020 (2021-03)
Learning Transferable Visual Models From Natural Language Supervision
2210.08402 (2022-10)
LAION-5B: An open large-scale dataset for training next generation image-text models
2212.07143 (2022-12)
Reproducible scaling laws for contrastive language-image learning
and 46 more not named here
register_pooler 45 other papers
5 dated earlier, 40 later
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2302.03668 (2023-02)
Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
and 42 more not named here
build_model_from_openai_state_dict 30 other papers
6 dated earlier, 24 later
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2302.03668 (2023-02)
Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
and 27 more not named here
get_model_config 22 other papers
4 dated earlier, 18 later
2211.07636 (2022-11)
EVA: Exploring the Limits of Masked Visual Representation Learning at Scale
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
and 19 more not named here
load_state_dict 18 other papers
4 dated earlier, 14 later
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2303.07240 (2023-03)
PMC-CLIP: Contrastive Language-Image Pre-training using Biomedical Documents
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
and 15 more not named here
list_pretrained 6 other papers
1 dated earlier, 5 later
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2311.17048 (2023-11)
Zero-shot Referring Expression Comprehension via Structural Similarity Between Images and Captions
2404.05231 (2024-04)
PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection
and 3 more not named here
list_pretrained_tags_by_model 4 other papers
1 dated earlier, 3 later
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2309.03904 (2023-09)
Exploring Sparse MoE in GANs for Text-conditioned Image Synthesis
2404.05231 (2024-04)
PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection
and 1 more not named here
load_openai_model 4 other papers
1 dated earlier, 3 later
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2310.18961 (2023-10)
AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detection
2404.05231 (2024-04)
PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection
and 1 more not named here
get_tokenizer 1 other paper
1 later
2501.01790 (2025-01)
Ingredients: Blending Custom Photos with Video Diffusion Transformers
image_transform 1 other paper
1 later
2311.17048 (2023-11)
Zero-shot Referring Expression Comprehension via Structural Similarity Between Images and Captions

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Contrastive Language-Image Pre-training (CLIP) has become a promising language-supervised visual pre-training framework. This paper aims to distill small CLIP models supervised by a large teacher CLIP model. We propose several distillation strategies, including relation, feature, gradient and contrastive paradigms, to examine the effectiveness of CLIP-Knowledge Distillation (KD). We show that a simple feature mimicry with Mean Squared Error loss works surprisingly well. Moreover, interactive contrastive learning across teacher and student encoders is also effective in performance improvement. We explain that the success of CLIP-KD can be attributed to maximizing the feature similarity between teacher and student. The unified method is applied to distill several student models trained on CC3M+12M. CLIP-KD improves student CLIP models consistently over zero-shot ImageNet classification and cross-modal retrieval benchmarks. When using ViT-L/14 pretrained on Laion-400M as the teacher, CLIP-KD achieves 57.5\% and 55.4\% zero-shot top-1 ImageNet accuracy over ViT-B/16 and ResNet-50, surpassing the original CLIP without KD by 20.5\% and 20.1\% margins, respectively. Our code is released on https://github.com/winycg/CLIP-KD.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2307.12732")
get_code_for_paper("2307.12732")
have("2307.12732")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2307.12732.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2307.12732.svg)](https://syntology.ai/paper/2307.12732)

Connect an agent — have() is free.