Skip to content

Latest commit

 

History

80 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title Mog1 AI (VSLM) - Small Language Model
emoji 🚀
colorFrom indigo
colorTo purple
sdk gradio
sdk_version 6.22.0
app_file app.py
pinned false
license mit
language
en
tags
pytorch
language-model
transformer
small-language-model
vslm
mog1-ai
text-generation
built-from-scratch
auto-training
pipeline_tag text-generation

🚀 Mog1 AI (VSLM) - 3.3M Parameter PyTorch Small Language Model

Live Web App PyTorch License: MIT GitHub

Mog1 AI (VSLM) is a state-of-the-art, ultra-fast 3.3 Million Parameter Small Language Model built completely from scratch in PyTorch with zero black-box dependencies. Created by Aqua-code750 & Aquaholograph2014. Designed for 0.05s ultra-low latency inference, multi-domain intelligence (Code, Math, Science, Live Weather, World Facts), and 24/7 continuous cloud execution. image


⚡ What Makes Mog1 AI Stand Out?

  • ⚡ 0.05s Ultra-Low Latency: Generates responses instantly without long server loading delays.
  • 🧠 100% Custom PyTorch VSLM: Built from scratch with Causal Decoder-Only Multi-Head Self-Attention layers (~3.3M parameters).
  • 🌐 100% Forever Live Web Engine: Deployed live on GitHub Pages with zero server pauses or CPU quota locks!
  • 💻 Phi-3 Style Code Generator: Generates clean, commented, executable code for Python, JS, HTML/CSS, C++, SQL, and Bash.
  • 🌤️ Live Real-Time Weather API: Fetches real-time temperatures (°C) and weather conditions globally.
  • 🧮 Automated Math & Reasoning: Solves arithmetic expressions and step-by-step logic problems.
  • 🛠️ Autonomous Agent & Tool Execution Framework: Includes mog1_agent.py SDK allowing developers to equip Mog1 AI with custom python tools (calculator, python_interpreter, web_search, system_info).
  • 🤖 BBC micro:bit AI Hardware Compatibility: Includes microbit_mog1.py MicroPython client & microbit_bridge.py USB/Serial bridge to power physical micro:bit microcontrollers with Mog1 AI!
  • 🎙️ Voice Recognition & Text-To-Speech Engine: Web Speech API integration in index.html + mog1_voice.py desktop voice assistant!
  • 🔑 Developer API Portal & Key Gateway: Generate mog1_live_sk_... API keys via api_portal.html and integrate Mog1 AI into external Python, JS, and hardware apps!

🏆 Competitive Benchmark Matrix: Mog1 AI vs Frontier Models

Feature / Metric 🚀 Mog1 AI (VSLM) 🤖 GPT-4o / GPT-4 🧠 Claude 3.5 Sonnet 🦙 Llama 3 8B
Inference Latency ⚡ 0.05s (Ultra-Instant) ⏱️ 1.5s - 3.0s ⏱️ 1.2s - 2.5s ⏱️ 0.8s - 1.8s
Hardware Footprint 💾 < 35KB (Runs on micro:bit) ☁️ Huge Cloud Cluster ☁️ Huge Cloud Cluster 🖥️ 16GB+ VRAM GPU
Offline Edge Execution 🟢 100% Offline Hardware 🔴 Online API Only 🔴 Online API Only 🟡 High-end PC only
Hosting & API Cost 💰 $0.00 / 100% Free 💸 $2.50 - $10 / 1M tokens 💸 $3.00 - $15 / 1M tokens 💸 GPU Server Costs
Architecture Source 🧠 100% Handcoded PyTorch 🔒 Closed-Source Black Box 🔒 Closed-Source Black Box 🔓 Open Weights
Built-in Voice & Mic 🎙️ Native Web Speech & TTS 🎙️ App Only 🔴 Text Only 🔴 Text Only
API Portal & Key Gen 🔑 Built-in api_portal.html 🔑 Cloud Console 🔑 Cloud Console 🔴 Needs 3rd party

🏗️ Architecture Specifications

Parameter Specification
Model Parameters 3,354,624 Parameters (~3.3 Million)
Architecture Decoder-Only Causal Transformer
Attention Mechanism 8 Multi-Head Self-Attention Heads
Embedding Dimension 256
Transformer Layers 4 Blocks
Context Window 64 Tokens
Tokenization Subword BPE / Tiktoken GPT-2 Fallback
Optimization AdamW with Cosine Annealing Learning Rate Scheduler

🛠️ Installation & Setup

  1. Clone the Repository:
git clone https://github.com/Aqua-code750/vslm-project.git
cd vslm-project
  1. Install Dependencies:
pip install -r requirements.txt

💬 Usage Guide

1. Gradio Web Interface (Hugging Face / Local)

Launch the interactive web interface locally or deploy to Hugging Face Spaces:

python app.py

2. Interactive Terminal CLI Chat

Run the real-time CLI chat in your terminal:

python chat.py
  • Type /smart to activate Smart Reasoning Mode.
  • Type /exact to activate Factual Precision Mode.
  • Type /auto-train to trigger background model training.

3. Standalone Generation & Testing

Generate answers programmatically for any prompt:

python generate.py

📜 License

This project is licensed under the MIT License.

Thank You for viewing this awesome 1 month project i made long back

~ The Mog1 team (part of Holograph studios)

If these projects made young developers inspired too! Im happy to see your same projects like mine!

About

This is a NSLM made by me, and this AI can generate text and also respond to stuff like your questions, for example, how functions work. Thank you.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages