Project Goal: Simplify server administration through a natural language interface and a streamlined web UI.
Smol NAS AI is an intelligent storage management platform that transforms complex server administration into intuitive interactions. By combining a custom-tuned GPT-2 model with a robust Flask-based backend, Smol allows users to manage Samba shares, RAID arrays, and user permissions using natural language instructions.
Traditional NAS management requires deep CLI knowledge. Smol bridge this gap by providing:
- AI Command Generation: A 250M parameter GPT-2 model trained specifically for NAS CLI commands.
- Real-time System Monitoring: Live tracking of CPU, RAM, Temperature (optimized for Raspberry Pi), and Network I/O.
- Autonomous Share Management: One-click Samba configuration and user delegation.
graph TD
Client[Client Browser] -->|HTTPS| Flask[Flask Backend]
Flask -->|Subprocess| Shell[Linux Shell / CLI]
Flask -->|Torch| GPT2[NAS-GPT2 Model]
Shell -->|Config| Samba[Samba / smb.conf]
Shell -->|Monitoring| psutil[psutil / lsblk]
Flask -->|Auth| LinuxAuth[Linux System Auth / sshpass]
Flask -->|VPN| Tailscale[Tailscale IP Discovery]
The heart of Smol is a specialized GPT-2 model fine-tuned on a high-quality dataset of NAS administrative tasks.
# Inference Logic (test.py)
inputs = tokenizer(prompt, return_tensors="pt").to(device)
outputs = model.generate(
**inputs,
max_new_tokens=150,
temperature=0.2,
top_p=0.85,
repetition_penalty=1.1
)The model supports structured instructions across multiple domains:
[SAMBA]: Share creation, user access, and global settings.[RAID]: Array creation, disk addition, and status checks.[NFS]: Export management and mount configurations.[PERMISSION]:chownandchmodgeneration.[SERVICE]: Systemd service control and server reboots.
| Layer | Technology | Why |
|---|---|---|
| Backend Framework | Flask | Lightweight, extensible, perfect for embedded systems |
| AI / LLM | GPT-2 (250M) | Local execution, no internet required for core AI |
| Machine Learning | PyTorch + Transformers | Industry standard for NLP tasks |
| System Monitoring | psutil | Cross-platform system metrics extraction |
| Storage Interface | lsblk + mkfs | Direct interaction with Linux block devices |
| Authentication | Flask-Login + sshpass | Secure session management with system integration |
| Networking | Tailscale | Easy remote access without port forwarding |
| Frontend | Jinja2 Templates + HTML/CSS | Minimal overhead for server-side rendering |
- Python 3.10+
- Git LFS (for model weights)
- Linux environment (recommended for full system feature support)
-
Clone and Setup:
git clone https://github.com/Vector3451/Smol.git cd Smol pip install -r requirements.txt -
Pull Model Weights:
git lfs pull
-
Configure Environment: Create a
.envor set environment variables:SECRET_KEY=your_secret_key NAS_USER=admin NAS_PASSWORD=your_password NAS_ENV=production # Use 'development' for mock system calls
-
Run the Application:
cd NAS python app.pyAccess the UI at
http://localhost:5000.
Smol/
├── assets/screenshots/ # README visual documentation
├── nas_model_250m/ # Full PyTorch model weights (LFS)
├── nas_model_q8.gguf # Quantized model for efficient inference
├── tokenizer/ # Custom tokenizer configurations
├── NAS/ # Core Application Logic
│ ├── app.py # Flask Entrypoint & Route Handlers
│ ├── diagnostic.py # System Readiness Checker
│ ├── servicenow.py # Integration for incident reporting
│ └── templates/ # UI View Templates
├── test.py # Standalone Inference Script
└── README.md # This file
Built for modern storage management. For questions, contact the repository owner.




