Aquaholograph2014/mog1-ai-vslm
๐ Mog1 AI (VSLM) - Lightweight PyTorch Small Language Model
   
Mog1 AI (VSLM) is an advanced, lightweight Small Language Model built completely from scratch in PyTorch with zero black-box dependencies. Created by Aqua-code750 / Aquaholograph2014. Designed for high-speed local inference, multi-domain reasoning, free-form interactive chat, and automatic internal pretraining.
๐ Key Features
- ๐ง Built From Scratch in PyTorch: Pure PyTorch implementation of Decoder-Only Multi-Head Self-Attention Transformer blocks.
- ๐ Multi-Domain Internet Knowledge Base: Pretrained on Computer Science, AI/ML, Python, Science, Math, History, General Knowledge, and Natural Dialogue.
- ๐ Auto-Training Engine: Internal automatic pretraining triggers and 1-click Web UI fine-tuning button to update knowledge anytime.
- ๐ฌ Free-Form Interactive Chat: Real-time CLI (
chat.py) and Gradio Web UI (app.py) for natural conversational Q&A. - ๐ฏ Dual Sampling Modes:
- Smart Mode: Top-P (Nucleus) & Top-K sampling with temperature scaling for creative, fluent dialogue.
- Exact Factual Mode: Low-temperature greedy decoding for precise technical facts.
- โก Lightning Fast CPU & GPU Execution: Runs instantly on standard laptops or CPU servers without requiring high-end GPUs.
๐๏ธ Architecture Specifications
๐ ๏ธ Installation & Setup
- Clone the Repository:
git clone https://github.com/Aqua-code750/vslm-project.git
cd vslm-project- 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.py2. Interactive Terminal CLI Chat
Run the real-time CLI chat in your terminal:
python chat.py- Type
/smartto activate Smart Reasoning Mode. - Type
/exactto activate Factual Precision Mode. - Type
/auto-trainto trigger background model training.
3. Standalone Generation & Testing
Generate answers programmatically for any prompt:
python generate.py4. Background Auto-Training & Pretraining
Train or fine-tune Mog1 on updated text datasets anytime:
python train.py 60Or run the background task manager:
python auto_train.py๐ Publish to Hugging Face & GitHub
Publish your trained model and Gradio app to Hugging Face Spaces & GitHub in 1 click:
# 1. Publish to GitHub
python publish.py github https://github.com/Aqua-code750/vslm-project.git
# 2. Publish to Hugging Face Spaces
python publish.py hf Aquaholograph2014/mog1-ai-vslm <YOUR_HF_TOKEN>๐ License
This project is licensed under the MIT License.
