Instructions to use Kashyap-K/self-evolving-nn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Kashyap-K/self-evolving-nn with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://Kashyap-K/self-evolving-nn") - Notebooks
- Google Colab
- Kaggle
| # 🧬 Self-Evolving Neural Network — 4524d43d | |
| Evolved locally with neuroevolution (genetic architecture search), then uploaded from this machine. | |
| ## Model | |
| - **Architecture**: gated MLP — top-3 features → layer 1, remaining features join every layer after | |
| - **Layers**: `192(swish), 96(selu), 32(swish), 192(linear), 256(relu), 64(sigmoid)` | |
| - **Params**: 102,216 | |
| - **Learning rate**: 0.005 · **Optimizer**: rmsprop · **Batch size**: 16 | |
| - **Top-3 feature gate**: [4, 9, 16] | |
| - **Fitness**: 331118.82 | |
| ## Evolution history | |
| - **Generations**: 18 | |
| - **Initial best fitness**: 37948.7707 | |
| - **Final best fitness**: 240545.7623 | |
| - **Improvement**: +533.9% | |
| ## Files | |
| | File | Description | | |
| |------|-------------| | |
| | `evo_checkpoints/best_model.keras` | Trained best model (Keras) | | |
| | `evo_checkpoints/best_genome.json` | Best architecture genome | | |
| | `evo_checkpoints/evolution_history.json` | Fitness across generations | | |
| | `self_evolving_model.py` | Core evolution engine | | |
| | `evo_gui.py` | Flask web dashboard | | |
| | `requirements.txt` | Dependencies | | |
| ## How to run | |
| ```bash | |
| pip install -r requirements.txt | |
| # Continue evolving from this state | |
| python3 self_evolving_model.py --continue --generations 50 | |
| # Or launch the web GUI | |
| python3 evo_gui.py --port 5000 | |
| ``` | |
| ## Scaling up (v2/v3 on GPU) | |
| ```bash | |
| python3 self_evolving_model.py --continue --max-units 512 --max-layers 8 --train-epochs 20 | |
| ``` | |
| See `evo_v2_colab.ipynb` for a ready-to-run Google Colab notebook. | |