Blog · September 17, 2026 · 12 min read

Installing Qwen 3.8 with Ollama

Small network switch on a wooden surface with two network cables plugged in
Photo: Pascal / Pexels

Installing Qwen 3.8 with Ollama takes two commands: install Ollama, then run ollama run qwen3.8. The model is listed in the Ollama library as qwen3.8, and the default tag pulls the 27-billion-parameter variant in 4-bit quantization, an 18 GB download. According to unsloth.ai's RAM figures (as of September 16, 2026) you need 16 to 19 GB of free memory for that, around 31 GB for 8-bit and 56 GB for full precision. Two things need changing after the first start, or you'll be disappointed: Ollama starts with a 4,096-token context, and Qwen 3.8 thinks for a long time by default before it answers.

I run Qwen 3.8 locally, though not under Ollama but under SGLang on an Nvidia DGX Spark. Ollama is installed on the Spark, so far without any models. On my MacBook Pro I've measured the model with LM Studio. So I can give you two things: the official Ollama steps from the docs, and an honest view of when Ollama is enough for this model and when it isn't. Everything about AI in my business is collected on the AI page. If you first want to know which tools exist at all, start with Setting Up Local AI: Ollama to SGLang, where Ollama is the first of three tiers. This post is only about that first tier, step by step.

What Qwen 3.8-27B is and why it suits local use

According to the model card on Hugging Face, Qwen 3.8-27B is a dense model with 27 billion parameters under the Apache 2.0 license. It handles 262,144 tokens of context natively, reads images, and has thinking switched on by default, with the reasoning_effort parameter offering xhigh (the default), medium and low. The Ollama library lists 27.8 billion parameters, the model card says 27B; I'm leaving both figures as they are.

For local use, the size is what makes the model interesting: 27 billion parameters in 4-bit fit on a single graphics card with 24 GB or a Mac with enough unified memory, and the model can still call tools and read long documents. Where it sits next to other open models is sorted out in Open Source AI Models Compared. My own experience with the model in daily use is in Qwen 3.8 Locally: DGX Spark Experience.

Hardware check: which quantization fits which memory

Before you download anything, count your free memory, not the installed amount. On a Mac the model shares memory with everything else; on a PC what counts is the graphics card's VRAM, and whatever doesn't fit spills into slower main memory. The download sizes come from the Ollama tag list, retrieved September 18, 2026. The memory figure is unsloth.ai's RAM recommendation for this model (as of September 16, 2026); the numbers marked "ggml-org" are the file sizes of the GGUF quants in the ggml-org/Qwen3.8-27B-GGUF repository on Hugging Face (retrieved September 18, 2026), so not RAM values. The formats are not equivalent, which is why each gets its own row. Ollama itself states no minimum RAM for the model, and context costs extra memory, for which I have no sourced figure per context length.

Format Ollama tag Download Memory needed Source
Q4_K_M (GGUF, 4 bit) qwen3.8 (default), 27b-q4_K_M, 27b-mtp-q4_K_M 18 GB 16 to 19 GB tag list; unsloth.ai; ggml-org: 19 GB
NVFP4 (Nvidia, 4 bit) 27b-nvfp4 18 GB no sourced figure tag list
MLX (quantization not stated on the Ollama page) 27b-mlx 18 GB no sourced figure tag list
Q8_0 (GGUF, 8 bit) 27b-q8_0, 27b-mtp-q8_0 30 GB 31 GB tag list; unsloth.ai; ggml-org: 28.6 GB
MXFP8 27b-mxfp8 32 GB not stated tag list
BF16 (full precision) 27b-bf16, 27b-mtp-bf16, 27b-mlx-bf16 56 GB 56 GB tag list; unsloth.ai; ggml-org: 53.8 GB

For my two machines this means: on the MacBook Pro M3 Max with 64 GB, 8-bit fits, and that's exactly how I run it in LM Studio, with 27.5 GiB of RAM in use. On the DGX Spark with 119 GB of usable unified memory even BF16 fits, but there I use the NVFP4 checkpoint under SGLang because it's faster. With 16 GB of total memory I wouldn't recommend the model; the arithmetic is in the questions below.

