ollama - ✅(Solved) Fix qwen3next: layer 0 missing attn_qkv/attn_gate projections [1 pull requests, 18 comments, 9 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#14587Fetched 2026-04-08 00:28:37
View on GitHub
Comments
18
Participants
9
Timeline
41
Reactions
12
Author
Timeline (top)
commented ×18subscribed ×15cross-referenced ×2marked_as_duplicate ×2

Error Message

ollama run qwen3-next:80b-a3b-instruct-q4_K_M Error: 500 Internal Server Error: failed to initialize model: qwen3next: layer 0 missing attn_qkv/attn_gate projections

Fix Action

Fixed

PR fix notes

PR #15133: model: add qwen3-next compatibility for legacy ssm_in projections

Description (problem / solution / changelog)

Fixes #14587

Changed files

  • model/models/qwen3next/deltanet.go (modified, +21/-6)
  • model/models/qwen3next/model.go (modified, +1/-1)
  • model/models/qwen3next/model_validate_test.go (modified, +25/-0)

Code Example

ollama run qwen3-next:80b-a3b-instruct-q4_K_M
Error: 500 Internal Server Error: failed to initialize model: qwen3next: layer 0 missing attn_qkv/attn_gate projections

---
RAW_BUFFERClick to expand / collapse

What is the issue?

Since Ollama 0.17.5 I get the following error:

ollama run qwen3-next:80b-a3b-instruct-q4_K_M
Error: 500 Internal Server Error: failed to initialize model: qwen3next: layer 0 missing attn_qkv/attn_gate projections

Relevant log output

OS

Linux

GPU

NVIDIA RTX PRO 6000 Blackwell Workstation Edition

CPU

Intel(R) Core(TM) Ultra 9 285K

Ollama version

0.17.5

extent analysis

Fix Plan

Fix Name: Update Model Configuration

Step 1: Update Model Configuration File

Update the ollama.toml file to include the missing attn_qkv and attn_gate projections for the qwen3-next model.

[model.qwen3-next]
layer0.attn_qkv = true
layer0.attn_gate = true

Step 2: Update Model Code (if necessary)

If the model code is not automatically generated, update the qwen3-next model code to include the missing projections.

# qwen3-next.py
import torch
import torch.nn as nn

class Qwen3NextLayer0(nn.Module):
    def __init__(self):
        super(Qwen3NextLayer0, self).__init__()
        self.attn_qkv = nn.Linear(128, 128 * 3)  # Update projection size
        self.attn_gate = nn.Linear(128, 128)  # Update projection size

    def forward(self, x):
        # ...
        attn_qkv = self.attn_qkv(x)
        attn_gate = self.attn_gate(x)
        # ...

Step 3: Re-run Ollama

Run ollama run qwen3-next:80b-a3b-instruct-q4_K_M again to verify the fix.

Verification

  • Check the Ollama logs for any errors.
  • Verify that the model is running without errors.
  • Test the model with sample inputs to ensure it produces the expected output.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING