{"id":31133051,"url":"https://github.com/savernish/forgenn","last_synced_at":"2025-10-08T22:10:56.288Z","repository":{"id":313520440,"uuid":"1051615078","full_name":"Savernish/forgeNN","owner":"Savernish","description":"forgeNN is a in-development purpose‑built neural network framework combining a transparent NumPy autograd engine with a Keras‑like API and performance oriented primitives. Developed by a college student with an ambitious feature pipeline.","archived":false,"fork":false,"pushed_at":"2025-09-19T20:14:05.000Z","size":4358,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-22T02:56:04.399Z","etag":null,"topics":["artificial-intelligence","deep-learning","keras","machine-learning","mlp-networks","neural-network","numpy","pytorch","tensorflow","tensors"],"latest_commit_sha":null,"homepage":"https://www.savern.me","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/Savernish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T11:18:03.000Z","updated_at":"2025-09-12T21:04:32.000Z","dependencies_parsed_at":"2025-09-06T17:32:21.541Z","dependency_job_id":"606550af-aedc-4157-af72-0224d3608969","html_url":"https://github.com/Savernish/forgeNN","commit_stats":null,"previous_names":["savernish/forgenn"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Savernish/forgeNN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savernish%2FforgeNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savernish%2FforgeNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savernish%2FforgeNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savernish%2FforgeNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Savernish","download_url":"https://codeload.github.com/Savernish/forgeNN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Savernish%2FforgeNN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000782,"owners_count":26082851,"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-10-08T02:00:06.501Z","response_time":56,"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","deep-learning","keras","machine-learning","mlp-networks","neural-network","numpy","pytorch","tensorflow","tensors"],"created_at":"2025-09-18T05:08:02.184Z","updated_at":"2025-10-08T22:10:56.282Z","avatar_url":"https://github.com/Savernish.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# forgeNN\n\n## Table of Contents\n\n- [Installation](#Installation)\n- [Overview](#Overview)\n- [Performance vs PyTorch](#Performance-vs-PyTorch)\n- [Quick Start](#Quick-Start)\n- [Complete Example](#Complete-Example)\n- [Roadmap](#Roadmap)\n- [Contributing](#Contributing)\n- [Acknowledgments](#Acknowledgments)\n\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n[![Stars](https://img.shields.io/github/stars/Savernish/forgeNN.svg?style=social\u0026label=Stars)](https://github.com/Savernish/forgeNN)\n[![NumPy](https://img.shields.io/badge/powered_by-NumPy-blue.svg)](https://numpy.org/)\n[![PyPI version](https://img.shields.io/pypi/v/forgeNN.svg)](https://pypi.org/project/forgeNN/)\n[![Downloads](https://img.shields.io/pypi/dm/forgeNN.svg)](https://pypi.org/project/forgeNN/)\n[![License](https://img.shields.io/pypi/l/forgeNN.svg)](https://pypi.org/project/forgeNN/)\n\n## Installation\n\n```bash\npip install forgeNN\n```\n\nOptional extras:\n\n```bash\n# ONNX helpers (scaffold)\npip install \"forgeNN[onnx]\"\n\n# CUDA backend (scaffold; requires compatible GPU/driver)\npip install \"forgeNN[cuda]\"\n```\n\n## Overview\n\n**forgeNN** is a modern neural network framework with an API built around a straightforward `Sequential` model, a fast NumPy autograd `Tensor`, and a Keras-like `compile/fit` training workflow.\n\nThis project is built and maintained by a single student developer. For background and portfolio/CV, see: https://savern.me\n\n### Key Features\n\n- **Fast NumPy core**: Vectorized operations with fused, stable math\n- **Dynamic Computation Graphs**: Automatic differentiation with gradient tracking\n- **Complete Neural Networks**: From simple neurons to complex architectures\n- **Production Loss Functions**: Cross-entropy, MSE with numerical stability\n - **Scaffolded Integrations**: Runtime device API for future CUDA; ONNX export/import stubs\n\n## Performance vs PyTorch\n\n**forgeNN is 3.52x faster than PyTorch on small models!**\n\n| Metric | PyTorch | forgeNN | Advantage |\n|--------|---------|---------|-----------|\n| Training Time (MNIST) | 64.72s | 30.84s | **2.10x faster** |\n| Test Accuracy | 97.30% | 97.37% | **+0.07% better** |\n| Small Models (\u003c109k params) | Baseline | **3.52x faster** | **Massive speedup** |\n\n📊 Comparison and detailed docs are being refreshed for v2; see examples/ for runnable demos.\n\n\n## Quick Start\n\n### Keras-like Training (compile/fit)\n\n```python\nmodel = fnn.Sequential([\n    fnn.Input((20,)),        # optional Input layer seeds summary \u0026 shapes\n    fnn.Dense(64) @ 'relu',\n    fnn.Dense(32) @ 'relu',\n    fnn.Dense(3)  @ 'linear'\n])\n\n# Optionally inspect architecture\nmodel.summary()              # or model.summary((20,)) if no Input layer\nopt = fnn.Adam(lr=1e-3)      # or other optimizers (adamw, sgd, etc)\ncompiled = fnn.compile(model,\n                    optimizer=opt,\n                    loss='cross_entropy',\n                    metrics=['accuracy'])\ncompiled.fit(X, y, epochs=10, batch_size=64)\nloss, metrics = compiled.evaluate(X, y)\n\n# Tip: `mse` auto-detects 1D integer class labels for (N,C) logits and one-hot encodes internally.\n# model.summary() can be called any time after construction if an Input layer or input_shape is provided.\n```\n\n\n\n## Complete Example\n\nSee `examples/` for full fledged demos\n\n## Links\n\n- **PyPI Package**: https://pypi.org/project/forgeNN/\n- **Documentation**: v2 guides coming soon; examples in `examples/`\n- **Issues**: GitHub Issues for bug reports and feature requests\n- **Portfolio/CV**: https://savern.me\n\n## Roadmap (post v2.0.0)\n\n- CUDA backend and device runtime\n  - Device abstraction for `Tensor` and layers\n  - Initial CUDA kernels (Conv, GEMM, elementwise) and CPU/CUDA parity tests\n  - Setup and troubleshooting guide\n\n- ONNX: export and import (full coverage for the core API)\n  - Export `Sequential` graphs with Conv/Pool/Flatten/Dense/LayerNorm/Dropout/activations\n  - Import linear and branched graphs where feasible; shape inference checks\n  - Round‑trip parity tests and examples\n\n- Model save and load\n  - Architecture JSON + weights (NPZ) format\n  - `state_dict`/`load_state_dict` compatibility helpers\n  - Versioning and minimal migration guidance\n\n- Transformer positional encodings\n  - Sinusoidal `PositionalEncoding` and learnable `PositionalEmbedding`\n  - Tiny encoder demo with text classification walkthrough\n\n- Performance and stability\n  - CPU optimizations for conv/pool paths, memory reuse, and fewer allocations\n  - Threading guidance (MKL/OpenBLAS), deterministic runs, and profiling notes\n\n- Documentation\n  - Practical guides for `Sequential`, `compile/fit`, model I/O, ONNX, and CUDA setup\n  - Design overview of autograd and execution model\n\n## Contributing\n\nI am not currently accepting contributions, but I'm always open to suggestions and feedback!\n\n## Acknowledgments\n\n- Inspired by educational automatic differentiation tutorials (micrograd)\n- Built for both learning and production use\n- Optimized with modern NumPy practices\n- **Available on PyPI**: `pip install forgeNN`\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavernish%2Fforgenn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsavernish%2Fforgenn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavernish%2Fforgenn/lists"}