| Name | nn-gpt JSON |
| Version |
1.0.4
JSON |
| download |
| home_page | None |
| Summary | LLM-Based Neural Network Generator |
| upload_time | 2025-10-27 20:19:58 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.10 |
| license | MIT License
Copyright (c) 2024- ABrain One and contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
| keywords |
neural network code generation
ai-assisted programming
machine learning
deep learning
python
large language models
automated code generation
neural network design
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
wheel
torch
nn-dataset
bitsandbytes
peft
gguf
trl
sentence-transformers
deepspeed
faiss-cpu
overrides
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# <img src='https://abrain.one/img/lemur-nn-icon-64x64.png' width='32px'/> GPT-Driven Neural Network Generator
<sub><a href='https://pypi.python.org/pypi/nn-gpt'><img src='https://img.shields.io/pypi/v/nn-gpt.svg'/></a> <a href="https://pepy.tech/project/nn-gpt"><img alt="GitHub release" src="https://static.pepy.tech/badge/nn-gpt"></a><br/>
short alias <a href='https://pypi.python.org/pypi/lmurg'>lmurg</a>
</sub>
<br/>
<img src='https://abrain.one/img/nngpt-logo-tr.png' width='25%'/>
<h3>📖 Overview</h3>
This Python-based <a href='https://github.com/ABrain-One/nn-gpt'>NNGPT</a> project leverages large language models (LLMs) to automate the creation of neural network architectures, streamlining the design process for machine learning practitioners. It leverages various neural networks from the <a href="https://github.com/ABrain-One/nn-dataset">LEMUR Dataset</a> to fine-tune LLMs and provide insights into potential architectures during the creation of new neural network models.
## Create and Activate a Virtual Environment (recommended)
For Linux/Mac:
```bash
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
```
For Windows:
```bash
python3 -m venv .venv
.venv\Scripts\activate
python -m pip install -- pip
```
It is assumed that CUDA 12.6 is installed; otherwise, consider replacing 'cu126' with the appropriate version. Most LLM usage scenarios require GPUs with at least 24 GB of memory.
## Installation of NNGPT with pip
```bash
pip install nn-gpt --extra-index-url https://download.pytorch.org/whl/cu126
pip install nn-gpt[flash] --no-build-isolation --extra-index-url https://download.pytorch.org/whl/cu126
```
## Environment for NNGPT Developers
### Pip package manager
Create a virtual environment, activate it, and run the following command to install all the project dependencies:
```bash
python -m pip install --upgrade pip
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu126
pip install -r req-no-isolation.txt --no-build-isolation --extra-index-url https://download.pytorch.org/whl/cu126
```
If there are installation problems, install the dependencies from the 'requirements.txt' file one by one.
## Update of NN Dataset
To get the latest code and statistics, install the most recent version of the LEMUR Dataset from GitHub:
```bash
rm -rf db
pip install --no-cache-dir git+https://github.com/ABrain-One/nn-dataset --upgrade --force --extra-index-url https://download.pytorch.org/whl/cu126
```
Installing the stable version:
```bash
pip install nn-dataset --upgrade --extra-index-url https://download.pytorch.org/whl/cu126
```
Adding functionality to export data to Excel files and generate plots for <a href='https://github.com/ABrain-One/nn-stat'>analyzing neural network performance</a>:
```bash
pip install nn-stat --upgrade --extra-index-url https://download.pytorch.org/whl/cu126
```
and export/generate:
```bash
python -m ab.stat.export
```
## Use
- **`ab.gpt.NNAlter*.py`** – Generates modified neural network models.
Use the `-e` argument to set the number of epochs for the initial CV model generation.
- **`ab.gpt.NNEval.py`** – Evaluates the models generated in the previous step.
- **`ab.gpt.TuneNNGen*.py`** – Performs fine-tuning and evaluation of an LLM. For evaluation purposes, the LLM generates neural network models, which are then trained to assess improvements in the LLM’s performance on this task. The -s flag allows skipping model generation for the specified number of epochs.
<a href='https://huggingface.co/ABrain'><strong>Pretrained LLM weights</strong></a>
### 🐳 Docker
All versions of this project are compatible with <a href='https://hub.docker.com/r/abrainone/ai-linux' target='_blank'>AI Linux</a> and can be seamlessly executed within the AI Linux Docker container.
Installing the latest version of the project from GitHub
```bash
docker run --rm -u $(id -u):ab -v $(pwd):/a/mm abrainone/ai-linux:llm bash -c "[ -d nn-gpt ] && git -C nn-gpt pull || git -c advice.detachedHead=false clone --depth 1 https://github.com/ABrain-One/nn-gpt"
```
Running script
```bash
docker run --rm -u $(id -u):ab --shm-size=16G -v $(pwd)/nn-gpt:/a/mm abrainone/ai-linux:llm bash -c "python -m ab.gpt.TuneNNGen_8B"
```
If recently added dependencies are missing in the <a href='https://hub.docker.com/r/abrainone/ai-linux' target='_blank'>AI Linux</a>, you can create a container from the Docker image ```abrainone/ai-linux:llm```, install the missing packages (preferably using ```pip install <package name>```), and then create a new image from the container using ```docker commit <container name> <new image name>```. You can use this new image locally or push it to the registry for deployment on the computer cluster.
## Citation
The original version of this project was created at the Computer Vision Laboratory of the University of Würzburg by the authors mentioned below. If you find this project to be useful for your research, please consider citing our articles for NNGPT framework and <a target='_blank' href='https://arxiv.org/pdf/2504.06006'>hyperparameter tuning</a>:
```bibtex
@InProceedings{ABrain.HPGPT,
title={Optuna vs Code Llama: Are LLMs a New Paradigm for Hyperparameter Tuning?},
author={Kochnev, Roman and Goodarzi, Arash Torabi and Bentyn, Zofia Antonina and Ignatov, Dmitry and Timofte, Radu},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops (ICCVW)},
year={2025}
}
@article{ABrain.NNGPT,
title = {NNGPT: Rethinking AutoML with Large Language Models},
author = {Kochnev, Roman and Khalid, Waleed and Uzun, Tolgay Atinc and Zhang, Xi and Dhameliya, Yashkumar Sanjaybhai and Qin, Furui and Ignatov, Dmitry and Timofte, Radu},
year = {2025}
}
```
## Licenses
This project is distributed under the following licensing terms:
<ul><li>models with pretrained weights under the legacy <a href="https://github.com/ABrain-One/nn-dataset/blob/main/Doc/Licenses/LICENSE-DEEPSEEK-LLM-V2">DeepSeek LLM V2</a> license</li>
<li> all neural network models and their weights not covered by the above licenses, as well as all other files and assets in this project, are subject to the <a href="LICENSE">MIT license</a></li>
</ul>
#### The idea and leadership of Dr. Ignatov
Raw data
{
"_id": null,
"home_page": null,
"name": "nn-gpt",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "neural network code generation, AI-assisted programming, machine learning, deep learning, Python, large language models, automated code generation, neural network design",
"author": null,
"author_email": "ABrain One and contributors <AI@ABrain.one>",
"download_url": "https://files.pythonhosted.org/packages/2b/19/4bfcb00c291881cb26d0485be1997174b583647843a6fc433c7592e51cb8/nn_gpt-1.0.4.tar.gz",
"platform": null,
"description": "# <img src='https://abrain.one/img/lemur-nn-icon-64x64.png' width='32px'/> GPT-Driven Neural Network Generator\n\n<sub><a href='https://pypi.python.org/pypi/nn-gpt'><img src='https://img.shields.io/pypi/v/nn-gpt.svg'/></a> <a href=\"https://pepy.tech/project/nn-gpt\"><img alt=\"GitHub release\" src=\"https://static.pepy.tech/badge/nn-gpt\"></a><br/>\nshort alias <a href='https://pypi.python.org/pypi/lmurg'>lmurg</a> \n</sub> \n<br/>\n<img src='https://abrain.one/img/nngpt-logo-tr.png' width='25%'/>\n<h3>\ud83d\udcd6 Overview</h3>\n\nThis Python-based <a href='https://github.com/ABrain-One/nn-gpt'>NNGPT</a> project leverages large language models (LLMs) to automate the creation of neural network architectures, streamlining the design process for machine learning practitioners. It leverages various neural networks from the <a href=\"https://github.com/ABrain-One/nn-dataset\">LEMUR Dataset</a> to fine-tune LLMs and provide insights into potential architectures during the creation of new neural network models.\n\n## Create and Activate a Virtual Environment (recommended)\nFor Linux/Mac:\n ```bash\n python3 -m venv .venv\n source .venv/bin/activate\n python -m pip install --upgrade pip\n ```\nFor Windows:\n ```bash\n python3 -m venv .venv\n .venv\\Scripts\\activate\n python -m pip install -- pip\n ```\n\nIt is assumed that CUDA 12.6 is installed; otherwise, consider replacing 'cu126' with the appropriate version. Most LLM usage scenarios require GPUs with at least 24 GB of memory.\n\n## Installation of NNGPT with pip\n\n```bash\n pip install nn-gpt --extra-index-url https://download.pytorch.org/whl/cu126\n pip install nn-gpt[flash] --no-build-isolation --extra-index-url https://download.pytorch.org/whl/cu126\n ```\n\n\n## Environment for NNGPT Developers\n### Pip package manager\n\nCreate a virtual environment, activate it, and run the following command to install all the project dependencies:\n```bash\npython -m pip install --upgrade pip\npip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu126\npip install -r req-no-isolation.txt --no-build-isolation --extra-index-url https://download.pytorch.org/whl/cu126\n```\n\nIf there are installation problems, install the dependencies from the 'requirements.txt' file one by one.\n\n## Update of NN Dataset\nTo get the latest code and statistics, install the most recent version of the LEMUR Dataset from GitHub:\n```bash\nrm -rf db\npip install --no-cache-dir git+https://github.com/ABrain-One/nn-dataset --upgrade --force --extra-index-url https://download.pytorch.org/whl/cu126\n```\nInstalling the stable version:\n```bash\npip install nn-dataset --upgrade --extra-index-url https://download.pytorch.org/whl/cu126\n```\nAdding functionality to export data to Excel files and generate plots for <a href='https://github.com/ABrain-One/nn-stat'>analyzing neural network performance</a>:\n```bash\npip install nn-stat --upgrade --extra-index-url https://download.pytorch.org/whl/cu126\n```\nand export/generate:\n```bash\npython -m ab.stat.export\n```\n\n## Use\n\n- **`ab.gpt.NNAlter*.py`** \u2013 Generates modified neural network models. \n Use the `-e` argument to set the number of epochs for the initial CV model generation.\n\n- **`ab.gpt.NNEval.py`** \u2013 Evaluates the models generated in the previous step.\n\n- **`ab.gpt.TuneNNGen*.py`** \u2013 Performs fine-tuning and evaluation of an LLM. For evaluation purposes, the LLM generates neural network models, which are then trained to assess improvements in the LLM\u2019s performance on this task. The -s flag allows skipping model generation for the specified number of epochs.\n\n<a href='https://huggingface.co/ABrain'><strong>Pretrained LLM weights</strong></a>\n\n### \ud83d\udc33 Docker\nAll versions of this project are compatible with <a href='https://hub.docker.com/r/abrainone/ai-linux' target='_blank'>AI Linux</a> and can be seamlessly executed within the AI Linux Docker container.\n\nInstalling the latest version of the project from GitHub\n```bash\ndocker run --rm -u $(id -u):ab -v $(pwd):/a/mm abrainone/ai-linux:llm bash -c \"[ -d nn-gpt ] && git -C nn-gpt pull || git -c advice.detachedHead=false clone --depth 1 https://github.com/ABrain-One/nn-gpt\"\n```\n\nRunning script\n```bash\ndocker run --rm -u $(id -u):ab --shm-size=16G -v $(pwd)/nn-gpt:/a/mm abrainone/ai-linux:llm bash -c \"python -m ab.gpt.TuneNNGen_8B\"\n```\n\nIf recently added dependencies are missing in the <a href='https://hub.docker.com/r/abrainone/ai-linux' target='_blank'>AI Linux</a>, you can create a container from the Docker image ```abrainone/ai-linux:llm```, install the missing packages (preferably using ```pip install <package name>```), and then create a new image from the container using ```docker commit <container name> <new image name>```. You can use this new image locally or push it to the registry for deployment on the computer cluster.\n\n## Citation\n\nThe original version of this project was created at the Computer Vision Laboratory of the University of W\u00fcrzburg by the authors mentioned below. If you find this project to be useful for your research, please consider citing our articles for NNGPT framework and <a target='_blank' href='https://arxiv.org/pdf/2504.06006'>hyperparameter tuning</a>:\n```bibtex\n\n@InProceedings{ABrain.HPGPT,\n title={Optuna vs Code Llama: Are LLMs a New Paradigm for Hyperparameter Tuning?},\n author={Kochnev, Roman and Goodarzi, Arash Torabi and Bentyn, Zofia Antonina and Ignatov, Dmitry and Timofte, Radu},\n booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops (ICCVW)},\n year={2025}\n}\n\n@article{ABrain.NNGPT,\n title = {NNGPT: Rethinking AutoML with Large Language Models},\n author = {Kochnev, Roman and Khalid, Waleed and Uzun, Tolgay Atinc and Zhang, Xi and Dhameliya, Yashkumar Sanjaybhai and Qin, Furui and Ignatov, Dmitry and Timofte, Radu},\n year = {2025}\n}\n```\n## Licenses\n\nThis project is distributed under the following licensing terms:\n<ul><li>models with pretrained weights under the legacy <a href=\"https://github.com/ABrain-One/nn-dataset/blob/main/Doc/Licenses/LICENSE-DEEPSEEK-LLM-V2\">DeepSeek LLM V2</a> license</li>\n<li> all neural network models and their weights not covered by the above licenses, as well as all other files and assets in this project, are subject to the <a href=\"LICENSE\">MIT license</a></li> \n</ul>\n\n#### The idea and leadership of Dr. Ignatov\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024- ABrain One and contributors\n All rights reserved.\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "LLM-Based Neural Network Generator",
"version": "1.0.4",
"project_urls": {
"Bug Tracker": "https://github.com/ABrain-One/nn-gpt/issues",
"Homepage": "https://ABrain.one",
"Repository": "https://github.com/ABrain-One/nn-gpt"
},
"split_keywords": [
"neural network code generation",
" ai-assisted programming",
" machine learning",
" deep learning",
" python",
" large language models",
" automated code generation",
" neural network design"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a4e35d529cba63069192fbce71109b98b2751c5a7e8c32b409668c7521b5fd72",
"md5": "0b7c4704138f2ac952beba4a2fb269b4",
"sha256": "7b2e5c2f6b793a72f87f3869bdb115e3eb83b2e2ec6f25e00c3b95e4ce29283d"
},
"downloads": -1,
"filename": "nn_gpt-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0b7c4704138f2ac952beba4a2fb269b4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 321247,
"upload_time": "2025-10-27T20:19:57",
"upload_time_iso_8601": "2025-10-27T20:19:57.261492Z",
"url": "https://files.pythonhosted.org/packages/a4/e3/5d529cba63069192fbce71109b98b2751c5a7e8c32b409668c7521b5fd72/nn_gpt-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2b194bfcb00c291881cb26d0485be1997174b583647843a6fc433c7592e51cb8",
"md5": "cf82287e08ba219194f00167b5ddb564",
"sha256": "ba57f0beaee7fdc6446b1681445483d05561cbf77ad7990781b378237cd91275"
},
"downloads": -1,
"filename": "nn_gpt-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "cf82287e08ba219194f00167b5ddb564",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 157733,
"upload_time": "2025-10-27T20:19:58",
"upload_time_iso_8601": "2025-10-27T20:19:58.632158Z",
"url": "https://files.pythonhosted.org/packages/2b/19/4bfcb00c291881cb26d0485be1997174b583647843a6fc433c7592e51cb8/nn_gpt-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-27 20:19:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ABrain-One",
"github_project": "nn-gpt",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "wheel",
"specs": []
},
{
"name": "torch",
"specs": [
[
"==",
"2.7.1"
]
]
},
{
"name": "nn-dataset",
"specs": [
[
">=",
"2.1.1"
]
]
},
{
"name": "bitsandbytes",
"specs": [
[
">=",
"0.45.0"
]
]
},
{
"name": "peft",
"specs": [
[
">=",
"0.14.0"
]
]
},
{
"name": "gguf",
"specs": [
[
">=",
"0.10.0"
]
]
},
{
"name": "trl",
"specs": []
},
{
"name": "sentence-transformers",
"specs": [
[
">=",
"3.3.1"
]
]
},
{
"name": "deepspeed",
"specs": [
[
">=",
"0.16.3"
]
]
},
{
"name": "faiss-cpu",
"specs": []
},
{
"name": "overrides",
"specs": [
[
">=",
"7.7.0"
]
]
}
],
"lcname": "nn-gpt"
}