{"id":42036340,"url":"https://github.com/git-disl/recap","last_synced_at":"2026-01-26T05:07:37.849Z","repository":{"id":252698471,"uuid":"818004864","full_name":"git-disl/recap","owner":"git-disl","description":"Code for CVPR24 Paper - Resource-Efficient Transformer Pruning for Finetuning of Large Models","archived":false,"fork":false,"pushed_at":"2025-10-31T18:28:05.000Z","size":47,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-31T20:24:38.953Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/git-disl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-20T22:39:59.000Z","updated_at":"2025-10-31T18:28:10.000Z","dependencies_parsed_at":"2024-08-11T21:53:21.045Z","dependency_job_id":"57a21324-a18b-44db-8f4a-cfedd453780f","html_url":"https://github.com/git-disl/recap","commit_stats":null,"previous_names":["git-disl/recap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/git-disl/recap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-disl%2Frecap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-disl%2Frecap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-disl%2Frecap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-disl%2Frecap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-disl","download_url":"https://codeload.github.com/git-disl/recap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-disl%2Frecap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28767032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-26T05:07:37.205Z","updated_at":"2026-01-26T05:07:37.828Z","avatar_url":"https://github.com/git-disl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CVPR24 Paper\n\nCode for CVPR24 Paper - Resource-Efficient Transformer Pruning for Finetuning of Large Models\n\nFatih Ilhan, Gong Su, Selim Furkan Tekin, Tiansheng Huang, Sihao Hu, and Ling Liu, \"Resource-Efficient Transformer Pruning for Finetuning of Large Models,\" IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, USA, Jun. 17-21, 2024.\n\n## Setup\n\nPython 3.10\n\nPytorch 2.0.1\n\nTransformers 4.33\n\nhttps://github.com/microsoft/nni\n\nPlease check requirements.txt for the list of other packages.\n\n## Usage\n\nCIFAR, TinyImageNet, GLUE datasets are automatically downloaded. You can download Cityscapes from https://www.cityscapes-dataset.com/ and KITTI from https://www.cvlibs.net/datasets/kitti/eval_semseg.php?benchmark=semantics2015.\n\n### General usage for finetuning with RECAP:\n```python main.py --task \u003cTASK\u003e --data \u003cDATASET\u003e --arch \u003cMODEL\u003e --init_sparse \u003cr_p\u003e --iter_sparse -\u003cr_f\u003e -num_pi \u003cN_p\u003e -num_pr \u003cNUM_RECAP_ITERATIONS\u003e```\n\n### Example: Finetune ViT-base at CIFAR100 with 33% pruning and 87.5% masking in 10 iterations:\n```python main.py --task img_class --data cifar100 --arch vit-base --init_sparse 0.33 --iter_sparse -0.875 -num_pi 2 -num_pr 10```\n\n### Example: Finetune Mask2Former at Cityscapes with 50% pruning and 50% masking in 20 iterations:\n```python main.py --task img_seg --data cityscapes --arch m2f --init_sparse 0.5 --iter_sparse -0.5 -num_pi 3 -num_pr 20```\n\n### Example: Finetune BERT-base at CoLA with 17% pruning and 50% masking in 5 iterations:\n```python main.py --task glue --data cola --arch bert-base-uncased --init_sparse 0.17 --iter_sparse -0.5 -num_pi 1 -num_pr 5```\n\n### Parameters\n\nAll pruning/finetuning parameters are controlled from ``config.py``.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-disl%2Frecap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-disl%2Frecap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-disl%2Frecap/lists"}