SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.07648 · ICCV · 2023

Prompt Switch: Efficient CLIP Adaptation for Text-Video Retrieval

Qi Wu, Qi Chen, Chaorui Deng, Pengda Qin, Da Chen

arXiv · PDF · Open in the Atlas

Code that ran

4 of 16 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, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 12 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/2308.07648.json · badge: /api/ran/2308.07648.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
bladewaltz1/promptswitch marked official in Papers with Code
Papers with Code archive
4 ran · 12 no recorded run
FunctionStatusWhere it lives
CLIPEncoderLayer Ran
ran on a synthesized input
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("6b5c6a4c5fe3629a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPTextEmbeddings Ran
ran on a synthesized input
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("7afff4a1c7789597")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPVisionEmbeddings Ran
ran on a synthesized input
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("97b7de8e8d588a6e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

_expand_mask Ran
ran; our contract draft was wrong, not the code
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("749dd08d5d7409f2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

BaselinePooling Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("6b28b5c3f3f4e210")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPAttention Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("4c0e317bbad36a96")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPEncoder Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("4521a46931a2dd05")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPEncoderLayerPT Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("072dd8bae2230fa6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPEncoderPT Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("01439931fe5d4f12")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPModel Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("90804502b77c9f49")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPTextTransformer Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("be95c1088bdc81ad")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

CLIPVisionTransformer Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("925873e2ceea0336")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

Config Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("e28877d426856a6f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

MultiHeadedAttention Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("90011c4f1d727ebe")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

PromptCLIP Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("87939011e0a0b2dd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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.

Transformer Not yet run
unverified (harvested, no recorded run)
bladewaltz1/promptswitch/model/prompt_clip.py
pointer only (licence: NONE) · get_code("3654adee70b77587")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bladewaltz1/promptswitch 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 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 later) and 13 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
_expand_mask
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later
1910.13461 (2019-10)
BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
2210.00312 (2022-10)
Multimodal Analogical Reasoning over Knowledge Graphs
2506.13366 (2025-06)
Enhancing Goal-oriented Proactive Dialogue Systems via Consistency Reflection and Correction
CLIPEncoder
brick of this paper's assembly: helper
1 other paper
1 later
2403.20231 (2024-03)
U-VAP: User-specified Visual Appearance Personalization via Decoupled Self Augmentation
CLIPTextEmbeddings
brick of this paper's assembly: helper
1 other paper
1 later
2403.20231 (2024-03)
U-VAP: User-specified Visual Appearance Personalization via Decoupled Self Augmentation

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

In text-video retrieval, recent works have benefited from the powerful learning capabilities of pre-trained text-image foundation models (e.g., CLIP) by adapting them to the video domain. A critical problem for them is how to effectively capture the rich semantics inside the video using the image encoder of CLIP. To tackle this, state-ofthe-art methods adopt complex cross-modal modeling techniques to fuse the text information into video frame representations, which, however, incurs severe efficiency issues in large-scale retrieval systems as the video representations must be recomputed online for every text query. In this paper, we discard this problematic cross-modal fusion process and aim to learn semantically-enhanced representations purely from the video, so that the video representations can be computed offline and reused for different texts. Concretely, we first introduce a spatial-temporal "Prompt Cube" into the CLIP image encoder and iteratively switch it within the encoder layers to efficiently incorporate the global video semantics into frame representations. We then propose to apply an auxiliary video captioning objective to train the frame representations, which facilitates the learning of detailed video semantics by providing fine-grained guidance in the semantic space. With a naive temporal fusion strategy (i.e., mean-pooling) on the enhanced frame representations, we obtain state-of-the-art performances on three benchmark datasets, i.e., MSR-VTT, MSVD, and LSMDC.

For agents

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

get_harvested_code_for_paper("2308.07648")
get_code_for_paper("2308.07648")
have("2308.07648")

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

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

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

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

Connect an agent — have() is free.