{"id":19156178,"url":"https://github.com/kyegomez/limoe","last_synced_at":"2025-07-14T12:34:46.007Z","repository":{"id":222599120,"uuid":"757217194","full_name":"kyegomez/LIMoE","owner":"kyegomez","description":"Implementation of the \"the first large-scale multimodal mixture of experts models.\" from the paper: \"Multimodal Contrastive Learning with LIMoE: the Language-Image Mixture of Experts\"","archived":false,"fork":false,"pushed_at":"2025-04-06T12:52:54.000Z","size":2273,"stargazers_count":29,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-19T19:36:45.008Z","etag":null,"topics":["ai","artificial-intelligence","machine-learning","mixture-of-experts","ml","moe","pytorch","swarms","tensorflow"],"latest_commit_sha":null,"homepage":"https://discord.gg/47ENfJQjMq","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,"zenodo":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-02-14T03:03:49.000Z","updated_at":"2025-06-03T07:54:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"31b6c416-f223-450d-b7ad-4584ceaef1b0","html_url":"https://github.com/kyegomez/LIMoE","commit_stats":null,"previous_names":["kyegomez/limoe"],"tags_count":0,"template":false,"template_full_name":"kyegomez/Python-Package-Template","purl":"pkg:github/kyegomez/LIMoE","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLIMoE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLIMoE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLIMoE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLIMoE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyegomez","download_url":"https://codeload.github.com/kyegomez/LIMoE/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLIMoE/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265291752,"owners_count":23741913,"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","artificial-intelligence","machine-learning","mixture-of-experts","ml","moe","pytorch","swarms","tensorflow"],"created_at":"2024-11-09T08:33:30.708Z","updated_at":"2025-07-14T12:34:45.952Z","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# LiMoE\nImplementation of the \"the first large-scale multimodal mixture of experts models.\" from the paper: \"Multimodal Contrastive Learning with LIMoE: the Language-Image Mixture of Experts\". [CLICK HERE FOR THE PAPER LINK:](https://arxiv.org/abs/2206.02770)\n\n\n## install\n`pip install limoe`\n\n## usage\n```python\nimport torch\n\nfrom limoe.main import LiMoE\n\n# Text tokens (batch, sequence length)\ntext = torch.randint(0, 100, (1, 64))\n\n# image (batch, channels, height, width)\nimage = torch.randn(1, 3, 224, 224)\n\n# Create an instance of LiMoE with the specified parameters\nmodel = LiMoE(\n    dim=64,  # Dimension of the input and output tensors\n    depth=3,  # Number of layers in the encoder\n    heads=8,  # Number of attention heads\n    num_tokens=100,  # Number of tokens in the vocabulary\n    seq_length=64,  # Length of the input sequence\n    num_experts=4,  # Number of experts in the mixture-of-experts layer\n    dim_head=64,  # Dimension of each attention head\n    dropout=0.1,  # Dropout rate\n    ff_mult=4,  # Multiplier for the dimension of the feed-forward layer\n    patch_size=16,  # Patch size\n    image_size=224,  # Image size\n    channels=3,  # Number of image channels\n    dense_encoder_depth=5,\n)\n\n# Pass the input tensor through the model and print the output\nout = model(text, image)\n\n# Print\nprint(out)\n```\n\n# License\nMIT\n\n\n## Citation\n```bibtex\n@misc{mustafa2022multimodal,\n    title={Multimodal Contrastive Learning with LIMoE: the Language-Image Mixture of Experts}, \n    author={Basil Mustafa and Carlos Riquelme and Joan Puigcerver and Rodolphe Jenatton and Neil Houlsby},\n    year={2022},\n    eprint={2206.02770},\n    archivePrefix={arXiv},\n    primaryClass={cs.CV}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Flimoe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyegomez%2Flimoe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Flimoe/lists"}