Module 24 of 24 · Open Source Track
What's Next: The Frontier

The models you used are the floor, not the ceiling. Six frontier concepts — the 2026 model landscape, vision models, fine-tuning with LoRA, reasoning models, whether you need a framework, and your 90-day path forward.

Open Source Track — Final ⏱ ~19 min read 24 / 24
Concept 1 of 6

One installation, many specialists

The open source ecosystem is no longer one shelf of general 7B models. It now has specialists: reasoning models (DeepSeek-R1), vision models (LLaVA), compact on-device models (Phi-4 mini), and Mixture-of-Experts models that give big-model quality at small-model speed (Llama 4 Scout).

The gap to frontier APIs has shrunk hard. A 7B reasoning model now matches yesterday's $200/month cloud budget — running on your laptop. Your job shifted from "which model can I afford" to "which model fits this job," all inside one Ollama install.

Concept 1 of 6

A hammer vs a Swiss Army knife

BEFORE: Two years ago the shelf held Llama 2, Mistral 7B, and a few derivatives. If the 7B could not do the job, you upgraded to a costly 70B or paid a cloud API instead.

PAIN: The 7B made steady domain errors, could not reason through multi-step math, and could not look at an image. You were holding a hammer when the job needed a whole toolkit.

MAPPING: The 2026 landscape is a Swiss Army knife: a reasoning blade, a vision blade, a tiny on-device blade, and an MoE blade — all folded into one Ollama install. You match the right blade to the right cut instead of forcing one tool.

Concept 1 of 6

The four model families

  1. WorkhorsesMistral 7B, Llama 3.1, Qwen 2.5 — tool use, coding, long context. Your everyday agents.
  2. Reasoning modelsDeepSeek-R1 — a built-in chain-of-thought for hard multi-step problems.
  3. Multimodal / MoELlama 4 Scout — natively sees images; routes each token to a few experts for speed.
  4. CompactPhi-4 mini (3.8B) — reasoning-dense, tiny footprint, for edge and low-latency.
Concept 1 of 6

Match the model to the job

NeedReach for
tools / agentsMistral 7B, Llama 3.1
long docs / i18nQwen 2.5 (128K)
hard reasoningDeepSeek-R1
images + textLLaVA, Llama 4 Scout
edge / low VRAMPhi-4 mini (3.8B)
quality at speedLlama 4 (MoE)

MoE routes each token to a few "experts" — 17B total, ~3.4B active per pass.

Concept 1 of 6

Misconceptions

"Bigger parameter count always means better."
Not anymore. An MoE model with 17B total but 3.4B active can beat a dense model of the same speed, and a 3.8B reasoning model can out-think a larger generic one on logic.
"Open source is always a step behind the APIs."
The gap has collapsed. DeepSeek-R1-7B matches GPT-4o on many reasoning benchmarks, and it runs on your laptop for free.

The ecosystem is now specialists, not one general model. Match reasoning, vision, compact, and MoE families to the job — all in one Ollama install.

Pick by capability fit, not by raw size; the right small model often wins.

Concept 2 of 6

Images are just another content type

A multimodal model takes text and images in a single call. In Ollama, vision is not a new endpoint or SDK — you send images as base64 data URIs inside the same message content array you already use for text.

Under the hood, the image is tokenized by a visual encoder and injected straight into the context window alongside your words. So "add vision" is a one-line change to the shape of your content, not a new integration.

Concept 2 of 6

Attaching a photo to a text

BEFORE: Your agent could only read what you typed. To ask "what's wrong with this screenshot?" you had to describe the screenshot in words first — slow and lossy.

PAIN: Describing a UI, a chart, or a receipt in prose loses detail and takes forever. You were transcribing images by hand just to feed the model.

MAPPING: Multimodal is like attaching a photo to a text message instead of typing a description. You drop the image into the same message, and the model "sees" it directly — same conversation, same API, just one extra attachment.

Concept 2 of 6

Sending an image

  1. Encode the imageRead the file and base64-encode it into a data:image/...;base64, URI.
  2. Build a content arrayInstead of a string, content becomes a list: one image_url item, one text item.
  3. Call a vision modelUse llava, moondream, or llama4:scout on the same Ollama server.
  4. Read the answerThe reply comes back exactly like a text call — the image tokens lived in the context.
Concept 2 of 6

Pseudocode

b64 = base64_encode(read_file("screenshot.png"))

message = {
  role: "user",
  content: [                       # an ARRAY, not a string
    { type: "image_url",
      image_url: {
        url: "data:image/png;base64," + b64 } },
    { type: "text",
      text: "What UI elements are here?" },
  ]
}
reply = model.chat("llava", [message])
# GOTCHA: MIME type in the URI must match the file
Concept 2 of 6

Misconceptions

"Vision needs a separate API or a new SDK."
No. It is the same chat.completions.create() call on the same Ollama server — only the content shape changes to an array with an image item.
"Any model can accept an image if I send one."
Only vision-capable models (LLaVA, Moondream, Bakllava, Llama 4 Scout) understand images. A text-only model will ignore or error on the image content.

Multimodal = the same call with an image in the content array. Base64 the file into a data URI and send it to a vision model.

Match the MIME type to the file, and pick a model that actually supports vision.

Concept 3 of 6

Teach the weights, not the prompt

A prompt can't make a base model learn your domain vocabulary — the context window is not the same as learned weights. Fine-tuning on 500–1000 domain examples teaches terminology, format, and reasoning into the model itself.

LoRA makes this cheap: freeze the 7B base weights and train tiny adapter matrices (~0.1% of params) on top. QLoRA goes further, running LoRA on a 4-bit quantized base so a 7B fine-tune fits in 6–8 GB VRAM — a consumer RTX 3060, in 1–2 hours.

Concept 3 of 6

Onboarding a sharp new hire

BEFORE: Your support model is smart but generic. It confuses "510(k) clearance" with "CE marking," mangles your product numbers, and every reply needs editing before it reaches a customer.

PAIN: The base model learned the general internet, not your 800 submission docs and three years of validated Q&A. Re-explaining your domain in every prompt is like re-training a hire at the start of each task.

MAPPING: Fine-tuning is proper onboarding: you don't rebuild the person, you hand them your handbook and let them internalize it. LoRA adds thin "notes" (adapters) on frozen expertise — the hire now gets the calls right 80% of the time instead of 40%.

Concept 3 of 6

The Unsloth workflow

  1. Load a 4-bit baseLoad the 7B model in 4-bit (QLoRA) so it fits in 6–8 GB VRAM.
  2. Attach LoRA adaptersAdd small trainable matrices (rank r) to the attention projections; base stays frozen.
  3. Train on your JSONLSupervised fine-tune on 500–1000 domain examples for a few epochs.
  4. Export to GGUFSave as GGUF, write a Modelfile, then ollama create to run it like any model.
Concept 3 of 6

Pseudocode

model = load_base("mistral-7b", in_4bit=TRUE)

# add thin trainable adapters, base stays FROZEN
model = add_lora(model, rank=16,
                 target=[q_proj, v_proj])

data = load_jsonl("my_domain.jsonl")

train(model, data, epochs=3, lr=2e-4)

# export so Ollama can run it natively
save_gguf(model, quant="q4_k_m")
# then: ollama create my-model -f Modelfile
Concept 3 of 6

Misconceptions

"Fine-tuning means retraining the whole 7B model."
LoRA freezes the base and trains only ~0.1% of params as adapters. You are adding thin layers, not rebuilding — that is why it fits on one consumer GPU.
"A bigger system prompt does the same thing."
A prompt fills the context window each call; it never changes the weights. For durable domain vocabulary and style, fine-tuning teaches the model in a way prompts can't.

LoRA/QLoRA teach a 7B model your domain for 1–2 hours on a consumer GPU. Freeze the base, train tiny adapters, export to GGUF.

