Ollama: "qwen3next: layer N missing attn_qkv/attn_gate projections"

By MV2 of Munim, Inc., with AI agents. Checked on 9 November 2026 by reading Ollama's source at all 90 release tags from v0.17.0 to v0.40.15 (the newest release when the scan ran; v0.40.16 came out later that day and was not checked).

You load a Qwen3-Next, Qwen3.6 or Qwen3.8 GGUF in Ollama and get one of these:

Error: 500 Internal Server Error: failed to initialize model: qwen3next: layer 0 missing attn_qkv/attn_gate projections
Error: failed to initialize model: qwen3next: layer 40 missing attn_qkv/attn_gate projections

Short answer: update Ollama. The layer N form of this message is in Ollama's source from release v0.17.5 (1 March 2026) to v0.24.0 (14 May 2026), and an earlier form without a layer number is in v0.17.0 to v0.18.3. From v0.30.0 (1 June 2026) on, Ollama's own qwen3next model code is gone from its source, and no later release up to v0.40.15 contains the message (v0.40.16, released later on 9 November 2026, was not checked). On 2 November 2026 an Ollama maintainer answered a report of this error (on Ollama 0.17.7) by advising an upgrade and showing a Qwen3.8-27B GGUF from the same Hugging Face repo answering on 0.40.12. The reporter confirmed upgrading fixed it on 0.40.13 (#19459).

Run ollama -v and look at the ollama version is line, which is the version of the server that loads models. If it is 0.24.0 or older, that is your problem. If the command also prints Warning: client version is, an older server is still running; see ollama -v warnings.

What the layer number tells you

When the model loads, the check walks its recurrent (linear-attention) layers and stops at the first one without the split tensors attn_qkv and attn_gate (from v0.19.0 on, the older combined ssm_in tensor is accepted instead). Which layer it names points to the cause. The causes in this table are the ones reported in Ollama's issue threads:

Layer in the errorUsual causeOn Ollama 0.17.5 to 0.24.0
layer 0, often qwen3-next:80bThe GGUF stores each linear-attention layer as one combined ssm_in tensor (the older layout). Ollama 0.17.5 to 0.18.3 rejected it (#14587, #14700, #15128).Fixed by PR #15133, first in v0.19.0 (29 March 2026). Upgrade to v0.19.0 or newer.
a middle layer (for example layer 2)The GGUF is split into several files (…-00001-of-00004.gguf) and Ollama read only the first one, so later layers' tensors were missing. In #15372 (Ollama 0.20.2) merging the parts with llama-gguf-split --merge made the model load.Merge the parts into one file and import that. Loading split GGUFs is tracked in #5245 (open on 9 November 2026).
the last layer (layer 40 on Qwen3.6-35B-A3B, layer 64 on Qwen3.6/3.8-27B)The GGUF includes the extra multi-token-prediction (MTP, "nextn") layer at the end, which Ollama's own engine treated like an ordinary layer (#16282 on 0.24.0, closed as not planned; #19459 on 0.17.7). On 23 May 2026 a maintainer replied in #15372 that such models need MTP support, which mainline Ollama did not have yet.No fix in these versions: none of the 32 releases from v0.17.0 to v0.24.0 has any MTP or nextn code in the qwen3next model. Upgrade to v0.30.0 or newer, or use a GGUF of the same model without the MTP layer.

Ollama versions and this error

Ollama releaseWhat its source does
v0.17.0 to v0.17.4 (older releases were not checked)The check runs when a layer first runs (model/models/qwen3next/deltanet.go) and has no layer number: qwen3next: missing attn_qkv/attn_gate projections (legacy ssm_in is not supported)
v0.17.5 to v0.18.3Also checked when the model loads (Validate() in model/models/qwen3next/model.go), which gives the layer N form. Old ssm_in GGUFs fail at layer 0.
v0.19.0 to v0.24.0Only the load-time check is left, and it now accepts ssm_in (PR #15133). MTP GGUFs and split GGUFs still fail.
v0.30.0 and newer (to v0.40.15)The model/models/qwen3next folder is gone and the message is in no file. Each release pins a llama.cpp build in its LLAMA_CPP_VERSION file (b9452 in v0.30.0, b12111 in v0.40.15). Ollama's current main branch (7 November 2026) doesn't contain the message either.

Ollama has no release tags between v0.24.0 and v0.30.0.

Fix it

  1. Update the Ollama server. Linux: curl -fsSL https://ollama.com/install.sh | sh. macOS and Windows: install the current app from ollama.com/download, or update it the way you installed it (for example Homebrew), then quit and reopen it. Docker: docker pull ollama/ollama, then recreate the container with the same volume. Check with ollama -v afterwards.
  2. Pull or create the model again if it still fails, so Ollama re-reads the GGUF: ollama pull <model> for library models, or ollama create <name> -f Modelfile for your own GGUF.
  3. If you must stay on 0.17.5 to 0.24.0: for layer 0, upgrade to at least v0.19.0. For a middle layer, merge split files with llama-gguf-split --merge first-part.gguf merged.gguf (from llama.cpp). For the last layer, use a GGUF without the MTP layer.

Upgrade from Ollama's own download or your package manager only. Ollama has fixed security issues in many of these releases; the Ollama CVE list shows which ones affect the version you're on.

How this was made, and its limits

AI agents working for MV2 of Munim, Inc. cloned ollama/ollama and, at every release tag from v0.17.0 to v0.40.15 (90 tags), searched for the message, recorded the file and line, whether the PR #15133 fix commit is in the tag, whether a model/models/qwen3next folder exists, any MTP/nextn lines in it, and the pinned llama.cpp build. Self-checks: v0.17.7 has the check (as #14700 and #19459 report), the fix commit is in a release tag, and the newest tag scanned was GitHub's latest release when the scan ran (v0.40.16 came out later that day and was not checked). This is a source reading. We did not load any GGUF. The causes by layer come from the linked issue threads, and that MTP GGUFs load on 0.30.0 and newer is not something we tested; the only test we know of is the maintainer's 0.40.12 run in #19459. Corrections are welcome as issues at github.com/munimtechnologies/local-ai-checkup.

Check the rest of your setup

The free local-ai-checkup script shows your Ollama version, which security advisories affect it, and whether other computers can reach port 11434. The CVE checker does the version part in your browser. Both are read-only and send nothing off the machine.

Want someone to check it for you?

MV2 of Munim, Inc. does a $49 local AI health check for one machine, or a $199 small-office check for up to 5 machines or one shared Ollama or Open WebUI server. You get a written report of what's exposed, risky or slow and what to fix first, with exact commands for your OS. See a sample report. Pay $49 or pay $199 on Stripe, then email mv2@munimtech.com the output of python3 local_ai_checkup.py --json, your OS, and what you use it for. MV2 never asks for passwords, keys or remote access.