🌟 Aura: The Advanced AI Web Framework (v1.3.0)
A RootSpace.app Product
Founded and Developed by John V. Teixido
Aura is a professional-grade AI Web Framework that allows you to build, train, and deploy advanced AI models in a single declarative file. By combining Torch-rb, Torchvision, and Sinatra, Aura bridges the gap between deep learning research and production web services.
🚀 Key Features
- Layers:
conv2d,maxpool2d,batchnorm,dropout,dense, plus sequence layersembedding,lstm, andgru. - Transfer Learning: Bootstrap with pre-trained architectures (ResNet, etc.)
via
transfer from :model_name, withfreeze/unfreezeand a new head. - Advanced Training: Declarative LR schedulers (
StepLR,ExponentialLR,CosineAnnealingLR), optimizers, metrics, and atrain/servesplit. - Datasets: built-in MNIST / Fashion-MNIST / CIFAR loaders, plus CSV
(
train m on "data.csv"). - LLMs:
from openai/from ollamawith a config block (system,temperature,max_tokens). - Serving: typed JSON routes, bearer-token auth,
predict(...) as :labelpost-processing, and an automatic/healthendpoint. - Model Persistence: native
save/loadweight primitives. - Deployment: type-aware Dockerfiles and a Vercel target (
aura deploy).
🛠️ Installation
gem install aura-lang
Torch is optional. Parsing, transpiling (
aura check), and building (aura build/aura deploy) work out of the box. Training and running models additionally requiretorch-rband LibTorch:gem install torch-rb.
🔨 Local Installation (From Source)
If you are developing Aura or want to use the latest unreleased version:
git clone https://github.com/johnvteixido/aura-lang
cd aura-lang
gem build aura-lang.gemspec
gem install ./aura-lang-1.3.0.gem
🧠 Example: Transfer Learning Image API
Build a professional Image Classifier in seconds:
# Scaffolding a production vision API
environment production do
device :cuda
log_level :info
end
model vision transfer from :resnet18 do
# Fine-tune the head while keeping features frozen
freeze until :layer_4
output units: 10, activation: :softmax
end
train vision on "imagenet-subset" do
epochs 20
optimizer :adam, learning_rate: 0.0001
scheduler :step_lr # Advanced LR scheduling
end
route "/v1/classify" post do
authenticate with :token
output prediction from vision.predict(image)
end
run web on port: 8080
What runs out of the box:
aura check/build/deploytranspile this to a standalone Sinatra app with no extra setup. Training and serving needtorch-rb+ LibTorch installed. Built-in dataset loading covers the red-datasets sets (MNIST / Fashion-MNIST / CIFAR); for any other dataset, the generated loader raises with a clear hook so you can plug your own in.
🏗️ Commands
aura init <name>: Scaffold a new production project.aura train <file>: Train the models, persist weights, then exit.aura run <file>: Serve the app (loads saved weights; does not retrain).aura check <file>: Transpile and preview the generated Ruby.aura build <file>: Export to standalone Ruby.aura deploy <file>: Generate a productionDockerfile(add--target vercelfor LLM-only apps).aura console: Interactive debugging with app context.
Training and serving are separate:
aura trainruns thetrain/evaluateblocks and saves weights;aura runloads those weights and serves, so the server never retrains on boot.
🚢 Deployment
- Torch apps (neural networks, transfer learning, training) run on a
container host (Fly.io, Render, Cloud Run; GPU via Modal or Replicate).
aura deploy <file>generates a productionDockerfile. Torch model servers need LibTorch and a long-lived process, so they are not suited to serverless platforms. - LLM-only / text apps (
from openai/from ollama) run on Vercel's Ruby runtime viaaura deploy <file> --target vercel, or on any container host.
📈 Roadmap
- [x] CNN & Convolutional Layers
- [x] Model Persistence (v1.1)
- [x] Transfer Learning & Schedulers (v1.2)
- [x] Sequence layers (Embedding/LSTM/GRU), LLM config, CSV datasets (v1.3)
- [ ] Distributed Training (v1.4)
- [ ] Native RAG (Retrieval Augmented Generation) Primitives (v1.5)
☕ Support Aura Development
Aura is an open-source project by RootSpace.app. If you find the framework useful, please consider supporting its development.
Support Aura on Stripe (Choose what you pay)
All donations go directly towards maintaining the infrastructure and developing new features like v1.4 Distributed Training.
📜 License
MIT