Leanpub Header

Skip to main content

Run Jev-Style System One Models Locally

A Complete Guide to Ollaya and Local Decision Models

Run Jev-Style System One Models Locally
This book is 100% completeLast updated on 2026-09-26

Run Jev-style decision models on your own hardware with Ollaya. Learn how these fast, structured models differ from LLMs, then build real applications with typed outputs, Python, JavaScript and MCP. From first setup to production, this practical guide shows you how to make AI faster, cheaper and more private.

Minimum price

$25.00

$35.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
242
Pages
About

About

About the Book

This book teaches you how to run decision models, a distinct class of AI systems optimized for fast, structured judgments, entirely on your own hardware using the open-source Ollaya project. You will learn what Jev-style decision models are, how they differ from conventional large language models, and why that difference matters for building reliable software. From installation to production deployment, this guide walks you through installing Ollaya, pulling models, defining typed questions, calling the API from Python and JavaScript, integrating with AI agents via MCP, designing decision schemas that work in the real world, measuring performance, and operating a local decision service at scale. By the end, you will be able to take a problem that currently uses an LLM, cost money, and leaks data to the cloud, and replace it with a local model that answers in milliseconds with typed outputs your code can act on directly.

Author

About the Author

Steve Publications

Steve is a technology professional with more than 20 years of experience in software development, server infrastructure, cybersecurity, vulnerability research and reverse engineering. Throughout his career, he has designed, secured, analyzed and tested complex software and infrastructure, with a particular focus on understanding how systems fail and how they can be made more secure.

Outside of work, Steve enjoys sharing knowledge with the technology community. He collaborates with researchers, industry experts and technology professionals to write practical books covering software development, cybersecurity, cloud computing, networking, DevOps, artificial intelligence and enterprise technologies. His books focus on practical learning through clear explanations, real-world examples and hands-on exercises. With more than two decades of industry experience, his goal is to help IT professionals, students and technology enthusiasts build useful skills and stay current in a rapidly changing industry.

We believe readers deserve to know how our books are created. Most of our authors are not native English speakers, so we use AI to help translate, proofread manuscripts, fix grammar, improve sentence structure and make technical explanations easier to read. AI is used as an editing tool only. It does not replace the research, technical knowledge or hands-on experience behind our books. Some of our authors also prefer to remain anonymous for privacy or professional reasons. In those cases, we publish their work under a different name. The author's name may be different, but the quality of the content and our review process remain the same.

Every book is written, reviewed and maintained by experienced technology professionals, with contributions from our private technical community of more than 420 engineers and researchers. We spend far more time validating technical accuracy and keeping our content up to date than generating text. We are always interested in working with experienced professionals who have deep expertise in a particular technology or domain. If you would like to publish a book with us or help review an existing manuscript, we'd love to hear from you. Send us a message describing your area of expertise. We are especially interested in niche technologies, specialized skills and emerging topics that are underrepresented in existing technical literature.

If you look through the contents of our books, you'll see practical examples, detailed explanations and material that is regularly updated. Our goal is to publish books that professionals can actually rely on, not low-effort AI-generated content. If you ever feel that one of our books does not meet that standard, Leanpub offers a 60-day money-back guarantee. Feel free to request a refund if you are not satisfied with your purchase.

Contents

Table of Contents

A Complete Guide to Ollaya and Local Decision Models

Introduction

Chapter 1: What Is a Decision Model?

  1. The Problem LLMs Were Never Built to Solve
  2. Decision Models vs. Language Models: Different Jobs
  3. Why Structure Matters in AI Systems
  4. Enter the Jev Paradigm
  5. What You Will Learn From This Book

Chapter 2: Jev-Style Decision Models: From First Principles

  1. The Jev System: Origins and Purpose
  2. State, Questions and Choices: Core Primitives
  3. Typed Decisions and Probability Distributions
  4. Confidence, Calibration and Score Interpretation
  5. Single-Pass Inference and the No-Generation Constraint
  6. How Decision Models Avoid Hallucination by Design

Chapter 3: Architecture Comparison: Decision Models vs. LLMs

  1. Training Objectives and Loss Functions
  2. Output Spaces: Tokens vs. Typed Decisions
  3. Inference Behavior and Compute Patterns
  4. Latency, Throughput and Memory Usage
  5. Probability Interpretation and Calibration
  6. Hallucination, Determinism and Reliability
  7. Cost, Privacy and Operational Characteristics
  8. Summary: When to Use Each

Chapter 4: The Ollaya Project: Landscape and Positioning

  1. What Is Ollaya?
  2. Ollaya, Jev and TypeSafe: Mapping the Relationships
  3. Open Decision Models and Compatibility
  4. What “Jev-Style” and “Jev-Compatible” Actually Mean
  5. Project History, Community and Governance
  6. Getting Started Prerequisites

Chapter 5: Installing Ollaya

  1. Supported Operating Systems
  2. Hardware Requirements and Recommendations
  3. Installation via Install Script (Linux/macOS)
  4. Installation via Package Managers
  5. Docker and Containerized Installation
  6. Verifying Your Installation
  7. CPU vs. GPU Execution Setup
  8. Environment Variables and Server Configuration
  9. Troubleshooting Installation
  10. Next Steps

Chapter 6: Your First Local Decision Model

  1. Understanding the Model Registry
  2. Pulling Your First Model
  3. Running a Model with ollaya run
  4. Reading the Output: Decisions, Scores and Confidence
  5. Listing Installed Models
  6. Inspecting Model Details with show
  7. Stopping and Managing Running Models
  8. Interactive REPL Mode
  9. Removing Models
  10. Your First Custom Questions

Chapter 7: The Ollaya Command-Line Reference

  1. Command Overview
  2. The Pull Command: Fetching Models
  3. The Run Command: Inference Basics
  4. The List Command: Inventory Management
  5. The Show Command: Model Metadata
  6. The Ps and Stop Commands: Process Control
  7. The Create, Cp and Rm Commands: Lifecycle
  8. Environment Variables and Configuration
  9. Advanced Run Patterns
  10. Summary Table

Chapter 8: Modelfiles and Custom Model Configurations

  1. What Is a Modelfile?
  2. Modelfile Syntax and Structure
  3. Defining Question Sets and Choice Spaces
  4. Building a Custom Model from Scratch
  5. Model Presets and Inheritance
  6. Calibration Settings
  7. Parameter Settings
  8. Validation and Testing Your Custom Models

Chapter 9: Running a Local Ollaya Daemon

  1. Starting the Ollaya Server
  2. Server Configuration and Ports
  3. Authentication and Access Control
  4. Resource Limits and Process Management
  5. Health Checks and Monitoring
  6. Running Ollaya as a Systemd Service (Linux)
  7. Running Ollaya in Docker
  8. Security Considerations
  9. Next Steps

Chapter 10: The Local Decision Model API

  1. API Endpoints Overview
  2. The Generate/Run Endpoint
  3. Request Format: Questions, State and Options
  4. Response Format: Decisions, Scores and Metadata
  5. Streaming and Batch Requests
  6. Error Handling and Status Codes
  7. API Examples with curl

Chapter 11: Integrating with Python

  1. Setting Up a Python Project for Ollaya
  2. Making API Calls with requests and httpx
  3. Building a Typed Client Library
  4. Error Handling and Retries
  5. Batch Processing and Concurrency
  6. Production Python Integration Example

Chapter 12: Integrating with JavaScript and TypeScript

  1. Node.js Integration Patterns
  2. TypeScript Type Definitions for Decision Responses
  3. Browser-Based Calls to Local Ollaya
  4. Error Handling and Resilience
  5. Full Example: TypeScript Decision Service Client
  6. Express.js Integration Example

Chapter 13: The TypeSafe API and Jev Integration Patterns

  1. What Is the TypeSafe API?
  2. Cloud Jev vs. Local Ollaya: API Alignment
  3. Migrating from TypeSafe Cloud to Local Endpoints
  4. What Changes, What Stays the Same
  5. Configuration and Environment Management
  6. Type-Safe Decision Handling in Your Code

Chapter 14: Designing Good Decision Schemas

  1. Principles of Typed Question Design
  2. Label Space Construction and Granularity
  3. Score Ranges and Thresholds
  4. Decision Hierarchies and Multi-Stage Decisions
  5. Abstention and Human-in-the-Loop Patterns
  6. Schema Evolution and Versioning

Chapter 15: Real-World Application: Customer Support Triage

  1. Problem Statement and Requirements
  2. Decision Schema Design for Triage
  3. Building the Ollaya Modelfile
  4. Implementing the Application Backend
  5. Integration with Messaging and Routing
  6. Testing and Validation

Chapter 16: Real-World Application: Intent Classification and Routing

  1. Intent Classification as a Decision Problem
  2. Designing the Intent Schema
  3. Implementing the Router Service
  4. Tool Selection and Agent Integration
  5. Handling Ambiguity and Edge Cases

Chapter 17: Real-World Application: Moderation and Risk Signals

  1. Moderation as Structured Decision-Making
  2. Multi-Label Decision Schemas
  3. Confidence Thresholds and Escalation
  4. Combining Signals for Risk Assessment
  5. Audit Trails and Explainability

Chapter 18: Hybrid Architectures: LLMs and Decision Models Together

  1. Division of Labor: What Each Model Should Do
  2. Decision Models as Gatekeepers for LLMs
  3. LLMs Generating Candidates, Decision Models Scoring
  4. Architectural Patterns and Diagrams
  5. Cost and Latency Considerations

Chapter 19: MCP and Agent Integration

  1. Understanding MCP for Decision Models
  2. Ollaya as an MCP Server
  3. Integrating Decision Models into Agentic Workflows
  4. Tool Calling with Decision Outputs
  5. Practical Integration Examples

Chapter 20: Evaluation and Validation

  1. Evaluation Metrics for Decision Models
  2. Building a Golden Dataset
  3. Accuracy, Precision, Recall and Calibration
  4. A/B Testing Decision Schemas
  5. Continuous Evaluation Pipelines

Chapter 21: Performance, Benchmarking and Optimization

  1. Benchmarking Methodology
  2. Latency and Throughput Measurements
  3. CPU vs. GPU Performance
  4. Batching and Concurrency Strategies
  5. Memory Management and Model Loading
  6. Caching and Optimization Techniques

Chapter 22: Observability, Logging and Debugging

  1. Logging Decisions and Metadata
  2. Structured Logs and Observability Tools
  3. Debugging Decision Outputs
  4. Tracing Decision Paths
  5. Performance Monitoring Dashboards

Chapter 23: Security and Privacy

  1. Data Privacy Advantages of Local Execution
  2. Network Security and API Hardening
  3. Model Integrity and Supply Chain
  4. Input Validation and Abuse Prevention
  5. Compliance and Regulatory Considerations

Chapter 24: Production Deployment

  1. Deployment Architecture Patterns
  2. Kubernetes and Container Orchestration
  3. Autoscaling and Load Balancing
  4. Multi-Model Serving and Routing
  5. Backup, Recovery and Disaster Planning

Chapter 25: Conclusion: The Future of Local Decision Models

  1. What We Have Learned
  2. The Case for Decision Models in Modern AI
  3. Trends and Open Questions
  4. Next Steps for Practitioners

References

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub