{"id":19156337,"url":"https://github.com/kyegomez/mhmoe","last_synced_at":"2025-05-07T07:42:36.626Z","repository":{"id":236385966,"uuid":"792508074","full_name":"kyegomez/MHMoE","owner":"kyegomez","description":"Community Implementation of the paper: \"Multi-Head Mixture-of-Experts\" In PyTorch","archived":false,"fork":false,"pushed_at":"2025-04-06T12:54:56.000Z","size":2264,"stargazers_count":24,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T20:17:00.146Z","etag":null,"topics":["ai","artificial-intelligence","attention","chicken","machine-learning","ml","moe","transformers"],"latest_commit_sha":null,"homepage":"https://discord.gg/7VckQVxvKk","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-04-26T20:19:26.000Z","updated_at":"2025-04-07T15:17:26.000Z","dependencies_parsed_at":"2024-04-26T21:28:31.814Z","dependency_job_id":"baff57c9-8cdd-45ac-ba34-2ac0e7ba0c35","html_url":"https://github.com/kyegomez/MHMoE","commit_stats":null,"previous_names":["kyegomez/mhmoe"],"tags_count":0,"template":false,"template_full_name":"kyegomez/Python-Package-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FMHMoE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FMHMoE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FMHMoE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FMHMoE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyegomez","download_url":"https://codeload.github.com/kyegomez/MHMoE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252836854,"owners_count":21811791,"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","attention","chicken","machine-learning","ml","moe","transformers"],"created_at":"2024-11-09T08:34:08.398Z","updated_at":"2025-05-07T07:42:36.599Z","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# Multi-Head Mixture of Experts (MHMoE)\n\nMH-MoE to collectively attend to information from various representation\nspaces within different experts to deepen context understanding while significantly enhancing expert activation. \n\n## install\n`pip3 install mh-moe`\n\n\n## usage\n```python\nimport torch\nfrom mh_moe.main import MHMoE\n\n# Define model parameters\ndim = 512\nheads = 8\nnum_experts = 4\nnum_layers = 3\n\n# Create MHMoE model instance\nmodel = MHMoE(dim, heads, num_experts, num_layers)\n\n# Generate dummy input\nbatch_size = 10\nseq_length = 20\ndummy_input = torch.rand(batch_size, seq_length, dim)\ndummy_mask = torch.ones(batch_size, seq_length)  # Example mask\n\n# Forward pass through the model\noutput = model(dummy_input, dummy_mask)\n\n# Print output and its shape\nprint(output)\nprint(output.shape)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Fmhmoe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyegomez%2Fmhmoe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Fmhmoe/lists"}