The Django for AI & Machine Learning — zero-configuration, zero-path execution.
pip install aimlite==2.1.1 Copy PIP instructions
The Django for AI & Machine Learning — an opinionated, convention-over-configuration Python framework with zero-path CLI execution.
uv add aimlite from aimlite import Model, Dataset, BaseTrainer, BaseConfig, BaseEvaluator, BaseInference Authors & Collaborators Mickyas Tesfaye (alazartesfaye42@gmail.com) Beamlak Tadesse (atocodes@gmail.com) Why AIMLite? Traditional AI and machine learning projects suffer from repetitive boilerplate: scattered scripts, brittle path configurations, unstandardized train/test splits, hardcoded checkpoint paths, and ad-hoc serving code.
AIMLite provides a standardized, convention-based structure inspired by modern web frameworks like Django and Vite:
Requires Python >= 3.10 (tested on 3.14) and uv (or pip).
git clone https://github.com/Alazar42/aimlite.git cd aimlite git clone https://github.com/Alazar42/aimlite.git cd aimlite uv sync Essential Commands uv run aimlite --help # Run AIMLite CLI uv run test # Run core test suite (49 tests) uv run pytest # Full pytest runner (49/49 passing) Project Structure Conventions When you run aimlite init (or aimlite init .), AIMLite scaffolds a standardized convention layout:
my_project/ ├── .aimlite/ │ └── workspace.json # IDE workspace configuration ├── .venv/ # Project-isolated virtual environment ├── data/ # Raw datasets (.csv, .json, .txt, .md) ├── models/ # Model architectures and saved weights (*.pkl) ├── experiments/ # Training run logs and metric snapshots (*.json) ├── data.py # Dataset definitions extending Dataset ├── model.py # Model classes extending Model / RAGModel / AdapterModel ├── trainer.py # Training lifecycle hooks extending BaseTrainer ├── evaluator.py # Metric benchmarks extending BaseEvaluator ├── inference.py # Inference pipeline extending BaseInference └── aimlite.json # Project config, dependencies manifest, and paradigms The 3 AI Paradigms AIMLite is architected around the 3 primary modern machine learning paradigms:
Bespoke tabular architectures, full optimization loops, and custom weights.
aimlite install scikit-learn pandas # or pip install scikit-learn pandas Example Files: docs/examples/churn_scratch/ data.py: TelecomChurnDataset(Dataset) ingesting data/telecom_churn.csv with automatic 80/10/10 train/val/test splits. model.py: ChurnClassifier(Model) wrapping scikit-learn's RandomForestClassifier. trainer.py: ChurnTrainer(BaseTrainer) fitting and saving weights to models/churn_classifier.pkl. evaluator.py: ChurnEvaluator(BaseEvaluator) calculating accuracy, precision, recall, and F1 score. inference.py: ChurnInference(BaseInference) scoring churn risk probability and returning retention decisions. Workflow: # Initialize (new directory or in-place with .) aimlite init churn_model && cd churn_model # Place telecom_churn.csv in data/ aimlite data validate aimlite train ChurnClassifier aimlite evaluate ChurnClassifier aimlite serve ChurnClassifier --port 8000 Reference Template 2: Knowledge Base & RAG (Enterprise Knowledge Engine) Reference Template 2: Knowledge Base & RAG (Enterprise Knowledge Engine) Demonstrates semantic vector retrieval, query intelligence, smart document chunking, and grounded LLM synthesis. Ingest text, Markdown, CSV, JSON, or any document source with any filename you choose.
aimlite init support_rag && cd support_rag # Place knowledge documents in data/ aimlite train SupportDocRAG aimlite serve SupportDocRAG --port 8000 Reference Template 3: Fine-Tuning & Adapters (LoRA & PEFT) Demonstrates parameter-efficient fine-tuning with mathematical low-rank matrix decomposition, multi-adapter routing, zero-latency weight merging, and lightweight delta checkpoints (~50KB to 50MB instead of 14GB+). Ingest any prompt format, CSV, Parquet, JSON, JSONL, or custom schema with any filename you choose.
aimlite init lora_app && cd lora_app # Place instructions.json in data/ aimlite train LoRAInstructionModel aimlite serve LoRAInstructionModel --port 8000 Zero-Path CLI Reference AIMLite provides zero-path convention-over-configuration commands: AIMLite provides zero-path convention-over-configuration commands:
AIMLite supports multiple build and packaging targets: AIMLite supports multiple build and packaging targets:
Bundle the entire AIMLite framework and CLI into a single, portable executable using Python's native zipapp format (compressed bytecode, zero external binary dependencies):
# Compile standalone binary: # Compile standalone binary: python3 build/build_cli.py # Test the compiled binary directly: ./build/aimlite --help ./build/aimlite doctor 2. Build Python Package (Wheel & Source Distribution) Build standard distribution packages using Hatchling / uv:
# Using uv: uv build # Or using standard python build: python3 -m pip install --upgrade build python3 -m build 3. Build Interactive Documentation Portal (api_docs/) Build the React/TypeScript/Vite API documentation portal:
Build standard distribution packages using Hatchling / uv:
cd api_docs npm install npm run build # Produces optimized production bundle in api_docs/dist/ npm run build # Produces optimized production bundle in api_docs/dist/ How to Test AIMLite includes a comprehensive 57-test suite validating CLI commands, header generation, data validation, model lifecycle, inference serving, LoRA adaptation, and the RAG subsystem:
# Run via unittest discovery: PYTHONPATH=src:. python3 -m unittest discover -s test # Or using uv / pytest: uv run test uv run pytest 2. Run Module-Specific Test Suites # RAG Subsystem (Chat providers, SmartChunker, QueryAnalyzer, PostgresVectorStore, KnowledgeModel): PYTHONPATH=src:. python3 -m unittest test.test_rag # Adapters & LoRA Fine-Tuning: PYTHONPATH=src:. python3 -m unittest test.test_adapters # Zero-Path CLI & Discovery: PYTHONPATH=src:. python3 -m unittest test.test_cli # End-to-End Reference Paradigms: PYTHONPATH=src:. python3 -m unittest test.test_examples # Pillar Headers & Core Interfaces: PYTHONPATH=src:. python3 -m unittest test.test_headers Business & Enterprise AIMLite is 100% free and open-source under the Apache 2.0 license for individual developers, students, researchers, and startups.
For companies and teams seeking enterprise extensions or dedicated collaboration:
For commercial inquiries, partnerships, or custom integrations:
AIMLite is released under the Apache 2.0 License. Free for commercial and non-commercial use.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




