{"id":19156225,"url":"https://github.com/kyegomez/simplemamba","last_synced_at":"2025-10-27T11:17:40.671Z","repository":{"id":212629639,"uuid":"731965902","full_name":"kyegomez/SimpleMamba","owner":"kyegomez","description":"Implementation of a modular, high-performance, and simplistic mamba for high-speed applications","archived":false,"fork":false,"pushed_at":"2024-11-11T11:22:50.000Z","size":2270,"stargazers_count":36,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-26T06:55:05.463Z","etag":null,"topics":["artificial-intelligence","gpt","gpt4","gpt4all","machine","neural-network","open-source","pytorch","rnn","rnn-pytorch","rnns","ssm","tensorflow","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},"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":"2023-12-15T09:59:12.000Z","updated_at":"2025-07-11T13:23:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"e1ea5684-ee00-446e-9207-a1a2b0647ea0","html_url":"https://github.com/kyegomez/SimpleMamba","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.09999999999999998,"last_synced_commit":"814a6af8e0985c3a142bdd7391855b9e6b0a2938"},"previous_names":["kyegomez/simplemamba"],"tags_count":0,"template":false,"template_full_name":"kyegomez/Python-Package-Template","purl":"pkg:github/kyegomez/SimpleMamba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FSimpleMamba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FSimpleMamba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FSimpleMamba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FSimpleMamba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyegomez","download_url":"https://codeload.github.com/kyegomez/SimpleMamba/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FSimpleMamba/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273886161,"owners_count":25185504,"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-09-06T02:00:13.247Z","response_time":2576,"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":["artificial-intelligence","gpt","gpt4","gpt4all","machine","neural-network","open-source","pytorch","rnn","rnn-pytorch","rnns","ssm","tensorflow","transformers"],"created_at":"2024-11-09T08:33:40.031Z","updated_at":"2025-10-27T11:17:40.590Z","avatar_url":"https://github.com/kyegomez.png","language":"Python","readme":"[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)\n\n# Simple Mamba\n\n## Install\n`pip install simple-mamba`\n\n\n## Usage\n```python\nimport torch\nfrom simple_mamba import MambaBlock\n\n\n# Define block parameters\ndim = 512\nhidden_dim = 128\nheads = 8\nin_channels = 3\nout_channels = 3\nkernel_size = 3\n\n# Create an instance of MambaBlock\nmamba_block = MambaBlock(\n    dim, hidden_dim, heads, in_channels, out_channels, kernel_size\n)\n\n# Create a sample input tensor\nx = torch.randn(1, dim, dim)\n\n# Pass the tensor through the MambaBlock\noutput = mamba_block(x)\nprint(\"Output shape:\", output.shape)\n\n\n```\n\n### `SSM`\n```python\nimport torch \nfrom simple_mamba import SSM\n\n\n# # Example usage\nvocab_size = 10000  # Example vocabulary size\nembed_dim = 256  # Example embedding dimension\nstate_dim = 512  # State dimension\nnum_layers = 2  # Number of state-space layers\n\nmodel = SSM(vocab_size, embed_dim, state_dim, num_layers)\n\n# Example input (sequence of word indices)\ninput_seq = torch.randint(\n     0, vocab_size, (32, 10)\n )  # Batch size of 32, sequence length of 10\n\n # Forward pass\nlogits = model(input_seq)\nprint(logits.shape)  # Should be [32, 10, vocab_size]\n\n```\n\n\n# License\nMIT\n\n\n# Citation\n```bibtex\n@misc{gu2023mamba,\n    title={Mamba: Linear-Time Sequence Modeling with Selective State Spaces}, \n    author={Albert Gu and Tri Dao},\n    year={2023},\n    eprint={2312.00752},\n    archivePrefix={arXiv},\n    primaryClass={cs.LG}\n}\n\n```","funding_links":["https://github.com/sponsors/kyegomez"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Fsimplemamba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyegomez%2Fsimplemamba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Fsimplemamba/lists"}