{"id":22820051,"url":"https://github.com/agora-lab-ai/star","last_synced_at":"2025-07-01T10:04:37.625Z","repository":{"id":266325333,"uuid":"898039474","full_name":"Agora-Lab-AI/STAR","owner":"Agora-Lab-AI","description":"Implementation of the paper from Liquid AI","archived":false,"fork":false,"pushed_at":"2025-04-11T12:57:51.000Z","size":2269,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T01:35:55.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Agora-Lab-AI.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-12-03T17:18:26.000Z","updated_at":"2025-04-04T09:02:00.000Z","dependencies_parsed_at":"2024-12-03T18:27:30.053Z","dependency_job_id":"58605227-71d7-4a7f-be5d-7d16f2901666","html_url":"https://github.com/Agora-Lab-AI/STAR","commit_stats":null,"previous_names":["agora-lab-ai/star"],"tags_count":0,"template":false,"template_full_name":"kyegomez/Python-Package-Template","purl":"pkg:github/Agora-Lab-AI/STAR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FSTAR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FSTAR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FSTAR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FSTAR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agora-Lab-AI","download_url":"https://codeload.github.com/Agora-Lab-AI/STAR/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FSTAR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262941542,"owners_count":23388148,"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":[],"created_at":"2024-12-12T15:16:04.414Z","updated_at":"2025-07-01T10:04:37.582Z","avatar_url":"https://github.com/Agora-Lab-AI.png","language":"Python","funding_links":["https://github.com/sponsors/kyegomez"],"categories":[],"sub_categories":[],"readme":"\n\n\n# STAR: Structured Token-mixing Adaptive Residual Networks\n\n\n[![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](https://discord.gg/agora-999382051935506503) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge\u0026logo=youtube\u0026logoColor=white)](https://www.youtube.com/@kyegomez3242) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/kye-g-38759a207/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge\u0026logo=x\u0026logoColor=white)](https://x.com/kyegomezb)\n\n\nSTAR is a novel neural network architecture that implements Linear Input-Varying (LIV) operators with structured token mixing patterns. This architecture provides an efficient approach to sequence modeling by combining different mixing structures with adaptive residual connections.\n\n## Key Features\n\n- Flexible token mixing structures (Diagonal, Low-Rank, Scaled-Toeplitz, Sequential Semi-Separable)\n- Configurable channel mixing patterns (Diagonal, Dense, Grouped)\n- Feature sharing mechanisms for improved efficiency\n- Adaptive residual connections with pre-norm architecture\n- Genome-based architecture specification\n\n## Installation\n\n```bash\npip install star-backbone\n```\n\n## Quick Start\n\n```python\nfrom star import STARBackbone, LIVConfig, TokenMixingStructure, ChannelMixingStructure\n\n# Configure model\ndim = 512\ndepth = 24\n\n# Define genome\ngenome = [\n    [1, 1, 1, 1, 1],  # SA-1\n    [9, 1, 1, 1, 1],  # GMemless\n    [1, 2, 1, 2, 1],  # SA-1 with sharing\n]\n\n# Configure operators\nconfigs = {\n    1: LIVConfig(\n        featurizer_class=1,\n        token_mixing=TokenMixingStructure.LOW_RANK,\n        sparsity_mask=False,\n        nonlinearity=\"softmax\",\n        channel_mixing=ChannelMixingStructure.GROUPED\n    ),\n    9: LIVConfig(\n        featurizer_class=9,\n        token_mixing=TokenMixingStructure.DIAGONAL,\n        sparsity_mask=False,\n        nonlinearity=\"silu\",\n        channel_mixing=ChannelMixingStructure.DENSE\n    )\n}\n\n# Create model\nmodel = STARBackbone(dim, depth, genome, configs)\n```\n\n## Architecture Details\n\n### LIV Operators\n\nThe core building blocks are Linear Input-Varying (LIV) operators that combine:\n- Token mixing structures for sequence interaction\n- Channel mixing patterns for feature transformation\n- Nonlinear activations\n- Optional sparsity masks\n\n### Token Mixing Structures\n\n- **DIAGONAL**: Element-wise scaling\n- **LOW_RANK**: Attention-like mechanisms with Q/K/V projections\n- **SCALED_TOEPLITZ**: Convolution-based local mixing\n- **SEQUENTIAL_SEMI_SEPARABLE**: Recurrent processing with gating\n\n### Channel Mixing Types\n\n- **DIAGONAL**: Independent channel scaling\n- **DENSE**: Full channel interaction\n- **GROUPED**: Group-wise channel mixing\n\n## Genome Specification\n\nEach layer is specified by a 5-integer sequence:\n1. LIV operator class ID\n2. Featurizer sharing group\n3. Reserved\n4. Feature sharing group  \n5. Reserved\n\n## Configuration\n\nThe `LIVConfig` dataclass specifies:\n- `featurizer_class`: Integer ID for featurizer type\n- `token_mixing`: TokenMixingStructure enum value\n- `channel_mixing`: ChannelMixingStructure enum value\n- `sparsity_mask`: Boolean for optional sparsity\n- `nonlinearity`: Optional activation function name\n- `expansion_factor`: Channel expansion multiplier\n- `repeat_factor`: Feature repeat factor\n\n## Contributing\n\n1. Fork the repository\n2. Create feature branch (`git checkout -b feature/name`)\n3. Commit changes (`git commit -am 'Add feature'`)\n4. Push branch (`git push origin feature/name`)\n5. Open Pull Request\n\n## License\n\nMIT License. See LICENSE file for details.\n\n## Citation\n\nIf you use STAR in your research, please cite:\n\n```bibtex\n@article{star2024,\n  title={STAR: Structured Token-mixing Adaptive Residual Networks},\n  author={[Authors]},\n  journal={[Journal]},\n  year={2024}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagora-lab-ai%2Fstar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagora-lab-ai%2Fstar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagora-lab-ai%2Fstar/lists"}