Fix mainline support for DSpark drafter

#18
by ShunAonuma - opened

I get the following error while using BF16 or Q8_0 quantizations:

llama_model_load: error loading model: check_tensor_dims: tensor 'markov_w1.weight' has wrong shape; expected 256, 200058, got 256, 201024, 1, 1

Thanks for the report! The current head of llama.cpp PR #32218 (e4b1cb531) changed the DSpark drafter GGUF format (unpadded markov_w1 of 256 x 200058, among others), so the drafters in this repo, which are in the format Unsloth's llama.cpp prebuilts and Unsloth Studio use, fail there with exactly that error.

We just uploaded drafters converted for #32218:

  • Mainline_Support/dspark-Inkling-2-Mini-Q8_0.gguf_file (0.50 GB, default)
  • dspark/dspark-Inkling-2-Mini-BF16-mainline.gguf_file (0.75 GB, BF16 projections)

Rename them to .gguf after downloading and use them with the model files in Mainline_Support/, for example:

./build/bin/llama-server \
    -m Inkling-2-Mini-UD-Q4_K_XL.gguf \
    -md dspark-Inkling-2-Mini-Q8_0.gguf \
    --spec-type draft-dspark --spec-draft-n-max 5 -ngld 99 \
    --jinja -ngl 99 -c 32768 \
    --temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0

We checked both on a clean build of #32218 at e4b1cb531 with Mainline_Support/Inkling-2-Mini-UD-Q4_K_XL.gguf, and they accept drafts at the same rate as the old files do on Unsloth's build. On #32218 the drafter always decodes its full 8-token block, so --spec-draft-n-max 5 was the fastest setting in our tests. Build steps are in Mainline_Support/README.md. If #32218 changes its format again before it is merged, we will update these files.

Mainline support is now on by default!

Sign up or log in to comment