🌟 Aura: The Advanced AI Web Framework (v1.3.0)

A RootSpace.app Product
Founded and Developed by John V. Teixido

Ruby Version Gem Version

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 layers embedding, lstm, and gru.
  • Transfer Learning: Bootstrap with pre-trained architectures (ResNet, etc.) via transfer from :model_name, with freeze/unfreeze and a new head.
  • Advanced Training: Declarative LR schedulers (StepLR, ExponentialLR, CosineAnnealingLR), optimizers, metrics, and a train/serve split.
  • Datasets: built-in MNIST / Fashion-MNIST / CIFAR loaders, plus CSV (train m on "data.csv").
  • LLMs: from openai / from ollama with a config block (system, temperature, max_tokens).
  • Serving: typed JSON routes, bearer-token auth, predict(...) as :label post-processing, and an automatic /health endpoint.
  • Model Persistence: native save / load weight 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 require torch-rb and 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 / deploy transpile this to a standalone Sinatra app with no extra setup. Training and serving need torch-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 production Dockerfile (add --target vercel for LLM-only apps).
  • aura console: Interactive debugging with app context.

Training and serving are separate: aura train runs the train/evaluate blocks and saves weights; aura run loads 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 production Dockerfile. 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 via aura 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