What a local AI model can do — and how you talk to it
The model page explains what Qwen3.8-27B is; the hardware page what to run it on. This page is the part in between: what a request and a reply actually look like, whether it returns JSON, how it calls tools, what "thinking" means, whether it can code, which settings change its behaviour, how you upgrade it, and which interfaces the whole industry has standardised on. Every reply below is a real one from a local run.
1 · It is a conversation, and the reply is a message
Captured August 28, 2026 · 15:10
A local model runs as a small server on your machine and speaks HTTP. You send it a list of
messages — each with a role (system for standing instructions,
user for what you ask, assistant for what it said before) — and it
returns one new assistant message. That is the whole interface; everything else on this page is
a field you add to the request. Nothing leaves your machine.
| Request | Reply |
|---|---|
{"model": "qwen3.8:27b",
"messages": [{"role": "user", "content": "In two sentences, what is free cash flow yield and why do value investors care?"}],
"think": false, "options": {"temperature": 0}} | {"message": {"role": "assistant",
"content": "Free cash flow yield is a valuation metric calculated by dividing a company's free cash flow per share by its current stock price, representing the cash return an investor receives relative to their investment. Value investors care because it measures actual cash generation rather than accounting earnings, revealing whether a stock is genuinely cheap on the money the business produces."},
"done": true, "eval_count": 76} |
The reply carries the text plus bookkeeping — how many tokens it read and wrote, how long each
phase took — which is how a program measures cost and speed. Streaming ("stream": true)
returns the same message a few words at a time, which is what makes chat interfaces feel live.
2 · Does it return JSON? Only if you make it — and then, reliably
Captured August 28, 2026 · 15:10By default it returns prose. Asking politely for JSON works most of the time, which is not good enough for a program. The reliable way is structured output: you attach a JSON Schema to the request and the server constrains generation so the reply cannot be anything but a document matching it — the right keys, the right types, values from your list. This is the bridge between "a chat model" and "a data source".
| Request (with a schema) | Reply — guaranteed to match |
|---|---|
{"model": "qwen3.8:27b",
"messages": [{"role": "user", "content": "Company ZZZ trades at 6x earnings with net cash equal to 30% of its market cap and revenue growing 8%. Give a stance."}],
"format": {"type": "object",
"properties": {"ticker": {"type": "string"},
"direction": {"type": "string", "enum": ["undervalued", "fairly_valued", "overvalued"]},
"bullish_0_10": {"type": "integer"},
"one_line": {"type": "string"}},
"required": ["ticker", "direction", "bullish_0_10", "one_line"]},
"options": {"temperature": 0}} | {"ticker": "ZZZ",
"direction": "overvalued",
"bullish_0_10": 3,
"one_line": "The 6x P/E is misleadingly low because 30% of the market cap is net cash, implying an operating multiple of ~8.6x …"} |
Two things to notice. The schema did its job — a valid object, the direction drawn from the allowed list, an integer score. And the judgment is still the model's own: handed a 6× earnings, net-cash, growing company, this one called it overvalued. Structured output fixes the container, not the contents.
3 · Tools: it can ask your code to do things
Captured August 28, 2026 · 15:10
The model has no internet, no clock and no access to your database. What it has is
tool calling: you describe functions your program can run — name, purpose,
parameters — and when the model decides one is needed it replies not with text but with a
structured request to call it. Your code runs the function, sends the result back as a
tool message, and the model continues with real data. That loop is what "an agent" is.
| Request (with a tool on offer) | Reply — a call, not an answer |
|---|---|
{"model": "qwen3.8:27b",
"messages": [{"role": "user", "content": "What is NVDA trading at right now?"}],
"tools": [{"type": "function",
"function": {"name": "get_quote", "description": "Latest price for a ticker",
"parameters": {"type": "object", "properties": {"ticker": {"type": "string"}}, "required": ["ticker"]}}}]} | {"message": {"role": "assistant", "content": "",
"tool_calls": [{"function": {"name": "get_quote", "arguments": {"ticker": "NVDA"}}}]}} |
The tool description format is the same one the hosted APIs use, so a tool written once works against any model. The newer MCP standard (Model Context Protocol) packages whole tool servers — a file system, a database, a browser — so they can be plugged into any client without writing the glue each time.
4 · Thinking mode: it can show its working, or skip it
Captured August 28, 2026 · 15:10
Qwen3.8 is a hybrid reasoner. With "think": true it works the problem through in a
separate thinking field before writing the answer; with false it
answers directly. Thinking costs time and tokens — the example below spent 2,581 characters of
working to produce one sentence — and on judgment-heavy tasks it is usually where the quality
comes from. Effort can be dialled ("low" / "high") on this model.
{"message": {"role": "assistant",
"thinking": "The user is asking about a stock with P/E 12, EV/EBITDA 5, but negative FCF for two years. The disconnect between earnings/EBITDA and cash flow is the key issue … (2,581 characters of working, not shown to the user by default)",
"content": "Pull the cash-flow statement and see whether the FCF gap is driven by heavy capex (a capital-intensive investment cycle that EBITDA conveniently adds back) or by operating cash flow that's weak or negative — the first is a timing question, the second means the earnings are not converting to cash."}}
The working is returned to the program, not shown to the end user by default — so you can log it, audit it, or throw it away. Two practical notes from our own runs: on a full analyst briefing the model wrote roughly 7,000 characters of working and took about three times as long (~50 s vs ~17 s); and always verify the flag was applied by checking the length of the returned thinking field — a setting you sent is not a setting that took. We lost a whole experiment to a request where a later option silently overrode the flag, and the only tell was an empty thinking field.
5 · Vision and code
Captured August 28, 2026 · 15:10
Vision is built in. The model card lists four capabilities — completion, vision,
tools, thinking — and images go into a message as an images field alongside the text:
a chart, a screenshot, a scanned filing. It reads them the way it reads text; there is no separate
image model to install.
Coding is one of its strongest suits. On the published benchmarks it solves 61.7% of SWE-bench Pro tasks (fixing real repository issues end to end) and scores 90.3 on LiveCodeBench — the numbers behind the "runs as a local coding agent" headlines. Asked for a function, it returns clean code with no preamble:
function fcfYield(float $fcf, float $marketCap): ?float {
if ($marketCap <= 0) {
return null;
}
return $fcf / $marketCap;
}
The honest limit: it writes and fixes code well inside a bounded task; on the hardest multi-file repository work it trails the closed frontier by a wide margin (42 vs 69–73 on the hardest agentic-coding set). The practical way to use it for code is not a chat box but an editor integration — see the ecosystem table below.
6 · The settings that change its behaviour
Verified August 28, 2026 · 15:10These are the pre-configured options — sent per request, or baked into a named variant (next section).
| Setting | What it controls | In plain terms | Range |
|---|---|---|---|
temperature | How much randomness in word choice | 0 = the same answer every time for the same input; 0.7 = varied phrasing and, on judgment calls, varied verdicts. For anything you will measure or compare, use 0. | 0 – 1 |
num_ctx | Context window: how much text it can hold at once | Prompt + reply must fit. Too small and the start of a long document is silently dropped. Memory use rises with it. | 8k – 32k typical; 262k max for this model |
num_predict | Maximum reply length in tokens | Includes thinking tokens when thinking is on — leave room or the answer is cut off mid-sentence. | 500 – 12,000 |
think | Reasoning mode | Off: it answers directly. On: it works the problem through first and returns that working separately from the answer. Slower, and on judgment tasks usually better. | false / true / "low" / "high" |
top_p · top_k | How wide a menu of next words it samples from | Rarely worth touching. Narrower = more conservative wording. | defaults |
repeat_penalty | Discourages repeating itself | A small nudge (1.05–1.1) stops the rare case where a deterministic run loops the same paragraph. | 1.0 – 1.1 |
seed | Fixes the random draw | With temperature above 0, the same seed reproduces the same answer. | any integer |
system message | Standing instructions | Who it is, what format to answer in, what to distrust. The single most powerful lever — it is what the paid models get too. | text |
One lesson from our own testing: at temperature 0.7 the same document read twice changed the model's verdict 6 times out of 10. At 0 it was identical 10 times out of 10. If you intend to measure anything, start at 0.
7 · How you upgrade it — the ladder, cheapest first
Verified August 28, 2026 · 15:10
"Upgrading" a local model rarely means new weights. Most of the improvement available to you is
in how you talk to it, and each rung below is a real, distinct lever. A Modelfile
is the small text recipe that turns any rung into a named model: FROM a base,
SYSTEM a prompt, PARAMETER the settings, ADAPTER a trained
add-on — then one command creates your-model and everything calls it by name.
| Rung | What you change | What it needs | What it buys |
|---|---|---|---|
| 1 · Prompt | The system message and the way you lay out the data | Nothing — text | Most of the gain, most of the time. Worksheets ("first check X, then Y, then decide") help small models the most. |
| 2 · Structured output | A JSON schema the reply must match | Nothing — one request field | Reliability: the reply is always parseable, no "sorry, here is my answer:" preamble, no empty verdicts. |
| 3 · Examples (few-shot) | Two or three worked examples inside the prompt | Nothing — text, at the cost of context space | Transfers a house style and a frame far better than describing it. |
| 4 · Retrieval (RAG) | Look up relevant documents first and paste them into the prompt | A search index (any database or vector store) | Knowledge the model does not have — your data, today's numbers, your past analyses. |
| 5 · Settings & Modelfile | Bake a system prompt + parameters into a named variant | A small text file; one command to create the variant | Consistency: everyone who calls "your-model" gets the same behaviour. |
| 6 · Adapter (LoRA) | Train a small add-on layer on your own examples; attach it in the Modelfile | Hundreds to thousands of examples; hours of GPU time | Changes what the model has learned, not just what it is told. The step that can move judgment. |
| 7 · Different weights | A larger or newer model, or a less-compressed build (Q6, Q8) | More memory | Capability ceiling. See the hardware page for what each tier buys. |
Rungs 1–5 change what the model is told; rung 6 changes what it has learned; rung 7 changes what it is. Work down the ladder in order — and measure each rung on the same test set before taking the next, or you will not know which one helped.
8 · Is there an industry norm? Yes — and it is a small set
Verified August 28, 2026 · 15:10You do not go looking for a bespoke API for each model. Everything has converged on a handful of conventions, which is why a local model and a hosted one can be swapped behind the same code.
| Layer | What it is | Names you will meet | Why it matters |
|---|---|---|---|
| Runtime | Loads the weights and serves an API | Ollama · llama.cpp · vLLM · LM Studio | Ollama is the desktop default; vLLM is the high-throughput server; llama.cpp is the engine underneath most of them. |
| Wire format | The request/response shape everything speaks | The OpenAI chat-completions format | The de-facto standard. Local runtimes expose an OpenAI-compatible endpoint, so any library written for the hosted APIs works with a one-line change. |
| Weights format | The file the model ships as | GGUF (quantised) · safetensors (full precision) | GGUF is what you download and run locally; the "Q4_K_M" in a filename is the compression level. |
| Distribution | Where models are published | Hugging Face · Ollama library · ModelScope | Hugging Face is the registry; Ollama's library is a curated mirror with one-command pulls. |
| Structured output | Forcing the reply to match a schema | JSON Schema in the request; Pydantic / Zod on the client | Turns "text" into "data" — the bridge between a chat model and a program. |
| Tools | Letting the model ask your code to do things | Function calling · MCP (Model Context Protocol) | Function calling is the OpenAI-style request field; MCP is the newer standard for plugging whole tool servers (files, databases, browsers) into any model. |
| Chat interfaces | A UI for people | Open WebUI · LM Studio · Jan | ChatGPT-style front ends for a local model; useful for non-programmers on the same machine or network. |
| Coding assistants | The model inside your editor | Continue · Cline · Aider · Claude Code-style agents | These are the "pre-written integrations" — they already know how to read a repository, propose edits and run tests against a local model. |
| Agent frameworks | Chaining calls into multi-step workflows | LangChain · LangGraph · CrewAI | Orchestration; mostly unnecessary until you have several models or tools cooperating. |
9 · What it cannot do
Verified August 28, 2026 · 15:10No memory between calls. Each request starts blank; "memory" is you sending the history back. No knowledge after its training cut-off and none of your data — that is what tools and retrieval are for. Not an embedding model: this build refuses the embeddings endpoint; vector search needs a separate, tiny embedding model beside it. It will state wrong numbers confidently — in our testing the fix was to name the fields it should distrust, not to hope. One request at a time per model on a single GPU — throughput comes from batching servers, not from opening more connections.
Sources
Retrieved August 28, 2026 · 15:10Ollama structured outputs — docs, announcement; Modelfiles, adapters and imports — Ollama import docs, Modelfile guide; Qwen3.8-27B on Ollama — model library, KDnuggets coding-agent setup; ecosystem layers — iunera 2026 tools comparison, inference tools guide, July 2026; benchmarks — the model page (vendor-reported and third-party figures with dates). Example replies: local run of qwen3.8:27b (Q4_K_M), temperature 0, August 28, 2026 · 15:10.