
Meet Ridgeway Field Services, a fictional company that wants to replace a proprietary AI service with an open-source LLM it runs itself. See the seven-step method this course follows (inventory, license, evaluate, size, secure, integrate, decide) and the evidence you will build. All course resources, including the Ridgeway lab kit and Lab Setup Guide, are in this lecture.
Learn why "open" is a marketing label, and how open weights, source-available and open source are three different claims. Check what a model release actually gives you: weights, code, training data and terms.
Work through the Open Source Initiative's Open Source AI Definition: the four freedoms, the three components (data information, code and parameters), and why most popular open-weight models don't meet it.
A dated snapshot of today's open-weight model families, sizes and license types, plus the traits that outlast any ranking: parameter count, dense versus mixture of experts, context window and license.
First lab: use Ollama to list local models, record exact builds by digest, quantization, size and license line, and record the gaps honestly. The model inventory is the foundation for every later decision.
Check the separate terms that cover weights, code, data and hosted services. Compare Apache 2.0, MIT and community model licenses, and see why a model's popularity says nothing about its permissions.
Learn the seven kinds of restrictive clause in AI model licenses: use bans, user-count thresholds, naming requirements, output and training limits, field-of-use limits, revocation and fee conditions.
Read a model card for intended use, limitations and training data, then trace lineage: base models, fine-tunes and quantized builds, and which terms a derivative model inherits.
Understand how a community definition (OSI), a law (the EU AI Act and its general-purpose AI obligations) and a contract (the license) answer three different questions about an open model.
When license terms are unclear, write a short legal review brief that a lawyer can answer quickly: the use case, the exact clause, the options and the decision needed.
Define the job, the critical errors that matter, the held-out test set and the bar a model must clear, before testing any LLM. Ridgeway's task: turning technician job notes into structured work orders.
Six common LLM use types (structured extraction, RAG over documents, coding, tool-using agents, multilingual and on-device) and the model traits and tests that decide fit for each. Why narrow tasks often suit smaller models.
Use LLM leaderboards and benchmarks without being fooled: five questions to ask of any score, plus benchmark contamination, saturation and task mismatch. Leaderboards build longlists; your own test decides.
Run a fair model comparison on forty held-out notes: same prompt, schema and settings. Compare critical errors first, add a human pass with a scoring rubric, and judge results against the bar.
Break evaluation results down by slice (clear, Spanish, long and tricky notes) to find where a model really fails, including a prompt injection the model obeyed, and match each failure to a fix.
Lab: run the extraction and scoring scripts against a local model in Ollama, then compare three settings to see what an enforced JSON schema and thinking mode do to validity and speed.
Estimate LLM memory from parameters and bits per weight, size the KV cache by context length and concurrency, and plan headroom. Check the arithmetic against Ollama's real memory use.
Compare inference runtimes (Ollama, llama.cpp, vLLM and LM Studio), the GGUF and safetensors file formats, and what OpenAI-compatible APIs do and don't promise when you self-host an LLM.
Lab: run the preflight script to estimate and measure memory at three context sizes, check headroom, and time real requests for latency and throughput before promising any hardware.
Lab: compare Q4 and Q8 quantized builds of the same model on the held-out notes. See what quantization changed in accuracy, safety, speed and memory, and why speed figures belong to their hardware.
Climb the adaptation ladder: prompt wording, examples, code checks, retrieval (RAG), LoRA adapters and full fine-tuning. Learn when fine-tuning an open model is worth it, and what it takes.
Treat model files like software: avoid pickle files that can run code, prefer GGUF and safetensors, avoid untrusted remote code, and verify the source, pinned revision and SHA-256 hash before loading.
See what a local Ollama API exposes, keep the runtime on localhost, and put a gateway in front with per-service keys, a route allowlist, size and rate limits, and logging that never stores sensitive text.
Lab: test prompt injection in English and Spanish, empty and oversized inputs, an invented site ID, a dead endpoint, timeouts and request bursts, and prove that input and output guards catch what the model misses.
Lab: one small Python client for a self-hosted LLM, with input and output guards, six result statuses, sensible retries, a retry queue and a metadata-only log. Run it, then break the endpoint.
Write the output contract your software relies on, turn it into a contract test that gates every change, and see why contract tests and held-out evaluation are two separate gates.
Compare four deployment patterns (proprietary API, hosted open model, self-hosted and hybrid) by where data goes, who controls versions and what you operate, then apply them to Ridgeway's customer clause.
Pin models by digest, take every change through the upgrade path (contract test, held-out evaluation and shadow run), and keep rollback ready with agreed triggers.
Name an owner for each area, set a weekly, monthly and quarterly rhythm, read the weekly log report, refresh the held-out set, and handle incidents and model retirement.
Total cost of ownership for API, hosted and self-hosted LLM paths: one-time and running costs, people's time, utilization and the hidden costs, using Ridgeway's example figures.
Find the volume where self-hosting an LLM costs less than an API, check it against what one server can handle, see which inputs move the answer, and put a price on control.
Size for the busiest hour, not the average: an hour-by-hour queue model on two builds, an internal service level agreement (SLA), ways to add headroom, and what to check in a provider's SLA.
Write a model decision document: the recommendation first, then evidence with sources and dates, conditions and owners, the limits of the evidence, and the triggers that would change the decision.
Capstone lab: compare two complete paths (model, guards, hardware and people), stress-test the hazard word list, and write down the judgment once both paths pass the gates.
Build a deployment evidence pack: the files behind every claim, fingerprinted with SHA-256 in a manifest, plus dated captures and license copies, with secrets and the queue left out.
Set monitoring thresholds from your own baselines, write runbook entries for outages, wrong results, rollback and new revisions, plan the first ninety days, and test the handover.
Review the seven-step method for choosing, evaluating and self-hosting open-source LLMs, Ridgeway's final answer in four numbers, and how to start on your own workload. Then take the final practice test.
This course contains the use of artificial intelligence.
Your team wants to replace a proprietary AI service with an open-source LLM it runs itself. It sounds simple until the questions arrive. Is this model actually open, or just open-weight? Do its license terms allow your use? Is it good enough on your data, not on a leaderboard? What hardware does it need, how do you secure it, and does self-hosting really cost less? This course gives you a method for answering every one of those questions with evidence, so you can make the call and defend it.
Learn by making one real decision
You'll follow Ridgeway Field Services, a fictional HVAC and electrical services company that wants a local model to turn technicians' job notes into structured work orders, while honoring a customer clause that keeps site data off third-party services. Section by section, you'll inventory candidate models, check their terms, evaluate them on held-out notes, size the hardware, secure the endpoint, build the client, price the options and write the decision. Every result on screen comes from real runs on a local machine, not mockups.
The labs run locally with Ollama and small Python scripts. They work on an ordinary PC without a graphics card, and you don't need a cloud account.
What you'll cover
What "open" really means: open weights versus open source, and the OSI Open Source AI Definition
Model licenses and provenance: Apache 2.0 and community licenses, restrictive clauses, model cards, lineage, and the EU AI Act
LLM evaluation for your own workload: critical errors, held-out test sets, fair comparisons, quality slices and structured JSON output
Reading leaderboards and benchmarks critically: contamination, saturation and task mismatch
Hardware sizing: memory for weights, the KV cache and concurrency, plus a measured hardware preflight
Inference runtimes and formats: Ollama, llama.cpp, vLLM, LM Studio, GGUF and safetensors
Quantization: comparing Q4 and Q8 builds on accuracy, safety, speed and memory
When to adapt a model: prompts, examples, code checks, RAG, LoRA adapters and fine-tuning
Securing self-hosted inference: model file checks, endpoint protection, prompt injection tests and guards outside the model
Integration and operations: a local client, output contracts, API versus hosted versus hybrid patterns, upgrades, rollback and ownership
Costs and decisions: total cost of ownership, a break-even example, capacity planning, SLAs and the decision document
What's included
37 lectures across 8 sections, with hands-on labs you can run on your own computer
The Ridgeway lab kit and a Lab Setup Guide, with every script and file used in the labs
Templates and worksheets in editable and PDF formats: a model and license register, a legal review brief, a task spec and critical-error rubric, an evaluation results workbook, a hardware and memory worksheet, an endpoint security checklist, a cost, break-even and capacity worksheet, a decision document and a maintenance plan
A capstone in which you compare two complete candidate paths and package the deployment evidence
A final practice test with scenario questions across all eight sections
Who this course is for
Software engineers, tech leads and architects who need to choose, evaluate and self-host open models responsibly, and anyone who has to explain that choice to a manager, a customer or a legal team.