Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
FREEDOM251

Freedom251 › Blog › GGUF

How to Install Qwen on Ubuntu 26.04 and 24.04: Choose a Model Size Your Machine Can Run

By Freedom251 Team · · 6 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Qwen is a family of models you install into a local runtime on Ubuntu, not a feature Ubuntu switches on. There are two documented routes. Ollama is the quickest start: install it as a snap, then run a Qwen tag such as qwen3:0.6b. llama.cpp gives more control over model files and hardware use, but requires building software and choosing a GGUF file. The official documentation does not publish reliable RAM, VRAM, or disk minimums for each Qwen model on Ubuntu 24.04 or 26.04, so the practical way to pick a size is to start small, confirm it loads, and move up only if your hardware handles it.

What you need to know before installing

  • Qwen is model software. Ubuntu’s own AI guidance states that “As of Ubuntu 26.04 LTS, a fresh installation of Ubuntu Desktop contains no built-in AI tooling.” (Ubuntu Wiki, “AI on Ubuntu”). You add the runtime and the model yourself.
  • Ollama is the fastest documented route. Ubuntu’s example is sudo snap install ollama followed by ollama run qwen3:0.6b.
  • llama.cpp is the controllable route. It requires build tools, a compiled binary, and a GGUF model file.
  • Hardware limits are not published per model. Parameter counts and file sizes are not guaranteed minimum system requirements. Check your own free memory, GPU memory if you plan to offload, and free disk space before each download.

Path A: Install Qwen with Ollama

Ollama is the best first step if you want a working model in a few minutes and do not need to manage model files by hand.

As an Amazon Associate I earn from qualifying purchases.

  1. Install Ollama from the snap store:
    sudo snap install ollama
  2. Run the small Qwen3 example that Ubuntu documents:
    ollama run qwen3:0.6b

    This confirms the runtime works. It does not show that larger models will run well on your computer.

  3. To use other sizes, choose a tag that Qwen’s Ollama instructions list, such as qwen3:8b or qwen3:30b-a3b:
    ollama run qwen3:8b

Qwen’s instructions describe the Ollama service as the piece you start with ollama serve. Keep it running while you use Ollama’s API, which defaults to http://localhost:11434/v1/. Qwen’s repository recommends Ollama v0.9.0 or higher for that documentation. Version recommendations and tag names change, so check the current Qwen Ollama page before you copy a tag.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Thinking mode and context settings

Qwen3 has thinking enabled by default. Inside an Ollama session you can switch it with /set nothink and back with /set think. Qwen also documents how to set num_ctx (context length) and num_predict (output length). Qwen specifically warns that Ollama’s default context may be unsuitable for Qwen3, so set context deliberately for your workload. Do not treat any single context value as safe for every model or machine: a larger context generally needs more memory.

#1 Best Overall
Panasonic Toughbook CF-31 MK5 Rugged Laptop, 13.1in i5, 8GB 256GB (Renewed) | Touch, 4G LTE, Backlit Keyboard, Linux Ubuntu OS
  • [ULTRA-RUGGED DESIGN] MIL-STD-810G and IP65 certified. Built to survive 6-foot drops, heavy rain, and extreme vibrations. Features a magnesium alloy chassis with an integrated carry handle for maximum portability
  • [4G LTE - WORK ANYWHERE] Integrated 4G LTE Multi-Carrier Mobile Broadband. Stay connected to the internet in remote areas or on the road without relying on Wi-Fi or phone hotspots. True mobile freedom for field professionals
  • [1200-NIT SUNLIGHT READABLE] 13.1" XGA Touchscreen with CircuLumin technology. At 1200 nits, it is nearly 4x brighter than a standard laptop, ensuring perfect visibility under direct, intense sunlight
  • [LINUX UBUNTU PRE-INSTALLED] Fast, secure, and bloatware-free. Optimized for developers, network engineers, and diagnostic software that thrives in a stable, open-source environment
  • [LEGACY SERIAL PORT] Features a native RS-232 Serial Port, HDMI, and USB 3.0. Essential for connecting directly to industrial machinery, CNCs, and automotive diagnostic tools without unreliable adapter

Path B: Build llama.cpp and run a GGUF model

Use this route if you want to choose the exact quantization, decide how much work goes to the GPU, or run the llama.cpp binaries directly.

  1. Install the Ubuntu build tools:
    sudo apt install build-essential
  2. Get llama.cpp from its official repository and build it with CMake:
    git clone https://github.com/ggml-org/llama.cpp
    cd llama.cpp
    cmake -B build
    cmake --build build --config Release

    The compiled programs are placed under ./build/bin/.

  3. Use a current build. Qwen’s Qwen3 repository recommends llama.cpp b5401 or later for full Qwen3 support. Qwen’s dedicated llama.cpp guide says Qwen3 and Qwen3MoE are supported from b5092. If you are installing today, follow the stricter b5401 recommendation and check for newer releases.
  4. Download a GGUF model file. Qwen’s guide uses an official Qwen3-8B GGUF in the Q4_K_M quantization, saved into the current directory. GGUF is a format that stores model weights and related model information. Quantization reduces the footprint of the weights, at some cost in output quality.

The guide’s 8B Q4_K_M example shows one combination that Qwen documents. It is not a promised RAM or VRAM minimum for your machine.

CPU and GPU use

llama.cpp uses the CPU by default, and Qwen’s guide says you can specify the number of CPU threads. CPU inference is documented, but the guide does not promise interactive speed for any particular model size.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
HP 17 Business Laptop - Linux Mint Cinnamon - Intel Quad-Core i5-10210U, 32GB RAM, 1TB PCIe NVMe SSD + 1TB Storage HDD, 17.3" Inch HD+ (1600x900) Display
  • Intel Core i5-10210U (up to 4.2GHz) - 1TB PCIe NVMe + 1TB HDD - 32GB DDR4 SDRAM
  • 17.3" HD+ (1600x900) Display, Intel UHD Graphics 620
  • Built in HD 720p Webcam with Microphone - Bluetooth Version4.2
  • I/O Ports: 2x USB 3.1 (Data Only), 1x USB 2.0, 1x HDMI, 1x Headphone/Microphone Combo Jack
  • Linux Mint Cinnamon 64-Bit - 6-Row Keyboard w/ Full Numberpad

GPU offload requires a build compiled with GPU support. Qwen’s guide lists CUDA, hipBLAS, SYCL, Vulkan, and other backends. Your driver, GPU, and chosen backend all matter, and the backend-specific build instructions for your GPU are the ones to follow. Installing build-essential alone does not enable GPU acceleration.

Choosing a model size without a guaranteed minimum

Because the official sources do not publish per-model hardware thresholds, use a test-first process rather than a lookup table.

  • Start with the smallest variant. Confirm that qwen3:0.6b or an equivalent small build loads and answers before you try anything larger.
  • Move up one size at a time. After each step, check how much memory the model uses while it runs and whether responses are usable for your work.
  • Treat quantization as a lever. A smaller quantization reduces file size and runtime footprint. Qwen’s example uses Q4_K_M, but other quantizations may suit your hardware better, and the guide does not compare them for you.
  • Watch context length. Larger context settings can increase resource needs, so raise them only when your task requires it.
  • Check storage first. Model files take disk space. The official guide does not state a universal capacity for a usable installation. An external SSD for local model files is an optional option if your internal drive lacks room; Qwen’s documentation does not recommend a particular drive or capacity.

Avoid rules such as “8 GB of RAM runs an 8B model.” Such claims need a model-specific, current source that names the quantization, context length, runtime, and workload. The official documentation reviewed does not supply one for either Ubuntu release.

Rank #3
Lenovo IdeaPad Slim 3 Linux Laptop, 15.6" FHD Touchscreen Laptop, 8-Core AMD Ryzen 7 5825U, 16GB RAM, 512GB SSD, Keypad, SD Card Reader, Stylus Pen + External Portable SSD + USB Hub, Linux Ubuntu OS
  • Powerful Linux Laptop: This IdeaPad Slim 3 Laptop comes pre-installed with Ubuntu Linux, offering fast performance, robust security, and a clean, user-friendly experience. Enjoy full customization, seamless hardware compatibility, and access to thousands of open-source apps. Whether you're working, creating, or coding, it's built to keep up with everything you do.
  • A Multitasking Master: The latest AMD Ryzen 7 5825U processor (up to 4.5 GHz) delivers powerful performance with 8 cores and 16 threads for smooth multitasking. Integrated AMD Radeon Graphics provide crisp visuals for streaming, browsing, photo editing, and casual gaming. With smart machine intelligence, it adapts to your needs for a fast, responsive experience.
  • 15.6" Full HD Display: The IdeaPad Slim 3 boasts an 88% screen-to-body ratio for a floating, edge-to-edge visual experience. TÜV Low Blue Light certification reduces eye strain, making it perfect for long work or study sessions.
  • Military-Grade Durability: The smart IdeaPad Slim 3 combines portability and durability, letting you work, study, and play on the go. With a profile 10% slimmer than the previous generation, it's lightweight yet military-grade rugged, ready for anything, anywhere.
  • Versatile Connectivity: Enjoy the security of a built-in webcam with a privacy shutter. Connect effortlessly with multiple ports: 2x USB A, 1x USB C, 1x HDMI, 1x SD Card Reader, 1x Headphone/Microphone combo. Bundle comes with Stylus Pen, 256GB Portable SSD and 5-in-1 Docking Station.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Ubuntu 24.04 and 26.04 differences

Ubuntu’s AI guidance explicitly addresses Ubuntu 26.04. It documents the Ollama snap example and gives sudo apt install cuda-toolkit as the package path for installing the CUDA toolkit on 26.04. That command establishes the toolkit package path only. It does not confirm that a specific GPU, driver, Qwen runtime, or model combination will work.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The official sources reviewed do not include a full comparison of Ollama and llama.cpp behavior on Ubuntu 24.04 versus 26.04. If you are on 24.04, follow the same steps but verify each command’s output on your system, and do not assume that any GPU result carries over from 26.04.

Which path fits your needs

Choice Better fit Trade-off
Ollama Fastest beginner setup and a simple model-tag workflow Less low-level control. Confirm current tags and set context deliberately.
llama.cpp Control over GGUF quantization, CPU and GPU offload, and direct use of the binaries Requires a build, a backend choice that matches your GPU, and selecting and storing model files yourself.

This comparison reflects the official setup steps. It is not a benchmark, and neither route is shown here to be faster.

If something does not work

  • Ollama API calls fail: confirm that ollama serve is running, since Qwen’s instructions say the service must stay up.
  • The model runs out of memory or responds very slowly: step down to a smaller tag or quantization, and reduce context length.
  • GPU is not used in llama.cpp: confirm the build was compiled with a GPU backend that matches your hardware, rather than relying on the default CPU build.

”

The Bottom Line

For most readers, start with Ollama and qwen3:0.6b to confirm the setup works, then move to a larger tag only after checking your own memory and storage. Choose llama.cpp when you need to control the model file, quantization, or GPU use.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GGUFllama.cpplocal LLMOllamaQwenUbuntuUbuntu 24.04Ubuntu 26.04

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.