{"id":25723451,"url":"https://github.com/beastbyteai/firefly","last_synced_at":"2025-08-30T17:41:18.920Z","repository":{"id":254725214,"uuid":"847295397","full_name":"BeastByteAI/firefly","owner":"BeastByteAI","description":"A DIY Deep Learning Framework","archived":false,"fork":false,"pushed_at":"2024-08-25T16:27:10.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-08-25T17:37:03.922Z","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/BeastByteAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-08-25T12:20:24.000Z","updated_at":"2024-08-25T17:37:30.144Z","dependencies_parsed_at":"2024-08-25T17:37:30.053Z","dependency_job_id":"26525753-3472-4a31-ac56-6159621ef0b6","html_url":"https://github.com/BeastByteAI/firefly","commit_stats":null,"previous_names":["beastbyteai/firefly"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeastByteAI%2Ffirefly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeastByteAI%2Ffirefly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeastByteAI%2Ffirefly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeastByteAI%2Ffirefly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeastByteAI","download_url":"https://codeload.github.com/BeastByteAI/firefly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240743989,"owners_count":19850655,"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":"2025-02-25T20:35:46.247Z","updated_at":"2025-02-25T20:35:46.930Z","avatar_url":"https://github.com/BeastByteAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"logo\" src=\"https://gist.githubusercontent.com/OKUA1/55e2fb9dd55673ec05281e0247de6202/raw/d7d7ffd7f6b51ba3b314717ea133d31d26c943d2/firefly.svg\" height = \"250\"\u003e\n\u003c/div\u003e\n\n\n\u003ch4 align=\"center\"\u003eA DIY Deep Learning Framework\u003c/h4\u003e\n\n_FireFly_ is an educational project that aims to provide a simple and easy-to-understand implementation of a deep learning framework. While it is not intended to compete with bigger projects like TensorFlow or PyTorch, it is a great way to get a better intuition of how such frameworks work under the hood.\n\n## How does it work? \n\nYou can re-create the framework completely from scratch by following the [tutorials](https://github.com/BeastByteAI/firefly/tree/main/tutorials). The framework is built on top of NumPy and only takes a couple of hours to implement the first version (covered in `1_foundations` tutorial). At this point, it is already possible to train simple MLPs using a high-level API similar to PyTorch.\n\nIf you have any questions or need help, feel free to open an issue or reach out to us on [Discord](https://discord.com/invite/YDAbwuWK7V).\n\n## Contributing\n\nThere are many ways to contribute to FireFly:\n- Help us extend the framework by implementing new features;\n- Improve the existing codebase by fixing bugs or refactoring the code;\n- Expand the tutorials by adding new topics or improving the existing ones;\n- Help with the documentation;\n- Spread the word about FireFly by sharing it with your friends or on social media;\n- Provide feedback on how we can improve the project or what features you would like to see in the future.\n\nIn addition, you can support the project by simply starring ⭐ the repository on GitHub.\n\nFinally, we have several other projects that you might be interested in:\n\n\u003cbr\u003e\n\u003ca href=\"https://github.com/iryna-kondr/scikit-llm\"\u003e\n  \u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/skll_h_dark.svg\" \u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/skllm_h_light.svg\"\u003e\n  \u003cimg alt=\"Logo\" src=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/skll_h_dark.svg\" height = \"65\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e \u003cbr\u003e\u003cbr\u003e\n\u003ca href=\"https://github.com/OKUA1/agent_dingo\"\u003e\n  \u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/dingo_h_dark.svg\" \u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/ding_h_light.svg\"\u003e\n  \u003cimg alt=\"Logo\" src=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/dingo_h_dark.svg\" height = \"65\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e \u003cbr\u003e\u003cbr\u003e\n\u003ca href=\"https://github.com/OKUA1/falcon\"\u003e\n  \u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/falcon_h_dark.svg\" \u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/falcon_h_light.svg\"\u003e\n  \u003cimg alt=\"Logo\" src=\"https://gist.githubusercontent.com/OKUA1/ce2167df8e441ce34a9fbc8578b86543/raw/f740c391ec37eaf2f80d5b46f1fa2a989dd45932/dingo_h_dark.svg\" height = \"65\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n\n## FAQ \n\nQ: Why should I use FireFly instead of PyTorch or TensorFlow? \\\nA: FireFly is not intended to be a replacement of PyTorch or TensorFlow. It is an educational project, where you have the opportunity to implement the whole framework from scratch. \n\nQ: Can I use FireFly in production? \\\nA: At the moment, FireFly is very minimalistic and lacks many features. In the future we plan to make it more feature-rich, but we are not planning to actively optimize it for speed or memory usage.\n\nQ: Can I contribute to FireFly? \\\nA: Yes! We are always looking for contributors. Please see the section above.\n\nQ: Will I be able to follow the tutorials without any prior knowledge? \\\nA: The tutorials are designed to be beginner-friendly, but some basic knowledge is beneficial as we are not covering the theory too much. Please see the preface of `1_foundations` tutorial for more information. In addition, FireFly API is loosely similar to PyTorch, so if you have experience with PyTorch, you will find it easier to follow the tutorials.\n\nQ: Are there any docs available? \\\nA: At the moment there are no docs as you are expected to implement the framework yourself. However, we are planning to add docs in the future once the framework is more feature-rich.\n\nQ: Can you provide an example of how to use FireFly? \\\nA: Sure! Here is an example of how to train a simple MLP model using FireFly.\n```python\nfrom firefly.nn.module import Module\nfrom firefly.tensor import Tensor\nfrom firefly.nn.layers.linear import Linear\nfrom firefly.nn.optimizers.sgd import SGD\nimport numpy as np\n\nclass MLP(Module):\n    def __init__(self, input_size=10, hidden_size=32, output_size=1):\n        super().__init__()\n        self.fc1 = Linear(input_size, hidden_size)\n        self.fc2 = Linear(hidden_size, output_size)\n\n    def forward(self, x: Tensor) -\u003e Tensor:\n        y = self.fc1(x)\n        y = y.relu()\n        y = self.fc2(y)\n        return y\n\nX, y = Tensor(...), Tensor(...)\n\ndef loss_fn(y_pred, y_true):\n    ...\n\noptimizer = SGD(model.parameters(), lr=0.01)\n\nepochs = 10\nfor epoch in range(epochs):\n    optimizer.zero_grad()\n    outputs = model(X)\n    loss = loss_fn(outputs, y)\n    loss.backward()\n    optimizer.step()\n    print(f\"Epoch [{epoch+1}/{epochs}], Loss: {loss.to_numpy()}\")\n```\n\n## Citation\n\nYou can cite FireFly using the following BibTeX:\n\n```\n@software{FireFly,\n  author = {Oleh Kostromin and Iryna Kondrashchenko},\n  year = {2024},\n  publisher = {beastbyte.ai},\n  address = {Linz, Austria},\n  title = {FireFly: A DIY Deep Learning Framework},\n  url = {https://github.com/BeastByteAI/firefly }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeastbyteai%2Ffirefly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeastbyteai%2Ffirefly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeastbyteai%2Ffirefly/lists"}