Observed since 21 Oct, 11:20 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
The Django for AI & Machine Learning — zero-configuration, zero-path execution.
The Django for AI & Machine Learning — an opinionated, convention-over-configuration Python framework with zero-path CLI execution.
curl -fsSL https://raw.githubusercontent.com/Alazar42/AIMLite/main/install.sh | bash
pip install aimlite
Or with uv:
uv add aimlite
from aimlite import Model, Dataset, BaseTrainer, BaseConfig, BaseEvaluator, BaseInference
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:
aimlite anywhere inside your project directory. AIMLite resolves modules, sets up paths, and locates your data and models automatically..venv and pre-installs aimlite on init.aimlite is installed in the project .venv with PEP 561 headers (py.typed), editors like VS Code, Cursor, and PyCharm deliver immediate auto-completion, parameter hints, and docstrings with zero configuration.models/<model_name>.pkl and experiments/<model_name>_snapshot.json)./chat), Swagger API documentation (/docs), OpenAPI schema (/openapi.json), POST /predict, GET /health, custom user-defined endpoints, and optional static frontend hosting.Requires Python >= 3.10 (tested on 3.14) and uv (or pip).
git clone https://github.com/Alazar42/aimlite.git
cd aimlite
uv sync
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)
When you run aimlite init <project_name> (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
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
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.# 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
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.
SmartChunker): Parses Markdown headers (#, ##, ###), paragraph boundaries, and lists while preserving parent document title and section hierarchies in chunk metadata.QueryAnalyzer & HyDE): Deconstructs user queries into search intent, keyword tags, multi-query variations, and Hypothetical Document Embeddings (HyDE) for maximum semantic retrieval recall.BaseChatProvider): Native integrations for API models (OpenAIChatProvider, AnthropicChatProvider, GeminiChatProvider), Local models (OllamaChatProvider, LocalChatProvider with HuggingFace/custom callables), and zero-dependency MockChatProvider.pgvector (PostgresVectorStore): Production vector persistence using PostgreSQL with native pgvector similarity operators (<=> cosine / <-> L2 distance) and declarative ORM records (KnowledgeDocumentRecord, KnowledgeChunkRecord), with seamless in-memory fallback.PROMPT_RAG_QA), search analysis (PROMPT_QUERY_ANALYZER), semantic chunking (PROMPT_SMART_CHUNKER), and multi-turn conversations (PROMPT_CONVERSATIONAL_RAG).KnowledgeModel & RAGTrainer): Enterprise domain model and lifecycle trainer automating document loading $\to$ smart chunking $\to$ vector embedding $\to$ database/artifact persistence.docs/examples/knowledge_rag/
data.py: KnowledgeDocsDataset(Dataset) ingesting and chunking articles using SmartChunker.model.py: SupportDocRAG(KnowledgeModel) coordinating QueryAnalyzer, PostgresVectorStore/MemoryVectorStore, and BaseChatProvider.trainer.py: IndexBuilderTrainer(RAGTrainer) orchestrating semantic index building and artifact/database persistence.inference.py: RAGInference(BaseInference) serving grounded Q&A with verifiable document citations and confidence scores via POST /predict.aimlite init support_rag && cd support_rag
# Place knowledge documents in data/
aimlite train SupportDocRAG
aimlite serve SupportDocRAG --port 8000
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.
LoRALayer): Freezes base foundation weights $W_0$ and trains low-rank matrices $A \in \mathbb{R}^{r \times d_{in}}$ and $B \in \mathbb{R}^{d_{out} \times r}$:
$$h = W_0 x + \frac{\alpha}{r} (B \cdot A) x$$model.merge_weights() folds delta matrices directly into foundation weights with 0 inference overhead; model.unmerge_weights() restores base parameters.MultiAdapterManager): Register multiple domain adapters on a single running model (model.add_adapter("coder", cfg)) and hot-swap at runtime per request (model.set_active_adapter("coder")).model.print_trainable_parameters()) showing trainable vs total weights and memory reduction percentages.adapter_config.json, adapter_model.pkl, and adapter_metadata.json.docs/examples/instruction_adapter/
data.py: InstructionDataset(Dataset) preparing fine-tuning data.model.py: LoRAInstructionModel(AdapterModel) configuring adapter rank, alpha, and routing.trainer.py: AdapterInstructionTrainer(BaseTrainer) optimizing low-rank delta matrices with parameter diagnostics.inference.py: AdapterInference(BaseInference) executing fine-tuned generations via POST /predict.aimlite init lora_app && cd lora_app
# Place instructions.json in data/
aimlite train LoRAInstructionModel
aimlite serve LoRAInstructionModel --port 8000
AIMLite provides zero-path convention-over-configuration commands:
| Command | Description |
|---|---|
aimlite | Launches the locally hosted AIMLite Web Studio in your browser for visual project creation, architectural inspection, and live documentation. |
aimlite init [project_name | .] [--cli] [--clean] | Launches the locally hosted Web Studio to visually scaffold your project. Pass --cli to run the interactive creation steps directly from the terminal console. |
aimlite install [packages...] | Without arguments, installs all dependencies listed in aimlite.json. With packages, installs them into .venv using uv (or pip) and adds them to aimlite.json. |
aimlite data validate [target] | Validates dataset schema, record count, column names, and partition readiness across all datasets in data/, or selectively validates by dataset class name, declared filename, path, or raw unbound data file. |
aimlite train [ModelName] [--resume [path]] [--checkpoint-dir <dir>] | Automatically discovers registered models and executes training. Supports resuming from latest or specific past checkpoints with --resume, and saving to custom directories with --checkpoint-dir. Saves weights to models/<model_name>.pkl and snapshots to experiments/. |
aimlite evaluate [ModelName] [--checkpoint <path>] | Loads the model's checkpoint and calculates benchmark metrics on test partitions. Discovers latest checkpoint automatically or loads an explicit past checkpoint with --checkpoint. |
aimlite serve [ModelName] [--checkpoint <path>] [--port 8000] [--frontend <dir>] [--api] | Starts an HTTP inference server with multi-model auto-discovery, paradigm-adaptive web UI, GET /models, POST /models/{name}/predict, optional headless API mode (--api), and custom SPA frontend hosting (--frontend <dir>). |
aimlite doctor | Diagnoses runtime health, virtual environment, hardware accelerator availability (cuda, mps, cpu), and directory permissions. |
aimlite benchmark [script] [args...] | Runs any Python script with the project root automatically injected into PYTHONPATH. Eliminates ModuleNotFoundError when running experiment or benchmark scripts. Uses the project .venv Python automatically. Auto-discovers scripts in experiments/ when no path is given. |
Deploying an AIMLite application to production is zero-friction. Below is the production-ready Dockerfile engineered for ultra-fast builds, layer-cached dependencies, pre-baked model weights, active health monitoring, and dynamic port binding on cloud platforms (Render, Railway, Fly.io, Google Cloud Run, AWS ECS/Fargate, and Kubernetes).
Dockerfile# syntax=docker/dockerfile:1
FROM python:3.12-slim
# Set environment configuration
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PORT=8000 \
HOST=0.0.0.0 \
PATH="/app/.venv/bin:$PATH"
# Install system dependencies (curl for healthchecks & network tooling)
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# 1. Install uv (blazing fast backend) and AIMLite framework
RUN pip install --no-cache-dir uv aimlite
# 2. Set project working directory
WORKDIR /app
# 3. Copy project manifest
COPY aimlite.json .
# 4. Install all project dependencies into managed .venv using aimlite CLI
RUN aimlite install
# 5. Copy the remaining application files, data, and frontend assets
COPY . .
# 6. Train and calibrate model weights for serving
RUN aimlite train
# 7. Expose serving port
EXPOSE 8000
# 8. Health check verifying inference server status
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD curl -f http://localhost:${PORT:-8000}/health || exit 1
# 9. Host multi-model inference server with custom frontend (dynamically binds to $PORT on cloud hosts)
CMD ["sh", "-c", "aimlite serve --host 0.0.0.0 --port ${PORT:-8000} --frontend frontend"]
aimlite.json and executing aimlite install before copying application code, Docker caches your compiled virtual environment layer. Code edits will rebuild in seconds without re-downloading dependencies.RUN aimlite train runs at image build time. Weight matrices (models/*.pkl) and vector artifacts are pre-baked directly into the container image, guaranteeing instant startup and zero inference lag on container spin-up.HEALTHCHECK periodically verifies GET /health with curl. Orchestrators (Kubernetes, ECS, Docker Swarm) automatically restart degraded instances.${PORT:-8000}): Cloud platforms (Render, Railway, Heroku, Google Cloud Run) dynamically inject the $PORT environment variable. The shell wrapper dynamically binds to this port, avoiding binding conflicts.--frontend frontend): AIMLite serves your custom compiled frontend SPA (React, Vue, Vite, Next.js static) alongside backend inference endpoints on the exact same port, eliminating CORS configurations entirely.# 1. Build the production Docker image:
docker build -t my-aimlite-app .
# 2. Run container locally with port 8000 mapped:
docker run -d --name aimlite-srv -p 8000:8000 my-aimlite-app
# 3. Verify server health:
curl http://localhost:8000/health
# 4. Submit inference request:
curl -X POST http://localhost:8000/predict \
-H "Content-Type: application/json" \
-d '{"features": [128.0, 1.0, 2.7, 1.0, 265.1, 110.0, 89.0, 9.8, 10.0]}'
# 5. View live streaming container logs:
docker logs -f aimlite-srv
docker-compose.yml)For local multi-service orchestration (e.g. AIMLite + PostgreSQL with pgvector for enterprise RAG):
services:
aimlite:
build:
context: .
dockerfile: Dockerfile
ports:
- "${PORT:-8000}:8000"
environment:
- PORT=8000
- HOST=0.0.0.0
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 5s
retries: 3
AIMLite supports multiple build and packaging targets:
build/)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:
python3 build/build_cli.py
# Test the compiled binary directly:
./build/aimlite --help
./build/aimlite doctor
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
api_docs/)Build the React/TypeScript/Vite API documentation portal:
cd api_docs
npm install
npm run build # Produces optimized production bundle in api_docs/dist/
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
# 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
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.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.2.2 | 12 Oct 2026 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:20 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d1a93d30d77bec471d08029a5479c626e93f14dae01920273d1e58535c2db7ac