{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/tip-adapter-training-free-adaption-of-clip","title":"Tip-Adapter: Training-free Adaption of CLIP for Few-shot Classification","arxiv_id":"2207.09519","date":"2022-07-19","proceeding":null,"authors":["Renrui Zhang","Zhang Wei","Rongyao Fang","Peng Gao","Kunchang Li","Jifeng Dai","Yu Qiao","Hongsheng Li"],"abstract":"Contrastive Vision-Language Pre-training, known as CLIP, has provided a new paradigm for learning visual representations using large-scale image-text pairs. It shows impressive performance on downstream tasks by zero-shot knowledge transfer. To further enhance CLIP's adaption capability, existing methods proposed to fine-tune additional learnable modules, which significantly improves the few-shot performance but introduces extra training time and computational resources. In this paper, we propose a training-free adaption method for CLIP to conduct few-shot classification, termed as Tip-Adapter, which not only inherits the training-free advantage of zero-shot CLIP but also performs comparably to those training-required approaches. Tip-Adapter constructs the adapter via a key-value cache model from the few-shot training set, and updates the prior knowledge encoded in CLIP by feature retrieval. On top of that, the performance of Tip-Adapter can be further boosted to be state-of-the-art on ImageNet by fine-tuning the cache model for 10$\\times$ fewer epochs than existing methods, which is both effective and efficient. We conduct extensive experiments of few-shot classification on 11 datasets to demonstrate the superiority of our proposed methods. Code is released at https://github.com/gaopengcuhk/Tip-Adapter.","url_abs":"https://arxiv.org/abs/2207.09519v1","url_pdf":"https://arxiv.org/pdf/2207.09519v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"tip-adapter-training-free-adaption-of-clip","repo_url":"https://github.com/gaopengcuhk/tip-adapter","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"tip-adapter-training-free-adaption-of-clip","repo_url":"https://github.com/ArsenalCheng/Meta-Adapter","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"tip-adapter-training-free-adaption-of-clip","repo_url":"https://github.com/opengvlab/cafo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"}],"methods":[{"method_slug":"adapter","method_name":"Adapter"},{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2207.09519","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.09519"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ArsenalCheng/Meta-Adapter","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gaopengcuhk/tip-adapter","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/opengvlab/cafo","reach":null}],"summary":{"ran_fixture":3},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":2,"ran":2,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":2,"samples":[{"code_sha256_prefix":"c9e27d8ece0c4f8d","entry":"build_cache_model","repo":"ArsenalCheng/Meta-Adapter","repo_kind":"listed","path":"clip/utils.py","file_url":"https://github.com/ArsenalCheng/Meta-Adapter/blob/HEAD/clip/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c9e27d8ece0c4f8d"}},{"code_sha256_prefix":"e57ad1054530e142","entry":"build_cache_model","repo":"gaopengcuhk/tip-adapter","repo_kind":"official","path":"utils.py","file_url":"https://github.com/gaopengcuhk/tip-adapter/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e57ad1054530e142"}},{"code_sha256_prefix":"c48d589ad9da7dec","entry":"build_clip_cache_model","repo":"opengvlab/cafo","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/opengvlab/cafo/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c48d589ad9da7dec"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}