One thing many guides skip: download time. At my location the line runs at around 2 MB/s. The 18 GB default tag takes roughly two and a half hours at that rate, the BF16 tag a working day. So don't schedule your first ollama run five minutes before a meeting.

Installing Ollama on Mac, Linux and Windows

According to the Ollama README on GitHub, installation is one command per operating system. Ollama itself is MIT licensed.

# macOS and Linux
curl -fsSL https://ollama.com/install.sh | sh

# Windows PowerShell
irm https://ollama.com/install.ps1 | iex

If you'd rather run Ollama in Docker, for example on a server with an Nvidia card, the Ollama docs list these commands on their Docker page; the GPU variant requires the NVIDIA Container Toolkit and sudo nvidia-ctk runtime configure --runtime=docker first:

# CPU only
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

# with an Nvidia GPU
docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

# start the model inside the container
docker exec -it ollama ollama run qwen3.8

Models are stored under ~/.ollama/models on the Mac and /usr/share/ollama/.ollama/models on Linux. Worth knowing before 18 GB land on a small system drive.

Loading and running Qwen 3.8 in Ollama: the tags explained

The command from the model page in the Ollama library pulls the default tag and opens a chat in the terminal right away:

ollama run qwen3.8

If you want a different quantization, append the tag after a colon. pull only downloads, run downloads and starts:

ollama pull qwen3.8:27b-q8_0
ollama run qwen3.8:27b-q8_0

The tags with mtp in the name refer to multi-token prediction. Two things are documented: the model card names MTP as part of training, and the Ollama tag list carries 27b-mtp-q4_K_M, 27b-mtp-q8_0 and 27b-mtp-bf16 (retrieved September 18, 2026). What is not documented is whether and how the Ollama runtime uses those weights, for speculative decoding or otherwise, and what that gains in speed; the Ollama docs say nothing about it, and I haven't measured it. If you want to know, benchmark both tags on your own hardware. nvfp4 is the format the vLLM recipes also name for Blackwell cards; mlx is, according to third-party sources, meant for Apple Silicon, which the Ollama page doesn't officially confirm. All tags have 256K context and handle text and images. What speed Ollama gets out of them I haven't measured myself; the only figures I can give you with a source come from SGLang and LM Studio, more on that below.

The two traps: 4,096-token context and thinking on xhigh

Trap one: according to the Ollama docs FAQ, Ollama starts every model with a default context of 4,096 tokens. The model could do 262,144, you get 4,096, and long documents get cut off silently. Three ways from the docs to set the context:

# for the whole service, at startup
OLLAMA_CONTEXT_LENGTH=8192 ollama serve

# inside a running chat
/set parameter num_ctx 32768

# via the API: the num_ctx field in the request's options

A larger context costs memory, on top of the figures in the table. So raise the value step by step and watch whether the model still sits entirely in fast memory.

Trap two: thinking. According to the model card, Qwen 3.8 has thinking on by default with reasoning_effort at xhigh. That's good for hard tasks; for a short question in the terminal it means you wait a long time for a block of reasoning before the answer arrives. The model card lists the levels medium and low; how you set the level in Ollama is stated neither in the Ollama FAQ nor on the model page as I checked them on September 16, 2026. Check ollama run --help and the model page for current details before you build scripts around it.

Exposing Ollama on the network and using the API

By default Ollama listens only on the local machine on port 11434. If another machine on the network should use the model, the FAQ says to set the OLLAMA_HOST environment variable for the service. I'd only do that on an isolated network or through a VPN; my own access to the Spark runs over Tailscale.

For programs there are three routes, all in the docs: Ollama's own API at http://localhost:11434/api/chat, an OpenAI-compatible interface at http://localhost:11434/v1, and an Anthropic-compatible one at /v1/messages. That lets tools built for OpenAI or Claude talk to your local Qwen without changing their code. That's how you attach a terminal coding agent, as I described in Claude Code Alternative Without Cloud.

Two settings from the FAQ that matter in operation: keep_alive keeps a model in memory for 5 minutes after the last request by default, a negative value keeps it loaded permanently. OLLAMA_MAX_LOADED_MODELS allows 3 loaded models at once by default; with a 27B model your memory usually has room for one.