Reach for it when prompts alone can't fix domain terminology or format drift.

Concept 4 of 6

A model that shows its work

A reasoning model like DeepSeek-R1 produces a visible chain-of-thought before its final answer, wrapped in <think>...</think> tags. It was trained (via GRPO reinforcement learning) to reward correct final answers, which pushed it to develop structured reasoning.

That thinking trace is gold for hard problems — and noise for end users. So the pattern is: let R1 think, then strip the <think> block before showing the answer. Keep it visible only in dev and eval, where it's your best debugging tool.

Concept 4 of 6

The candidate's scratch paper

BEFORE: A plain model blurts an answer instantly — like a student who writes only the final number on a hard math problem, with no working shown.

PAIN: On multi-step logic, that snap answer is often wrong, and you can't see where it went wrong. No scratch paper means no way to debug the reasoning.

MAPPING: R1 is the candidate who works the problem on scratch paper first, then boxes the final answer. You keep the scratch paper (the <think> block) for grading and debugging, but you hand the customer only the boxed answer.

Concept 4 of 6

Think, then strip

  1. Call R1Send the hard problem to deepseek-r1:7b at temperature ~0.6.
  2. Get think + answerThe reply holds a <think> trace (200–800 tokens) followed by the final answer.
  3. Extract the traceRegex-match the <think>...</think> block if you want it for debugging.
  4. Strip for usersRemove the block to leave a clean answer; show the trace only in dev/eval.
Concept 4 of 6

Pseudocode

reply = model.chat("deepseek-r1:7b",
                   problem, temp=0.6)

# pull out the reasoning trace
thinking = match(reply, "<think>...</think>")

# strip it to get the clean final answer
answer = remove(reply, "<think>...</think>")

IF production:
  show(answer)                # hide the trace
ELSE:
  show(thinking, answer)      # debug in dev/eval
Concept 4 of 6

Misconceptions

"Show users the thinking — it's transparent."
The <think> block is 200–800 tokens of the model "talking to itself." It confuses non-technical users. Strip it in production; keep it only in dev and eval.
"Use R1 for everything — more reasoning is better."
The thinking adds latency and tokens on every call. For simple Q&A, classification, or real-time chat, a plain workhorse model is faster and cheaper.

Reasoning models think out loud in <think> tags, then answer. Use them for multi-step logic; strip the trace for users.

Keep the thinking visible in dev/eval — it's your best tool for debugging wrong answers.

Concept 5 of 6

Frameworks compress; they don't replace understanding

LangChain, CrewAI, AutoGen, and LlamaIndex are faster for shipping common patterns — but they hide the ReAct loop, the handoff, the RAG pipeline you built by hand. When something breaks (wrong tools, infinite loops, hallucinated schemas), you need to know what's underneath.

Because you built every primitive manually, that knowledge is now your edge. Each framework abstraction maps to something you already understand — so you can read its source, adopt it surgically, and debug it when it fails.

Concept 5 of 6

Learning to cut before the CNC

BEFORE: A joiner learning woodworking is handed a CNC machine on day one — fast, precise, and completely opaque.

PAIN: Start with the CNC and you never learn to read the grain or feel why a joint holds. When the machine jams (and it will), you're helpless — you can't fix what you never understood.

MAPPING: Frameworks are the CNC machines of agent building. Because you first cut every joint by hand — the ReAct loop, the handoff, the RAG pipeline — you can now run the CNC and fix it, because you know exactly which cut each button makes.

Concept 5 of 6

What each framework is for

  1. Manual (this course)Full control, any architecture. Always the starting point — you own it all.
  2. LangChainMedium control; best for linear pipelines and reaching 50+ integrations fast.
  3. CrewAI / AutoGenRole-based or conversation-first multi-agent patterns when they map to your problem.
  4. LlamaIndexIndex and retrieval abstractions for complex RAG and knowledge bases.
Concept 5 of 6

Manual or framework?

ALWAYS start manual
  → you understand every primitive

IF RAG grows brittle & complex:
  → adopt LlamaIndex

IF a clear crew/role model fits:
  → adopt CrewAI

IF you need 50+ integrations fast:
  → adopt LangChain

NEVER start a new project on a
  framework — debugging is 10x harder
  when you can't see underneath
Concept 5 of 6

Misconceptions

"Start with a framework to move fast."
You'll ship quickly, then hit a wall you can't debug because you never learned the primitives. Build manual first; adopt frameworks only once a pattern clearly maps to their DSL.
"Manual knowledge is wasted once I use a framework."
The opposite. Your ReAct loop is LangChain's AgentExecutor; your handoff is CrewAI's Crew + Task. The manual knowledge is exactly what lets you read and debug the framework.

Build manual first; adopt frameworks surgically. They compress boilerplate but hide the primitives you must understand to debug.

Every abstraction maps to something you already built — so you can read the source and fix failures.

Concept 6 of 6

Three paths, one next step

You finished the track — now pick a direction. There are three 90-day paths: deepen open source (fine-tune, RAG, deploy to a GPU), add Claude + cloud (swap the client, take the main course, build hybrids), or specialize (MCP, eval, monitoring, production hardening).

Each path is 12 weeks of concrete, buildable steps that stack on what you already made. The point isn't to do all three — it's to pick the one that matches your goal and start this week, using your Module 12 agent as the scaffold.

Concept 6 of 6

Trailheads at the summit

BEFORE: You've climbed to a ridge and finished the marked trail. Ahead, the map just says "you are here" — no obvious next move, easy to wander in circles.

PAIN: Without a chosen route, "keep learning" becomes aimless tab-hoarding — a dozen half-read tutorials and no shipped project three months later.

MAPPING: The roadmap is three signed trailheads leaving the summit: Deepen, Add Claude, or Specialize. Each has week-by-week markers so you always know the next step. You pick one path and walk it — not stand at the sign forever.

Concept 6 of 6

Path A, week by week

  1. Weeks 1–4: Fine-tunePrepare 500–1000 Q&A examples, run QLoRA with Unsloth, measure the accuracy delta.
  2. Weeks 5–8: Domain RAGIngest your own docs, add hybrid search and the reranking from M10.
  3. Weeks 9–12: DeployProvision a T4 GPU VM (M21B), serve real users, measure p50/p95 latency.
  4. Scaffold itReuse the reference project tree: agent, tools, memory, rag/, eval/, guardrails/, api.
Concept 6 of 6

Which path is yours?

Your goalPath (12 weeks)
go deeper on OSSA: fine-tune → RAG → deploy to GPU
add Claude / cloudB: swap client → main course → hybrid
harden for prodC: MCP → eval + monitoring → hardening

Path B: your OpenAI-compatible code needs only a base_url + key change to point at Claude.

Concept 6 of 6

Misconceptions

"I should do all three paths to be complete."
Pick one that matches your goal and finish it. Three half-done paths ship nothing; one completed 90-day path ships a real, deployed project.
"Moving to Claude means rewriting everything."
Your code is OpenAI-compatible. Path B starts by just changing the base_url and API key, then running your existing tests — the rest is additive.

Pick one 90-day path and start this week. Deepen OSS, add Claude + cloud, or specialize — all built on your existing agent.

Use the reference project tree as your scaffold; every folder maps to a module you already completed.

Test the core insight

One question per concept. Tap to reveal the answer.

Open the full module on desktop

The desktop version has you call a vision model on a real image, run the full Unsloth QLoRA workflow, route hard sub-problems to DeepSeek-R1, and pick from three 90-day paths with a copy-ready project scaffold — in Python and Node.

Open M24 on Desktop → Landscape · multimodal · LoRA · reasoning · frameworks · roadmap · ~75 min

Module 24 of 24 · Open Source Track · Track Complete