Skip to content

[Bug] Inkling MTP crashes during draft-extend CUDA graph capture #35039

Closed

Description

@ispobock

Describe the bug

Serving Inkling with MTP (multi-layer EAGLE) crashes at startup while capturing the draft-extend CUDA graph. forward_batch.extend_prefix_lens is None when the short-conv backend refreshes its track indices:

AttributeError: 'NoneType' object has no attribute 'shape'
  speculative/multi_layer_eagle_draft_extend_cuda_graph_runner.py:930  multi_step_fn
  layers/attention/hybrid_linear_attn_backend.py:1007                  init_forward_metadata_in_graph
  layers/attention/linear/inkling_sconv_backend.py:451                 _refresh_track_conv_indices

The same configuration serves normally with CUDA graphs disabled (--disable-cuda-graph --cuda-graph-backend-prefill disabled), reaching an accept length of 2.4-3.0, so it is specific to the capture path.

Reproduction

python3 -m sglang.launch_server --trust-remote-code \
  --model-path thinkingmachines/Inkling-Small-NVFP4 --tp 8 \
  --quantization modelopt_fp4 --attention-backend fa4 --page-size 128 \
  --fp4-gemm-backend flashinfer_trtllm --moe-runner-backend flashinfer_trtllm_routed \
  --enable-torch-symm-mem --mamba-radix-cache-strategy extra_buffer \
  --mem-fraction-static 0.60 --swa-full-tokens-ratio 0.1 --mamba-full-memory-ratio 0.1 \
  --enable-multimodal --reasoning-parser inkling --tool-call-parser inkling \
  --speculative-algorithm EAGLE --speculative-num-steps 8 --speculative-eagle-topk 1 \
  --speculative-num-draft-tokens 9 --enable-multi-layer-eagle --speculative-use-rejection-sampling

All 8 ranks hit the same exception and the server never becomes ready.

Environment

sglang 4a6dc267.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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