Skip to main content

LLM-Based Neural Network Generator

Project description

GPT-Driven Neural Network Generator


short alias lmurg

Overview 📖

This Python-based project leverages large language models to automate the creation of neural network architectures, streamlining the design process for machine learning practitioners.

Create and Activate a Virtual Environment (recommended)

For Linux/Mac:

python3 -m venv .venv
source .venv/bin/activate

For Windows:

python3 -m venv .venv
.venv\Scripts\activate

All subsequent commands are provided for Linux/Mac OS. For Windows, please replace source .venv/bin/activate with .venv\Scripts\activate. It is also assumed that CUDA 12.6 is installed. If you have a different version, please replace 'cu126' with the appropriate version number.

Environment for NNGPT Developers

Pip package manager

Prerequisites for mpi4py package:

  • On Debian/Ubuntu systems, run:

       sudo apt install libmpich-dev    # for MPICH
    
       sudo apt install libopenmpi-dev  # for Open MPI
    
  • On Fedora/RHEL systems, run:

       sudo dnf install mpich-devel     # for MPICH
    
       sudo dnf install openmpi-devel   # for Open MPI
    

Create a virtual environment, activate it, and run the following command to install all the project dependencies:

source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu126

Update of NN Dataset

Remove old version of the LEMUR Dataset and its database:

source .venv/bin/activate
pip uninstall nn-dataset -y
rm -rf db

Installing the stable version:

source .venv/bin/activate
pip install nn-dataset --upgrade --extra-index-url https://download.pytorch.org/whl/cu126

Installing from GitHub to get the most recent code and statistics updates:

source .venv/bin/activate
pip install git+https://github.com/ABrain-One/nn-dataset --upgrade --force --extra-index-url https://download.pytorch.org/whl/cu126

Adding functionality to export data to Excel files and generate plots for analyzing neural network performance:

source .venv/bin/activate
pip install nn-stat --upgrade --extra-index-url https://download.pytorch.org/whl/cu126

and export/generate:

source .venv/bin/activate
python -m ab.stat.export

Docker

All versions of this project are compatible with AI Linux and can be run inside a Docker image:

docker run -v /a/mm:. abrainone/ai-linux bash -c "PYTHONPATH=/a/mm python -m ab.gpt.train_n_eval"

The recently added dependencies might be missing in the AI Linux. In this case, you can create a container from the Docker image abrainone/ai-linux, 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.

Usage

Use initial_generation_chg.py to generate initial modified CV models, specify by argument -e to determine the number of epochs for initial CV model generation.

Use finetune_nn_gen.py to perform generation and evaluation of CV model, evaluate and fine-tune the LLM. Use argument -s to colaborate with generate.py, with -s for number of epochs to skip the CV model generation.

Pretrained LLM weights

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:

@misc{ABrain-One.NNGPT,
  author       = {Qin, Furui and Kochnev, Roman and Khalid, Waleed and Goodarzi, Arash Torabi and Zhang, Xi and Dhameliya, Yashkumar Sanjaybhai and Ignatov, Dmitry and Timofte, Radu},
  title        = {GPT-Driven Neural Network Generator},
  howpublished = {\url{https://github.com/ABrain-One/nn-gpt}},
  year         = {2024},
}

Licenses

This project is distributed under the following licensing terms:

  • models with pretrained weights under the legacy DeepSeek LLM V2 license
  • 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 MIT license

The idea and leadership of Dr. Ignatov

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmurg-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lmurg-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file lmurg-0.1.0.tar.gz.

File metadata

  • Download URL: lmurg-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for lmurg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7353ced272b5f814b21c024d5945a278d815f41f4b1f30ed87d94fcec7d4e4fe
MD5 9eb7108a805f2a74a3c8b89034fcef6a
BLAKE2b-256 dc02b6389928f0cd0c9ec6e20a4fb5c8a39f46269a2d8da6a93a0c54629b3dee

See more details on using hashes here.

File details

Details for the file lmurg-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lmurg-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for lmurg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c9ec8d95db5a06dec6ccdc4a333bf150b98b219a69205bde767ca94fdd0b3d0
MD5 59393bcd32edd646b2195294a90f9694
BLAKE2b-256 180b3a46e0c8c3eff9c972dc61106cbc18d4bac8f5b90c2e9eff9d334df73e40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page