Skip to content

DFlash2 crashes on first prompt with Qwen3.8-Flash-Next in Unsloth build #14381

Closed
unslothai/llama.cpp
#307

Description

@Biotrioo

Summary

When using the Unsloth llama.cpp build b11724-mix-c208e5f, Qwen3.8-Flash-Next (UD-IQ3_XXS) with the external DFlash2 Q8_0 drafter starts successfully, but the server crashes as soon as the first prompt is submitted.

The same failure occurred in three separate server launches.

Environment

  • Windows 11
  • AMD Radeon AI PRO R9700 (gfx1201, 32 GB VRAM), ROCm/HIP
  • 128 GB system RAM
  • Unsloth llama.cpp build: b11724-mix-c208e5f
  • Context: 131072 tokens
  • Microbatch: 2048

Models

Reproduction steps

  1. Load the Qwen3.8-Flash-Next UD-IQ3_XXS target.
  2. Configure the external DFlash2 Q8_0 GGUF.
  3. Start the server with:
--moe-cache-mib auto --fit on --load-mode none --lazy-mode off --flash-attn on --spec-type draft-dflash --spec-draft-model "<path>/Qwen3.8-Flash-Next-DFlash2-Q8_0.gguf" --spec-draft-n-max 3 --spec-draft-p-min 0.0 --spec-draft-ngl all -lv 3
  1. Wait until the server is ready.
  2. Submit any text prompt.

Actual behavior

The first request triggers an assertion in llama_context::extract_layer_inputs() and the process exits:

common_speculative_impl_draft_dflash:
  adding speculative implementation 'draft-dflash'

n_max=3, n_min=0, p_min=0.00
block_size=8, mask_token_id=248077
n_extract=5, sample_from_anchor=true

srv load_model: model loaded
srv llama_server: listening
slot launch_slot_: processing task

src/llama-context.cpp:2456:
GGML_ASSERT(row_floats == model.hparams.n_embd) failed

[studio] attempt end reason=exited
exit_code=3221226505

Removing the explicit --spec-draft-n-max 3 override did not resolve it.

Expected behavior

DFlash2 speculative decoding should work, or the server should report incompatible model dimensions without crashing.

Additional observations

  • The drafter loads successfully and the target model initializes normally.
  • MoE auto-cache allocates 22238 MiB.
  • The same target works with its Q8_0 MTP drafter.
  • The crash occurs before token generation.
  • The root cause is not established. DFlash2 reports n_extract=5, while target hidden-state extraction fails the expected row-width assertion. This could involve architecture-specific feature extraction, GGUF metadata, or missing Qwen3.8-Flash-Next support.
  • An upstream llama.cpp build has not yet been tested.
  • The diagnostic ZIP containing logs from all three runs is available on request.

Could you route this to whoever maintains the Unsloth llama.cpp build or advise whether this combination should already be supported?

Activity

  1. self-assigned this
    on Nov 2, 2026
  2. danielhanchen commented on Nov 2, 2026

    @danielhanchen
    Member

    Fixed! The first-prompt crash came from passing four hidden-state streams to a drafter that expects one vector per token, and upstream llama.cpp #30927 fixed the extraction. The fix is included in the published b11985-mix-c116c32 build, including Windows ROCm gfx1201.
    To update: use unsloth studio update, or replace a standalone llama.cpp installation with the Windows ROCm gfx120X archive and launch its new executable. Reopen if it still happens.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions