{"id":15169594,"url":"https://github.com/kyegomez/gats","last_synced_at":"2025-10-25T17:30:33.437Z","repository":{"id":217887619,"uuid":"744839479","full_name":"kyegomez/GATS","owner":"kyegomez","description":"Implementation of GATS from the paper: \"GATS: Gather-Attend-Scatter\" in pytorch and zeta","archived":false,"fork":false,"pushed_at":"2024-11-11T09:31:31.000Z","size":2277,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-31T09:22:36.290Z","etag":null,"topics":["ai","attention","attention-is-all-you-need","attention-mechanism","gpt4","llama","ml","multi-modal","multi-modality","multimodal","open-source"],"latest_commit_sha":null,"homepage":"https://discord.gg/GYbXvDGevY","language":"Python","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/kyegomez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["kyegomez"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-01-18T05:31:34.000Z","updated_at":"2024-10-13T02:31:53.000Z","dependencies_parsed_at":"2024-06-12T17:22:40.207Z","dependency_job_id":"980297b2-56cc-4134-aa18-4ad820965715","html_url":"https://github.com/kyegomez/GATS","commit_stats":{"total_commits":14,"total_committers":3,"mean_commits":4.666666666666667,"dds":0.2142857142857143,"last_synced_commit":"c91c2359be526d364cd0adf63c6fe3a36318b565"},"previous_names":["kyegomez/gats"],"tags_count":0,"template":false,"template_full_name":"kyegomez/Python-Package-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FGATS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FGATS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FGATS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FGATS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyegomez","download_url":"https://codeload.github.com/kyegomez/GATS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238183607,"owners_count":19430154,"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","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":["ai","attention","attention-is-all-you-need","attention-mechanism","gpt4","llama","ml","multi-modal","multi-modality","multimodal","open-source"],"created_at":"2024-09-27T07:04:04.245Z","updated_at":"2025-10-25T17:30:28.115Z","avatar_url":"https://github.com/kyegomez.png","language":"Python","funding_links":["https://github.com/sponsors/kyegomez"],"categories":[],"sub_categories":[],"readme":"[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)\n\n# GATS\nImplementation of GATS from the paper: \"GATS: Gather-Attend-Scatter\" in pytorch and zeta.\n\n\n## Install\n`pip install gats-torch`\n\n## Usage\n```python\nimport torch \nfrom gats_torch import GATSBlock\n\n# Create a GATSBlock model with the following configuration:\n# - Input dimension: 512\n# - Number of attention heads: 8\n# - Dimension of each attention head: 64\n# - Dropout rate: 0.1\n# - Window size: 512\n# - Causal attention: True\n# - Number of tokens to look backward: 1\n# - Number of tokens to look forward: 0\n# - Sequence length: 512 * 2\nmodel = GATSBlock(\n    dim=512,\n    heads=8,\n    dim_head=64,\n    dropout=0.1,\n    window_size=512,\n    causal=True,\n    look_backward=1,\n    look_forward=0,\n    seqlen=512 * 2,\n)\n\n# Create input tensors for different modalities\ntext = torch.randn(1, 1024, 512)  # Text input tensor\nimg = torch.randn(1, 3, 224, 224)  # Image input tensor\naudio = torch.randn(1, 100)  # Audio input tensor\nvideo = torch.randn(1, 3, 16, 224, 224)  # Video input tensor\nmask = torch.ones(1, 2057).bool()  # Mask tensor for attention\n\n# Pass the input tensors through the GATSBlock model\nout = model(text, img, audio, video, mask=mask)\n\n# Print the output\nprint(out)\n\n\n```\n\n\n# Citation\n```bibtex\n@misc{zolna2024gats,\n    title={GATS: Gather-Attend-Scatter}, \n    author={Konrad Zolna and Serkan Cabi and Yutian Chen and Eric Lau and Claudio Fantacci and Jurgis Pasukonis and Jost Tobias Springenberg and Sergio Gomez Colmenarejo},\n    year={2024},\n    eprint={2401.08525},\n    archivePrefix={arXiv},\n    primaryClass={cs.AI}\n}\n```\n\n# License\nMIT\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Fgats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyegomez%2Fgats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Fgats/lists"}