When Ollama isn't enough: my setup with SGLang

Ollama is the easiest way in, and for one machine with one user it's often the right choice. I still run Qwen 3.8 under SGLang, for one reason: speed under concurrent requests. On the DGX Spark, with the NVFP4 checkpoint and speculative decoding, I measure 50.7 tokens per second when generating, measured with 300 tokens in one stream from the Mac over Tailscale. The upstream recipe reports 32 to 40 tokens per second in agentic coding. On the MacBook Pro M3 Max with LM Studio in 8-bit it's 11 tokens per second.

The price of SGLang is effort: Docker, a start script with --mem-fraction-static 0.50 (higher can freeze the host, that's the Spark's unified memory trap), first start around 9 minutes. That's not for an after-work test but for a server that serves several users or agents. I haven't done an Ollama measurement on the Spark yet, and I won't quote you a number I haven't seen myself. If you're wondering whether dedicated hardware is worth it, read Your Own AI Server: Hardware and Cost and my DGX Spark Tested: Worth Buying?.

Frequently asked questions

Does Qwen 3.8 run on 16 GB of RAM?

On paper barely, in practice usually not sensibly. The 4-bit tag needs 16 to 19 GB according to unsloth.ai, plus the operating system, browser and context. On a Mac with 16 GB of unified memory too little is left for the model; on a PC with 16 GB of VRAM part of it usually spills into main memory and slows down. At 24 GB it gets comfortable, which is also the size unsloth names for 4-bit.

Which Ollama tag should I pick: q4, q8 or bf16?

Take the largest one that fits in your memory with room to spare. Q4_K_M is the default and enough for most tasks; Q8_0 is closer to the original and needs 31 GB; BF16 is the unchanged model at 56 GB and only worth it if you have that memory anyway. I run 8-bit on the Mac and NVFP4 on the Spark.

How do I turn off thinking in Qwen 3.8?

The model card lists the levels xhigh, medium and low for reasoning_effort; unsloth additionally lists none. I didn't find an Ollama command for it in the Ollama docs on September 16, 2026, so I'm not writing one here. Check ollama run --help and the model page, that changes with every version.

Can Qwen 3.8 read images in Ollama?

Yes, all tags in the Ollama library are marked as text and image, and the model card names vision as a native part. The GGUF files from ggml-org on Hugging Face ship a separate projection file for it, 629 MB to 931 MB in size.

Is Qwen 3.8 free for companies to use?

According to the model card the model is under Apache 2.0, a license that permits commercial use. The Ollama model page states no license; the model card is what counts. What you may do with it and which data you feed in is a separate question; I wrote Local AI and Privacy: Cloud or Server? on that, and it's not legal advice.

How long does the Qwen 3.8 download take?

That depends entirely on your line. The default tag is 18 GB; at my roughly 2 MB/s that's about two and a half hours on paper, at 100 MB/s it would be about three minutes on paper.

Can I use Qwen 3.8 in Ollama with Claude Code or other agents?

According to the docs, Ollama offers an OpenAI-compatible and an Anthropic-compatible interface. Which agents work usefully with it is a different question from the wiring; so far I've run Pi against my local Qwen, and my comparison with Claude Code is qualitative, without a benchmark.

Where you go from here

Install Ollama, start ollama run qwen3.8 and ask the model a question from your everyday work while the download is still fresh. Then raise the context and try a real document. If the model suits you and you want more than one machine with one user, the next step is the second and third tier in Setting Up Local AI: Ollama to SGLang. What SGLang on the Spark gives me and which traps it has is in Qwen 3.8 Locally: DGX Spark Experience. And whether Qwen 3.8 is the right model for your task at all is settled in Open Source AI Models Compared.

Kevin Welter

Kevin Welter

Developer, IT architect, author of technical books (Kubernetes, cloud infrastructures) and speaker. Runs his business with an AI workforce of eight AI employees and shows solo business owners in his community how to hire their first AI employee.

More about AI employees

Your first AI employee up and running within an hour

Join the community