{"id":14958177,"url":"https://github.com/udbhavprasad072300/transformer-implementations","last_synced_at":"2025-10-10T17:32:37.826Z","repository":{"id":43509069,"uuid":"319225623","full_name":"UdbhavPrasad072300/Transformer-Implementations","owner":"UdbhavPrasad072300","description":"Library - Vanilla, ViT, DeiT, BERT, GPT","archived":false,"fork":false,"pushed_at":"2021-09-30T22:25:00.000Z","size":3454,"stargazers_count":67,"open_issues_count":3,"forks_count":18,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-25T15:53:20.230Z","etag":null,"topics":["pytorch","transformer-implementations","transformers","vision-transformers"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UdbhavPrasad072300.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-07T06:31:26.000Z","updated_at":"2025-08-07T12:25:53.000Z","dependencies_parsed_at":"2022-09-21T03:24:01.241Z","dependency_job_id":null,"html_url":"https://github.com/UdbhavPrasad072300/Transformer-Implementations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UdbhavPrasad072300/Transformer-Implementations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdbhavPrasad072300%2FTransformer-Implementations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdbhavPrasad072300%2FTransformer-Implementations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdbhavPrasad072300%2FTransformer-Implementations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdbhavPrasad072300%2FTransformer-Implementations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UdbhavPrasad072300","download_url":"https://codeload.github.com/UdbhavPrasad072300/Transformer-Implementations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdbhavPrasad072300%2FTransformer-Implementations/sbom","scorecard":{"id":145602,"data":{"date":"2025-08-11","repo":{"name":"github.com/UdbhavPrasad072300/Transformer-Implementations","commit":"a93db25193acaa565cabb2f68d81f4a7b7113aa5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: GHSA-3749-ghw9-m3mg","Warn: Project is vulnerable to: PYSEC-2022-43015 / GHSA-47fc-vmwq-366v","Warn: Project is vulnerable to: PYSEC-2025-41 / GHSA-53q9-r3pm-6pq6","Warn: Project is vulnerable to: PYSEC-2024-252 / GHSA-5pcm-hx3q-hm94","Warn: Project is vulnerable to: GHSA-887c-mr87-cxwp","Warn: Project is vulnerable to: PYSEC-2024-251 / GHSA-pg7h-5qx3-wjr3","Warn: Project is vulnerable to: PYSEC-2024-250","Warn: Project is vulnerable to: PYSEC-2024-259"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T09:20:42.012Z","repository_id":43509069,"created_at":"2025-08-16T09:20:42.013Z","updated_at":"2025-08-16T09:20:42.013Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004821,"owners_count":26083784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["pytorch","transformer-implementations","transformers","vision-transformers"],"created_at":"2024-09-24T13:16:25.387Z","updated_at":"2025-10-10T17:32:37.799Z","avatar_url":"https://github.com/UdbhavPrasad072300.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transformer Implementations\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/UdbhavPrasad072300/Transformer-Implementations/blob/main/LICENSE\"\u003e\n        \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/UdbhavPrasad072300/Transformer-Implementations\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/transformer-implementations/\"\u003e\n        \u003cimg alt=\"PyPi Version\" src=\"https://img.shields.io/pypi/v/transformer-implementations\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/transformer-implementations/\"\u003e\n        \u003cimg alt=\"PyPi Downloads\" src=\"https://img.shields.io/pypi/dm/transformer-implementations\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/transformer-implementations/\"\u003e\n        \u003cimg alt=\"Package Status\" src=\"https://img.shields.io/pypi/status/transformer-implementations\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nTransformer Implementations and some examples with them\n\nImplemented:\n\u003cul\u003e\n  \u003cli\u003eVanilla Transformer\u003c/li\u003e\n  \u003cli\u003eViT - Vision Transformers\u003c/li\u003e\n  \u003cli\u003eDeiT - Data efficient image Transformers\u003c/li\u003e\n  \u003cli\u003eBERT - Bidirectional Encoder Representations from Transformers\u003c/li\u003e\n  \u003cli\u003eGPT - Generative Pre-trained Transformer\u003c/li\u003e\n\u003c/ul\u003e\n\n## Installation\n\n\u003ca href=\"https://pypi.org/project/transformer-implementations/\"\u003ePyPi\u003c/a\u003e\n\n```bash\n$ pip install transformer-implementations\n```\n\nor\n\n```bash\npython setup.py build\npython setup.py install\n```\n\n## Example\n\nIn \u003ca href=\"https://github.com/UdbhavPrasad072300/Transformer-Implementations/blob/main/notebooks/\"\u003enotebooks\u003c/a\u003e directory there is a notebook on how to use each of these models for their intented use; such as image classification for Vision Transformer (ViT) and others.\nCheck them out!\n\n```python\nfrom transformer_package.models import ViT\n\nimage_size = 28 # Model Parameters\nchannel_size = 1\npatch_size = 7\nembed_size = 512\nnum_heads = 8\nclasses = 10\nnum_layers = 3\nhidden_size = 256\ndropout = 0.2\n\nmodel = ViT(image_size, \n            channel_size, \n            patch_size, \n            embed_size, \n            num_heads, \n            classes, \n            num_layers, \n            hidden_size, \n            dropout=dropout).to(DEVICE)\n            \nprediction = model(image_tensor)\n```\n\n## Language Translation\n\nfrom \"Attention is All You Need\": https://arxiv.org/pdf/1706.03762.pdf\n\nModels trained with Implementation:\n\u003cul\u003e\n  \u003cli\u003e\u003ca href=\"https://github.com/UdbhavPrasad072300/Transformer-Implementations/blob/main/notebooks/Multi30k%20-%20Language%20Translation.ipynb\"\u003eMulti30k - German to English\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n## Multi-class Image Classification with Vision Transformers (ViT)\n\nfrom \"An Image is Worth 16x16 words: Transformers for image recognition at scale\": https://arxiv.org/pdf/2010.11929v1.pdf\n\nModels trained with Implementation:\n\u003cul\u003e\n \u003cli\u003e\u003ca href=\"https://github.com/UdbhavPrasad072300/Transformer-Implementations/blob/main/notebooks/MNIST%20Classification%20-%20ViT.ipynb\"\u003eMNIST - Grayscale Images\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://github.com/UdbhavPrasad072300/Transformer-Implementations/blob/main/notebooks/CIFAR10%20Classification%20-%20ViT.ipynb\"\u003eCIFAR10 - MultiChannel Images\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\nNote: ViT will not perform great on small datasets\n\n## Multi-class Image Classification with Data-efficient image Transformers (DeiT)\n\nfrom \"Training data-efficient image transformers \u0026 distillation through attention\": https://arxiv.org/pdf/2012.12877v1.pdf\n\nModels trained with Implementation:\n\u003cul\u003e\n \u003cli\u003e\u003ca href=\"https://github.com/UdbhavPrasad072300/Transformer-Implementations/blob/main/pre-train/VGG16_CIFAR10.ipynb\"\u003ePretraining Teacher model for Distillation\u003c/a\u003e\u003c/li\u003e\n \u003cli\u003e\u003ca href=\"https://github.com/UdbhavPrasad072300/Transformer-Implementations/blob/main/notebooks/CIFAR10%20Classification%20-%20DeiT.ipynb\"\u003eCIFAR10 - Low Res Images\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudbhavprasad072300%2Ftransformer-implementations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fudbhavprasad072300%2Ftransformer-implementations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudbhavprasad072300%2Ftransformer-implementations/lists"}