Local AI Engineering with Ollama: Run, understand, customize, fine-tune, and build agentic apps on your own hardware
Paperback
ISBN13: 9782488111089
Publisher: Faun.Dev
Published: Jun 18 2026
Pages: 278
Weight: 1.07
Height: 0.58 Width: 7.00 Depth: 10.00
Language: English
The model you depend on lives on someone else's hardware. They can change the price, change the rules, or retire it entirely, and you cannot stop them.
Local AI Engineering with Ollama is how you stop renting and start owning. You take the model, the price, and the rules back into your own hands: run any model you want, when you want, where you want, and change how it behaves without a meter running.
This is a practical book for developers who can run a command and edit a file but have no Machine Learning degree and want none. It skips the marketing and jumps into building things that run, on hardware you already own, with the network unplugged. Every command was executed on a real machine, and every output you see (JSON responses, error messages, token counts, training logs) came from an actual session, not from documentation.
This book moves in one direction: from running your first model to shipping an agent that runs on your own hardware. Each chapter ends with something working, and each skill below builds on the one before it. By the end you will be able to:
Understand what a model is actually doing: Tokens, predictions, weights, embeddings, attention, and the KV cache, each tied to a setting you will change.
Install Ollama and size your hardware honestly: Install the runtime and tell if a model fits your RAM or VRAM before downloading.
Pick, pull, and manage models: Read the Ollama and Hugging Face GGUF repos, choose quantization, and manage disk and memory.
Drive Ollama from its API: Run models over HTTP from your code, and read tokens-per-second to compare on numbers.
Control the context window: Size it so the model stops forgetting, and see what gets sent each turn.
Operate a model under real conditions: Tune temperature, top_p, top_k, penalties, seed, keep-alive, and concurrency.
Package a custom model with a Modelfile: One job, the same way every time, shipped as a single artifact.
Fine-tune a model on your own data: Train Granite for English-to-SQL with QLoRA and Unsloth, then export to GGUF.
Build against the Python SDK: Build Python programs with typed responses, ending in a management CLI.
Build a working chat loop and see why it forgets: Write a REPL, then watch it fail to recall the last turn.
Give the conversation a memory: Resend a running message list so the assistant follows the conversation.
Stream replies and accept multi-line input: Print tokens as they arrive, and take multi-line prompts.
Keep long chats inside the context window: Drop the oldest turns so the prompt never overflows.
Summarize old turns instead of dropping them: Condense earlier messages with a second model through LangChain.
Cache replies in Redis: Return repeated questions instantly, cutting latency and wasted compute.
Add long-term memory that survives restarts: Wire in mem0 to recall user facts across sessions.
Give the model tools to fetch live data: Add function calling, guarded against inventing numbers.
Source those tools from an external MCP server: Serve tools over MCP, turning M times N into M plus N.
Put a graphical interface in front of Ollama: Run Open WebUI in Docker, chat with your documents, lock it down for a team.
If you can run a command and edit a file, you are qualified! Downloadable code included.
So what are you waiting for to stop renting, start owning, and get a model running tonight?
Also from
El Amri, Aymen
LLM Prompt Engineering For Developers: The Art and Science of Unlocking LLMs' True Potential
El Amri, Aymen
Paperback
GitOps the Hard Way, with Argo CD: Build Real GitOps Pipelines From Empty Clusters to Automated Deploys
El Amri, Aymen
Paperback
Also in
General Computers
All Data Are Local: Thinking Critically in a Data-Driven Society
Loukissas, Yanni Alexander
Paperback
Comptia Network+ Certmike: Prepare. Practice. Pass the Test! Get Certified!: Exam N10-008
Chapple, Mike
Zacker, Craig
Paperback
Interactive Theorem Proving and Program Development: Coq'art: The Calculus of Inductive Constructions
Castéran, Pierre
Bertot, Yves
Hardcover
R for Data Science: Import, Tidy, Transform, Visualize, and Model Data
Wickham, Hadley
Grolemund, Garrett
Paperback
The Reverse Centaur's Guide to Life After AI: How to Think about Artificial Intelligence--Before It's Too Late
Doctorow, Cory
Paperback
The Agi Chronicles: The Inside Story of the Race to Create an Artificial Superintelligence
Roose, Kevin
Hardcover
Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems
Kleppmann, Martin
Riccomini, Chris
Paperback
The Year in Tech, 2027: The Insights You Need from Harvard Business Review
Chamorro-Premuzic, Tomas
Review, Harvard Business
Davenport, Thomas H.
Paperback
AI for Good: How Real People Are Using Artificial Intelligence to Fix Things That Matter
Tyrangiel, Josh
Hardcover
If Anyone Builds It, Everyone Dies: Why Superhuman AI Would Kill Us All
Soares, Nate
Yudkowsky, Eliezer
Hardcover
Human Raised: Nurturing Connection, Curiosity & Lifelong Learning in the Age of AI
Suskind, Dana, MD
Hardcover
The Eureka Machine: Why AI Is the Key to Unlocking a New Era of Scientific Discoveries
Socher, Richard
Hardcover
Hbr's 10 Must Reads on AI (with Bonus Article How to Win with Machine Learning by Ajay Agrawal, Joshua Gans, and AVI Goldfarb)
Iansiti, Marco
Davenport, Thomas H.
Review, Harvard Business
Paperback
The Year in Tech, 2026: The Insights You Need from Harvard Business Review
Review, Harvard Business
Anthony, Scott D.
Webb, Amy
Paperback
CompTIA Network+ Certification All-in-One Exam Guide, Ninth Edition (Exam N10-009)
Weissman, Jonathan S.
Paperback
The AI Con: How to Fight Big Tech's Hype and Create the Future We Want
Bender, Emily M.
Hanna, Alex
Hardcover
Fans First: Change The Game, Break the Rules & Create an Unforgettable Experience
Cole, Jesse
Paperback
Generative Ai: The Insights You Need from Harvard Business Review
Review, Harvard Business
Mollick, Ethan
Cremer, David De
Paperback
A Giant Leap: How AI Is Transforming Healthcare and What That Means for Our Future
Wachter, Robert
Hardcover
AI Literacy in Any Class: Preparing Students to Thrive in an AI Future in Any Grade Level or Content Area
Miller, Matt
Paperback
Obsolete: The AI Industry's Trillion Dollar Race to Replace Us--And How to Stop It
Lovely, Garrison
Paperback
Fundamentals of Data Engineering: Plan and Build Robust Data Systems
Reis, Joe
Housley, Matt
Paperback
Minecraft: Guide Collection 4-Book Boxed Set (Updated): Survival (Updated), Creative (Updated), Redstone (Updated), Combat
Mojang Ab
The Official Minecraft Team
Hardcover
Love Machines: How Artificial Intelligence Is Transforming Our Relationships
Muldoon, James
Hardcover
Atlas of AI: Power, Politics, and the Planetary Costs of Artificial Intelligence
Crawford, Kate
Paperback
AI Snake Oil: What Artificial Intelligence Can Do, What It Can't, and How to Tell the Difference
Narayanan, Arvind
Kapoor, Sayash
Paperback
AI with Intention: Principles and Action Steps for Teachers and School Leaders
Frontier, Tony
Paperback
Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming
Matthes, Eric
Paperback
AP Computer Science Principles Premium, 2027: 6 Practice Tests + Comprehensive Review + Online Practice
Reichelson, Seth
Paperback
An Illustrated Guide to AI Agents: Concepts and Code for Building Agents with Llms, Tools, and Memory
Grootendorst, Maarten
Alammar, Jay
Paperback
Hbr's 10 Must Reads on Artificial Intelligence, Updated and Expanded (Featuring How AI Can Help Managers Think Through Problems by Elisa Farri and Gab
Review, Harvard Business
Davenport, Thomas H.
Agrawal, Ajay
Paperback
The Thinking Machine: Jensen Huang, Nvidia, and the World's Most Coveted Microchip
Witt, Stephen
Hardcover
Hands-On Machine Learning with Scikit-Learn and Pytorch: Concepts, Tools, and Techniques to Build Intelligent Systems
Géron, Aurélien
Paperback
The Black Swan: Second Edition: The Impact of the Highly Improbable: With a New Section: On Robustness and Fragility
Taleb, Nassim Nicholas
Paperback
We Are as Gods: A Survival Guide for the Age of Abundance
Diamandis, Peter H.
Kotler, Steven
Hardcover
Embedded Systems with ARM Cortex-M Microcontrollers in Assembly Language and C: Fourth Edition
Zhu, Yifeng
Paperback
CompTIA Tech+ Certification All-in-One Exam Guide, Third Edition (Exam FC0-U71)
Wempen, Faithe
Paperback
Artificial Intelligence: A Guide for Thinking Humans (with a New Preface)
Mitchell, Melanie
Paperback
AP Computer Science a Premium, 13th Edition: Prep Book with 6 Practice Tests + Comprehensive Review + Online Practice (2026)
Teukolsky, Roselyn, M. S.
Carman, Chris
Paperback
Human + Machine, Updated and Expanded: Reimagining Work in the Age of AI
Daugherty, Paul R.
Wilson, H. James
Hardcover
Hands-On Large Language Models: Language Understanding and Generation
Grootendorst, Maarten
Alammar, Jay
Paperback
Guilty Pleasure: The Pornification of the Internet, the Economy, and Everything Else
Nilsson, Patricia
Hardcover
Power and Prediction: The Disruptive Economics of Artificial Intelligence
Gans, Joshua
Goldfarb, Avi
Agrawal, Ajay
Hardcover
Fundamentals of Software Architecture: A Modern Engineering Approach
Ford, Neal
Richards, Mark
Paperback
The Empty Center: Permission, Connection, and What We Build When the Future is Uncertain
Drumwright, Hayes
Hardcover
The Problem with Personalization: How Advertisers Learned to Make and Break Us from Ancient Times to the AI Age
Turow, Joseph
Hardcover
Minecraft: Exploded Builds: Medieval Fortress: An Official Mojang Book
The Official Minecraft Team
Mojang Ab
Paperback
Tubes: A Journey to the Center of the Internet with a New Introduction by the Author
Blum, Andrew
Paperback
AI Projects with Raspberry Pi: High-Performance Artificial Intelligence for Robotics, Security, Home Automation, and Vision
Hattersley, Lucy
Jepson, Brian
Paperback
RHCSA Red Hat Enterprise Linux 10: Training and Exam Preparation Guide (EX200), Fourth Edition
Ghori, Asghar
Paperback
You Look Like a Thing and I Love You: How Artificial Intelligence Works and Why It's Making the World a Weirder Place
Shane, Janelle
Paperback
The Empty Center: Permission, Connection, and What We Build When the Future is Uncertain
Drumwright, Hayes
Paperback
The Coming Wave: Technology, Power, and the Twenty-First Century's Greatest Dilemma
Suleyman, Mustafa
Hardcover
Designing Machine Learning Systems: An Iterative Process for Production-Ready Applications
Huyen, Chip
Paperback
Site Reliability Engineering: How Google Runs Production Systems
Jones, Chris
Leng, Christof
Beyer, Betsy
Paperback
AI Snake Oil: What Artificial Intelligence Can Do, What It Can't, and How to Tell the Difference
Narayanan, Arvind
Kapoor, Sayash
Hardcover
Artificial Intelligence All-In-One for Dummies
Massaron, Luca
Minnick, Chris
Mueller, John Paul
Paperback
The Death of Expertise: The Campaign Against Established Knowledge and Why It Matters
Nichols, Tom
Paperback
Graphic Artists Guild Handbook, 17th Edition: Pricing & Ethical Guidelines
The Graphic Artists Guild
Paperback
Minecraft: Roll for Adventure: The Temple of the Charged Creeper
Forbeck, Marty
Forbeck, Matt
Hardcover
The Devops Handbook, 2nd Edition: How to Create World-Class Agility, Reliability, & Security in Technology Organizations
Debois, Patrick
Kim, Gene
Humble, Jez
Paperback
The Return on AI: From Promise to Profit in the Age of Intelligent Business
Sawhney, Mohanbir
Mittal, Ashwin
Paperback
Comptia A+ Complete Study Guide, 2-Volume Set: Volume 1 Core 1 Exam 220-1201 and Volume 2 Core 2 Exam 220-1202
Buhagiar, Jon
Docter, Quentin
Paperback
Navigeren door het labyrint: Een handleiding voor het beheer van data
Sebastian-Coleman, Laura
Paperback
R for Data Science: Import, Tidy, Transform, Visualize, and Model Data
Grolemund, Garrett
Cetinkaya-Rundel, Mine
Wickham, Hadley
Paperback
AI for Educators: Learning Strategies, Teacher Efficiencies, and a Vision for an Artificial Intelligence Future
Miller, Matt
Paperback
What Is Intelligence?: Lessons from AI about Evolution, Computing, and Minds
Aguera Y. Arcas, Blaise
Paperback
More Human: How the Power of AI Can Transform the Way You Lead
Hougaard, Rasmus
Carter, Jacqueline
Hardcover
Evals for AI Engineers: Systematically Measuring and Improving AI Applications
Husain, Hamel
Shankar, Shreya
Paperback
Microsoft 365 Excel All-In-One for Dummies
Ringstrom, David H.
Alexander, Michael
Kusleika, Dick
Paperback
