Skip to content

[Bug] Internal error due to MTP set on by default on Apple Silicon #13253

Closed

Description

@SpottedCatStudio

Title: [Bug] Gemma 4 (E2B) returns 500 Internal Server Error on every request on Apple Silicon after recent updates — caused by auto-enabled speculative decoding (MTP)

Where are you using Unsloth?

  • Unsloth desktop application / Unsloth Studio

Operating system and version:
macOS 27, Apple Silicon

GPU model(s) and accelerator backend:
Apple M2 (Mac mini), 8 GB unified memory, Metal

Versions:
Latest (updated early October 2026, after the two most recent releases)

Model and operation involved:

  • Model: Gemma 4 E2B (GGUF)
  • Operation: inference / chat

What happened?

After the last two Studio updates, the Gemma 4 E2B model loads but returns a 500 Internal Server Error on every single request. llama-server crashes at generation time.

Before these updates, the exact same model ran without any issue on this machine, even with a 64K context window.

Steps to reproduce:

  1. Load Gemma 4 E2B (GGUF) in Unsloth Studio on an Apple Silicon Mac.
  2. Send any chat request.
  3. Every request fails with a 500 Internal Server Error.

Expected behavior:
Model generates responses normally, as it did before the updates.

Actual behavior:
Every request returns a 500 Internal Server Error.

What I ruled out:

  • Not a memory issue: E2B is the smallest variant (~4 GB at 4-bit) and previously ran fine at 64K context on 8 GB.
  • Reducing the context window from 64K down to 16K did NOT fix it.

Root cause / fix:
The problem was speculative decoding (MTP), which is now auto-enabled by default for Gemma 4. Disabling speculative decoding / MTP in the model run settings and reloading the model fully resolved the issue — all requests work again.

Suggestion:
On Apple Silicon (especially lower-memory Macs like M2 8 GB), MTP should either not be auto-enabled for Gemma 4 by default, or Studio should gracefully fall back to non-MTP inference instead of crashing llama-server and surfacing a generic 500 error. A clearer error message pointing at speculative decoding would also help.

Activity

  1. added
    feature request
    on Oct 10, 2026
  2. changed the title [-][Bug] Please fill in your issue title here.[/-] [+][Bug] Internal error due to MTP set on by default on Apple Silicon[/+] on Oct 10, 2026
  3. MVPuknowme commented on Oct 11, 2026

    @MVPuknowme

    Add use of .pnpk

  4. danielhanchen commented on Oct 11, 2026

    @danielhanchen
    Member

    Fixed! When the Gemma 4 MTP drafter crashed llama-server during generation, Studio restarted it with the same drafter every time, so every request failed. Studio now reloads the model once without speculative decoding after such a crash, so chat keeps working and the run settings show why speculative decoding was turned off. Fixed in #13316.
    To update: Unsloth Desktop will have an update banner. For Studio, use unsloth studio update. For Docker, use docker exec <container> unsloth-studio-update. Reopen if it still happens.

  5. danielhanchen commented on Oct 11, 2026

    @danielhanchen
    Member

    @SpottedCatStudio if you have a minute, could you share the llama-server log from one of the crashing runs? It is in ~/.unsloth/studio/logs/llama-server/ (the llama-*.log file from when Gemma 4 E2B returned the 500s, with speculative decoding still on). The fix above keeps chat working, but the log would show why the drafter crashes on your M2 so we can get it fixed in llama.cpp itself. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfeature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions