Skip to content
Pro1943Public

About

SlimGPT is an open-source, lightweight web platform built to interface with a custom ~34 Million Parameter decoder-only transformer model. Trained completely from scratch on English Wikipedia without pre-existing weights.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

  ███████╗██╗     ██╗███╗   ███╗     ██████╗ ██████╗ ████████╗
  ██╔════╝██║     ██║████╗ ████║    ██╔════╝ ██╔══██╗╚══██╔══╝
  ███████╗██║     ██║██╔████╔██║    ██║  ███╗██████╔╝   ██║   
  ╚════██║██║     ██║██║╚██╔╝██║    ██║   ██║██╔═══╝    ██║   
  ███████║███████╗██║██║ ╚═╝ ██║    ╚██████╔╝██║        ██║   
  ╚══════╝╚══════╝╚═╝╚═╝     ╚═╝     ╚═════╝ ╚═╝        ╚═╝   

🧠 Custom ~34M Parameter GPT Built From Scratch

Live Site Next.js React TailwindCSS TypeScript


Designed & Developed by Pro 1943
🔬 Member of the GAD R&D Team @ Gen AI Devs


🌐 Visit Live App · 📡 Backend API · Report Bug



📖 Overview

SlimGPT is an open-source, lightweight web platform built to interface with a custom ~34 Million Parameter decoder-only transformer model. Trained completely from scratch on English Wikipedia without pre-existing weights, SlimGPT demonstrates custom architecture training, chat fine-tuning, and real-time streaming inference on resource-constrained CPU environments.

🔗 Live Website: https://slim-gpt.vercel.app/


┌────────────────────────────────────────────────────────────────────────┐
│                        SLIMGPT ARCHITECTURE                            │
├────────────────────────────────────────────────────────────────────────┤
│                                                                        │
│   [ User Input ]  ──>  [ Next.js SSE Proxy ]  ──>  [ Render API ]      │
│                              (CORS Bypass)          (Python/Flask)     │
│                                                          │             │
│                                                          ▼             │
│   [ Live UI Token Stream ] <── [ SSE Reader ] <── [ ~34M Model CPU ]   │
│     "Token 42 at 35.2s"       (Fetch Reader)      (1.25 tok/sec)       │
│                                                                        │
└────────────────────────────────────────────────────────────────────────┘

✨ Highlights & Features

Feature Description
⚡ Real-Time SSE Streaming Live token-by-token streaming via POST /generate/stream using standard fetch() and ReadableStreamDefaultReader.
⏱ Real-Time Telemetry Per-token live progress indicator (Token 42 at 35.2s) and pulsing cursor animations.
🎛 Precision Token Control Prominent main UI slider (20–200 tokens) with dynamic CPU wait time calculations.
🔒 Server-Side CORS Bypass Built-in Next.js App Router API proxy handlers (/api/generate/stream, /api/health) for seamless client calls.
📡 Health Monitor Automated 15s health check polling (ONLINE, CHECKING, SLEEPING) tracking Render free-tier CPU wake-up status.
🎨 Cyber-Dark Glass UX Custom dark glassmorphism theme, ambient radial glows, and mobile-safe 100dvh viewport layout.

⚙️ Tech Stack & Architecture

Frontend Interface

  • Deployment: Vercel Edge Network (slim-gpt.vercel.app)
  • Framework: Next.js 15 (App Router, Server Actions, Route Handlers)
  • Library: React 19 (Hooks, Concurrent Rendering)
  • Styling: Tailwind CSS v3 + CSS Variable Design Tokens
  • Icons & Motion: Custom CSS Micro-animations & Glassmorphic Backdrop Filters

Backend & Machine Learning Model

  • Model Size: ~34,000,000 Parameters
  • Architecture: GPT-2 Decoder-Only Transformer (Multi-Head Self-Attention, Learned Positional Embeddings)
  • Dataset: Subsets of English Wikipedia (Trained from zero weights)
  • Hosting: Render Free-Tier CPU Container

🚀 Quick Start Guide

Prerequisites

Make sure you have Node.js (v18.0.0 or higher) and npm installed on your system.

# 1. Clone the repository
git clone https://github.com/Pro1943/SlimGPT.git

# 2. Navigate to project root
cd SlimGPT

# 3. Install dependencies
npm install

# 4. Launch development server
npm run dev

Visit http://localhost:3000 locally or open the live deployment at https://slim-gpt.vercel.app/.


🔌 API Reference

The frontend proxies all API calls through local Next.js Route Handlers to eliminate browser CORS issues:

POST /api/generate/stream

Streams generated text token-by-token using Server-Sent Events.

// Request Body
{
  "prompt": "Neural networks are used in",
  "max_tokens": 150,
  "temperature": 1.0
}
// SSE Event Stream Format
data: {"type": "token", "index": 1, "elapsed": 1.2, "text_so_far": "Neural"}

data: {"type": "token", "index": 2, "elapsed": 2.1, "text_so_far": "Neural networks"}

data: {"type": "done", "text": "Neural networks are used in artificial intelligence..."}

GET /api/health

Returns system status and model memory load state.

{
  "status": "healthy",
  "model_loaded": true
}

👨‍💻 Team & Credits

  • Lead Developer & ML Engineer: Pro 1943
  • Research & Development: GAD R&D Team @ Gen AI Devs

⚖️ Disclaimer

SlimGPT is an experimental portfolio model built for research and educational purposes. Running on free-tier CPU hardware means inference speed is approximately 1.25 tokens/second. Responses may occasionally be inaccurate or repetitive.


Made with ❤️ by Pro 1943 · GAD R&D Team

About

SlimGPT is an open-source, lightweight web platform built to interface with a custom ~34 Million Parameter decoder-only transformer model. Trained completely from scratch on English Wikipedia without pre-existing weights.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages