Skip to content

Repository files navigation


ProX AI
ProX AI

A Production-Grade, Multi-Model AI Ecosystem Built from Scratch

OverviewArchitectureQuickstartTraining GuideUI Integration


🌟 Overview

ProX AI is a comprehensive, modular Artificial Intelligence system designed to demonstrate how modern AI models work under the hood. Unlike wrappers around external APIs, ProX AI implements its own neural network architectures entirely from scratch using PyTorch.

It is designed to be lightweight enough to train on consumer hardware (or free cloud GPUs like Google Colab) while maintaining the structural integrity and modularity of a startup-grade AI product.

🧠 Architecture

ProX AI consists of 5 independent but interconnected models, orchestrated by a central routing engine:

  1. Neurix-mini (Text): A custom decoder-only Transformer language model. Features multi-head self-attention, positional encoding, and a custom character-level tokenizer.
  2. Logyx-mini (Code): Shares the Neurix architecture but is optimized and trained specifically on code datasets for code generation tasks.
  3. Imagix-lite (Vision Generation): A lightweight Generative Adversarial Network (GAN) designed to synthesize images from latent noise vectors.
  4. Optyx-lite (Vision Classification): A Convolutional Neural Network (CNN) built for rapid and accurate image classification.
  5. Elevon-lite (Router): The orchestration brain. Elevon analyzes incoming user prompts and intelligently routes the request to the appropriate specialized model.

🚀 Quickstart

Prerequisites

  • Python 3.9+
  • Node.js 18+ (for the UI)
  • PyTorch 2.0+

1. Clone & Install Backend Dependencies

# Navigate to the prox_ai directory
cd prox_ai

# Install Python dependencies
pip install -r requirements.txt

2. Start the Backend API Server

The backend is powered by FastAPI and serves all models via REST endpoints.

cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000

The API will be available at http://localhost:8000.

3. Start the Frontend UI

The repository includes a professional, ChatGPT-style React frontend.

# From the root of the repository
npm install
npm run dev

Open http://localhost:3000 in your browser to interact with the models.


🏋️ Training Guide

ProX AI models are designed to be trained locally. Each model has an independent training pipeline.

Training Neurix-mini (Language Model)

Neurix is a transformer model. To train it on the sample dataset:

cd prox_ai
python training/train_neurix.py

What happens during training?

  1. The CharTokenizer builds a vocabulary from the dataset.
  2. The text is chunked into sequences of max_seq_len.
  3. The Transformer processes batches, computing Cross-Entropy Loss.
  4. Checkpoints are automatically saved to prox_ai/data/neurix/neurix_ckpt.pth.

Training Logyx-mini (Code Model)

python training/train_logyx.py

Training Imagix-lite (GAN)

python training/train_imagix.py

Note: The GAN trains two networks simultaneously (Generator and Discriminator) using Binary Cross Entropy (BCE) loss.

Training Optyx-lite (CNN)

python training/train_optyx.py

💻 Using the UI

The included React frontend provides a seamless chat interface to interact with Neurix and the other models.

  1. Smart Routing: Type a prompt like "Write a python function" and the backend Elevon Router will automatically detect the intent and route it to Logyx-mini.
  2. Chatting: Standard conversational prompts are routed to Neurix-mini.
  3. Fallback Mode: If the Python backend is not running, the UI will gracefully fall back to a simulated response mode, allowing you to preview the interface design.

🔌 API Reference

Endpoint Method Description
/ GET Health check and system status.
/query POST Main entry point. Uses Elevon to route to the correct model.
/chat POST Direct access to Neurix-mini.
/code POST Direct access to Logyx-mini.

Example Request (/query):

{
  "prompt": "Explain quantum computing."
}

Example Response:

{
  "model": "Neurix-mini",
  "type": "chat",
  "result": "Quantum computing is..."
}

🛠️ Future Roadmap

  • BPE Tokenization: Upgrade from character-level to Byte-Pair Encoding (BPE) for Neurix and Logyx.
  • Diffusion Models: Replace the Imagix GAN with a lightweight Diffusion model.
  • KV Caching: Implement Key-Value caching in the Transformer for faster inference.
  • WebSockets: Add streaming responses to the FastAPI backend and React frontend.

Built with ❤️ by AI Engineers.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages