Local AI Engineering with Ollama (Paperback)
Aymen El Amri
Sold by CitiRetail, Stevenage, United Kingdom
AbeBooks Seller since 29 June 2022
New - Soft cover
Condition: New
Ships from United Kingdom to U.S.A.
Quantity: 1 available
Add to basketSold by CitiRetail, Stevenage, United Kingdom
AbeBooks Seller since 29 June 2022
Condition: New
Quantity: 1 available
Add to basketPaperback. 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 Shipping may be from our UK warehouse or from our Australian or US warehouses, depending on stock availability.
Seller Inventory # 9782488111089
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.
In August 2025, OpenAI retired GPT-4o overnight. In June 2026, an export directive forced Anthropic to suspend Fable 5 and Mythos 5. Teams lost models they had built on in an afternoon. They just did not own what they ran.
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. Where Ollama behaved differently than its own docs, the book says so and pins the version.
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.
"About this title" may belong to another edition of this title.
Orders can be returned within 30 days of receipt.
If you are a consumer you can withdraw from the contract in accordance with the following. Consumer means any natural person who is acting for purposes which are outside his trade, business, craft or profession.
Information regarding the right of withdrawal
Statutory right to withdraw
You have the right to withdraw from this contract within 14 days without giving any reason.
The withdrawal period will expire after 14 days from the day on which you acquire, or a third party other than the carrier and indicated by you acquires, physical possession of the last good or the last lot or piece.
To exercise the right of withdrawal, electronically fill in and submit a clear statement on our website, under "My Purchases" in "My Account". We will communicate to you an acknowledgement of receipt of such a withdrawal on a durable medium (e.g. by e-mail) without delay.
To meet the withdrawal deadline, it is sufficient for you to send your communication concerning your exercise of the right of withdrawal before the withdrawal period has expired.
Effects of withdrawal
If you withdraw from this contract, we will reimburse to you all payments received from you, including the costs of delivery (except for the supplementary costs arising if you chose a type of delivery other than the least expensive type of standard delivery offered by us).
We may make a deduction from the reimbursement for loss in value of any goods supplied, if the loss is the result of unnecessary handling by you.
We will make the reimbursement without undue delay, and not later than 14 days after the day on which we are informed about your decision to withdraw from this contract.
We will make the reimbursement using the same means of payment as you used for the initial transaction, unless you have expressly agreed otherwise; in any event, you will not incur any fees as a result of such reimbursement.
We may withhold reimbursement until we have received the goods back, or you have supplied evidence of having sent back the goods, whichever is the earliest.
You shall send back the goods or hand them over to CitiRetail, Stevenage, United Kingdom, without undue delay and in any event not later than 14 days from the day on which you communicate your withdrawal from this contract to us. The deadline is met if you send back the goods before the period of 14 days has expired. You will have to bear the direct cost of returning the goods. You are only liable for any diminished value of the goods resulting from the handling other than what is necessary to establish the nature, characteristics and functioning of the goods.
Exceptions to the right of withdrawal
The right of withdrawal does not apply to:
Please note that titles are dispatched from our US, Canadian or Australian warehouses. Delivery times specified in shipping terms. Orders ship within 2 business days. Delivery to your door then takes 7-14 days.
| Order quantity | 7 to 60 business days | 7 to 14 business days |
|---|---|---|
| First item | £ 37.00 | £ 37.00 |
Delivery times are set by sellers and vary by carrier and location. Orders passing through Customs may face delays and buyers are responsible for any associated duties or fees. Sellers may contact you regarding additional charges to cover any increased costs to ship your items.