Skip to content

model : add DSpark draft support for Spark-X2.6 - #9

Merged
Septend-fun merged 1 commit into
XHToken:pr-for-llamafrom
Septend-fun:pr-for-llama
Oct 26, 2026
Merged

Septend-fun merged 1 commit into
XHToken:pr-for-llamafrom
Septend-fun:pr-for-llama

Conversation

@Septend-fun

Copy link
Copy Markdown
Collaborator

Overview

Add conversion and inference support for Spark-X2.6 DSpark drafts.

Spark-X2.6 shares the Spark2.5 architecture and uses the existing Spark2_5ForCausalLM conversion and spark2_5 runtime.

  • Export the embedded draft_model.* weights with --dspark, and exclude them from normal target conversion.
  • Support feature normalization before fusion, headwise sigmoid attention gates, GELU FFN, and per-layer full/sliding-window RoPE.
  • Reuse the existing DSpark Markov head, confidence head, and target verification flow.

Additional information

Validation with the supplied checkpoint:

  • Built llama-server, llama-completion, and test-llama-archs.
  • Verified all 59 exported draft tensors against the original checkpoint.
  • Compared draft outputs with an independent PyTorch FP32 reference on CPU and CUDA: 24/24 top-1 matches.
  • With greedy sampling and f16 KV cache, all 12 measured responses matched target-only token sequences.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES. Codex assisted in verifying the correctness of the DSpark draft integration.

Signed-off-by: Septend-fun <916953947@qq.com>
@Septend-fun
Septend-fun merged commit 41eab1a into XHToken:pr-for-llama Oct 26, 2026
15 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant