OktoEngine

Professional CLI Engine for Training AI Models

Table of Contents

About OktoEngine

OktoEngine is the official execution engine for OktoScript, developed by OktoSeek AI. It transforms OktoScript configurations into trained, production-ready AI models with a single command.

OktoEngine is engineered to handle models of any size—from millions to billions of parameters. It supports complex training pipelines including full fine-tuning, LoRA adapters, and multi-dataset training with automatic optimization and checkpointing.

Key Capabilities:
  • Train models of any size (millions to billions of parameters)
  • Full fine-tuning and LoRA adapter support
  • Real-time metrics and progress monitoring
  • Automatic dependency installation
  • Built-in upgrade system
  • Comprehensive system diagnostics

What is OktoEngine?

OktoEngine is the official execution engine for OktoScript. It reads your .okt files and executes the complete training pipeline automatically—from dataset loading to model export.

Instead of writing hundreds of lines of Python code, you define your training pipeline in a simple, declarative format, and OktoEngine handles all the complexity behind the scenes.

Traditional Approach vs OktoEngine

❌ Traditional

# Hundreds of lines of Python # Complex configuration # Error-prone setup # Difficult to reproduce

✅ OktoEngine

PROJECT "MyModel" MODEL { base: "gpt2" } DATASET { train: "dataset/train.jsonl" } TRAIN { epochs: 5 } EXPORT { format: ["okm"] }

One command: okto trainTrained model ready for deployment

Key Features

OktoEngine provides everything you need for professional AI model training with autonomous decision-making:

🖥️ Complete CLI Interface

Minimal CLI by design. All intelligence lives in the .okt file. The terminal is just the execution port.

Core Commands: init, validate, train, eval, export, convert
Inference Commands: infer, chat
Analysis Commands: compare, logs, tune
Utility Commands: list, doctor, upgrade, about, exit

🧠 Decision-Driven Training

OktoEngine executes CONTROL blocks that enable autonomous decision-making. Models can self-adjust learning rates, batch sizes, and stop conditions based on real-time metrics.

What makes it unique: Real-time parameter adjustment based on metrics, using CONTROL block logic for decision-making. No manual intervention needed. Adapts to training conditions automatically.

🎯 Advanced Training Capabilities

Training Methods:

  • Full Fine-tuning - Train entire models from scratch with complete parameter updates
  • LoRA Fine-tuning - Efficient adapter-based training (LoRA, QLoRA, PEFT) with minimal memory footprint
  • Multi-dataset Training - Combine multiple datasets with weighted sampling and custom mixing strategies
  • Model Adapters - Apply pre-trained adapters (LoRA/PEFT) to base models for rapid customization

Intelligent Training Control:

  • Automatic checkpointing with smart checkpoint management
  • Real-time metrics monitoring with live updates
  • CONTROL block with conditional logic (IF, WHEN, EVERY) for autonomous decision-making
  • Auto-parameter adjustment (learning rate, batch size, early stopping)
  • Memory-aware training (automatically reduces batch size when GPU memory is low)

📊 Real-time Metrics & Monitoring

Monitor training progress, loss, learning rate, GPU usage, and CONTROL decisions in real-time directly in your terminal. MONITOR block tracks any metric you specify.

🛡️ Safety & Governance

Built-in GUARD block for safety and ethics protection (hallucination, toxicity, bias detection). BEHAVIOR block controls model personality, verbosity, language, and response style. SECURITY block for input/output validation, rate limiting, and encryption.

🔄 Model Conversion

Convert models between formats: PyTorch, ONNX, GGUF, TFLite, OktoModel, SafeTensors. Perfect for deployment to different targets (web, mobile, local inference).

💬 Interactive Chat

Start interactive chat sessions with trained models. Uses BEHAVIOR settings, enforces GUARD rules, and supports session context. Type /exit to quit.

🐛 Debug Mode

Comprehensive debug logging for troubleshooting and understanding execution flow with detailed diagnostics. Enable with --debug flag for verbose output.

🔄 Auto Updates

Built-in upgrade system that automatically downloads and installs the latest version from GitHub Releases. Simply run okto upgrade to stay up-to-date.

🏥 System Diagnostics

Comprehensive environment checking with automatic dependency installation and system health monitoring. Use okto doctor to check your system, or okto doctor --install to automatically fix issues.

CLI Commands

OktoEngine provides a complete CLI interface for working with OktoScript files. These commands are available both in the terminal and are called by the OktoSeek IDE.

Terminal
$ okto init my-project
✅ Project 'my-project' initialized successfully!
$ okto validate
✅ Validation passed! No errors or warnings.
$ okto train
🚀 Starting training pipeline...
$ okto doctor
✅ Diagnostics complete
$ okto upgrade
✅ Updated successfully to v0.1.0

Core Commands

okto init

Initialize a new OktoScript project with boilerplate configuration.

okto init my-project

okto validate

Validate OktoScript files for syntax errors and configuration issues.

okto validate train.okt

okto train

Train models from OktoScript configurations with real-time metrics and autonomous CONTROL decisions.

okto train okto train --debug # Enable debug mode

okto eval

Evaluate trained models against test datasets.

okto eval script.okt

okto export

Export trained models to multiple formats (ONNX, GGUF, TFLite, OktoModel, etc.).

okto export script.okt okto export --format onnx

okto convert

Convert models between different formats. Perfect for deployment to different targets.

okto convert --input model.pt --from pt --to gguf --output model.gguf okto convert --input model.pt --from pt --to onnx --output model.onnx okto convert --input model.pt --from pt --to tflite --output model.tflite

Supported formats: pt, bin, onnx, tflite, gguf, okm, safetensors

Inference Commands

okto infer

Run direct inference on a trained model (single input/output). Automatically respects BEHAVIOR, GUARD, INFERENCE, and CONTROL blocks.

okto infer --model models/chatbot.okm --text "Good evening, I want a pizza"
Terminal - Inference
$ okto infer --model models/pizzabot.okm --text "Good evening, I want a pizza"
🐙 OktoEngine v0.1
🤖 Loading model: models/pizzabot.okm
📋 Model Configuration:
✓ BEHAVIOR: friendly, medium verbosity, English
✓ GUARD: toxicity, bias, hallucination protection enabled
✓ INFERENCE: temperature=0.7, max_length=120
💭 Input: "Good evening, I want a pizza"
🤖 Processing...
✓ Guard check passed
✓ Inference parameters applied
✓ CONTROL rules evaluated
📤 Output: "Good evening! I'd be happy to help you order a pizza. What size and toppings would you like?"
✅ Inference completed in 0.23s

okto chat

Start an interactive chat session with a trained model. Uses BEHAVIOR settings, enforces GUARD rules, and supports session context.

okto chat --model models/chatbot.okm
Terminal - Chat Session
🟢 Okto Chat started (type '/exit' to quit)
You: hi
Bot: Hello! How can I help you today?
You: what flavors do you have?
Bot: We have a great selection of pizza flavors! Here are some popular options:
• Margherita - Classic tomato, mozzarella, and basil
• Pepperoni - Spicy pepperoni with mozzarella
• Four Cheese - Mozzarella, gorgonzola, parmesan, and provolone
• Hawaiian - Ham and pineapple
• Vegetarian - Fresh vegetables and herbs
What sounds good to you?
You: /exit
🔴 Session ended
📊 Session Summary:
Messages: 6 (3 user, 3 bot)
Duration: 2m 15s
Guard checks: 3 (all passed)

Analysis Commands

okto compare

Compare two trained models using the same test inputs. Compares latency, accuracy, loss, and resource usage.

okto compare models/v1.okm models/v2.okm

Perfect for A/B testing. Shows detailed comparison table with recommendations.

okto logs

View historical training logs and metrics saved by CONTROL and MONITOR blocks.

okto logs my-model

Shows loss per epoch, validation loss, accuracy, CPU/GPU/RAM usage, and decisions made by CONTROL block.

okto tune

Auto-tune training parameters using the CONTROL block for intelligent optimization.

okto tune script.okt

Uses CONTROL block logic to auto-adjust training. Can adjust learning rate dynamically, change batch size based on memory, activate early stopping, and balance classes automatically. This is unique in the market.

Utility Commands

okto list

List available projects, models, datasets, or exports.

okto list projects okto list models okto list datasets okto list exports

okto doctor

System diagnostics and automatic dependency installation.

okto doctor # Check system okto doctor --install # Auto-install missing dependencies

okto upgrade

Automatically update to the latest version from GitHub Releases.

okto upgrade

okto about

Display information about OktoScript and OktoEngine.

okto about

okto exit

Exit interactive mode (chat, tune, or other interactive sessions).

okto exit

Training Capabilities

OktoEngine is designed to train models of any size with enterprise-grade reliability:

📈 Models of Any Size

  • Small Models (1M - 100M): Fast training, minimal resources
  • Medium Models (100M - 1B): Balanced performance
  • Large Models (1B - 7B): Requires GPU, optimized training
  • Very Large Models (7B+): Enterprise-grade, multi-GPU support

🔧 Training Methods

  • Full Fine-tuning: Train entire models from scratch with complete parameter updates
  • LoRA Fine-tuning: Efficient adapter-based training (LoRA, QLoRA, PEFT) with minimal memory footprint
  • Multi-dataset Training: Combine multiple datasets with weighted sampling and custom mixing strategies
  • Model Adapters: Apply pre-trained adapters (LoRA/PEFT) to base models for rapid customization

🧠 Intelligent Training Control

  • CONTROL Block: Define conditional logic (IF, WHEN, EVERY) for autonomous decision-making
  • Auto-parameter Adjustment: Automatically adjust learning rate, batch size, and other parameters based on metrics
  • Early Stopping: Intelligent stopping when model performance plateaus or diverges
  • Memory-aware Training: Automatically reduce batch size when GPU memory is low
  • MONITOR Block: Track any metric (loss, accuracy, GPU usage, throughput, latency, confidence, etc.)

⚡ Automatic Optimizations

  • Mixed Precision Training (FP16/BF16)
  • Gradient Accumulation
  • Automatic Device Selection (CPU/GPU)
  • Memory Optimization
  • Checkpoint Management
  • STABILITY Block for training safety (NaN detection, divergence prevention)
  • EXPLORER Block for AutoML-style hyperparameter search

🛡️ Safety & Governance

  • GUARD Block: Safety and ethics protection (hallucination, toxicity, bias detection)
  • BEHAVIOR Block: Control model personality, verbosity, language, and response style
  • SECURITY Block: Input/output validation, rate limiting, and encryption

🚀 Get Started in 3 Steps

Start training AI models in minutes:

1️⃣ Download

Download the latest release for your platform (Windows, Linux, or macOS) from GitHub Releases.

Download from GitHub Releases →

2️⃣ Initialize

Run okto init my-project to create a new project with boilerplate configuration.

okto init my-project

3️⃣ Train

Run okto train and watch your model train with real-time metrics in the terminal.

okto train

Integration with OktoSeek IDE

OktoEngine will be integrated into OktoSeek IDE for visual training workflows:

  • 🎯 Visual Pipeline Builder - Drag-and-drop training configuration
  • 📊 Real-time Dashboard - Live training metrics and visualization
  • 🔄 One-click Training - Train models directly from the IDE
  • 📁 Project Management - Organize and manage multiple training projects

Download OktoEngine

OktoEngine is available for Windows, Linux, and macOS. Download the latest release from GitHub Releases.

Download from GitHub Releases →

Your platform will be automatically detected. You can also use okto upgrade to automatically update to the latest version.