Instructions to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Anbeeld/Kimi-K2.7-Code-DSpark-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Anbeeld/Kimi-K2.7-Code-DSpark-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
- Ollama
How to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with Ollama:
ollama run hf.co/Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with Docker Model Runner:
docker model run hf.co/Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
- Lemonade
How to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Kimi-K2.7-Code-DSpark-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Anbeeld/Kimi-K2.7-Code-DSpark-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Anbeeld/Kimi-K2.7-Code-DSpark-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Add Kimi-K2.7-Code-DSpark-GGUF
Browse files- .gitattributes +7 -0
- Kimi-K2.7-Code-DSpark-Q2_K.gguf +3 -0
- Kimi-K2.7-Code-DSpark-Q3_K_M.gguf +3 -0
- Kimi-K2.7-Code-DSpark-Q4_K_M.gguf +3 -0
- Kimi-K2.7-Code-DSpark-Q5_K_M.gguf +3 -0
- Kimi-K2.7-Code-DSpark-Q6_K.gguf +3 -0
- Kimi-K2.7-Code-DSpark-Q8_0.gguf +3 -0
- Kimi-K2.7-Code-DSpark-bf16.gguf +3 -0
- README.md +116 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Kimi-K2.7-Code-DSpark-bf16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
Kimi-K2.7-Code-DSpark-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
Kimi-K2.7-Code-DSpark-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
Kimi-K2.7-Code-DSpark-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
Kimi-K2.7-Code-DSpark-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
Kimi-K2.7-Code-DSpark-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
Kimi-K2.7-Code-DSpark-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
Kimi-K2.7-Code-DSpark-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38ab345731142f801469d741cb7ab00737021ac3a8c8c1a9895c11f3388dba21
|
| 3 |
+
size 1214800864
|
Kimi-K2.7-Code-DSpark-Q3_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:edffc3904bb676c92ae73e283fc3902134fe8f05361428474620f72510b65490
|
| 3 |
+
size 1528174048
|
Kimi-K2.7-Code-DSpark-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb82a13e6f1cfae2305509f220123aef742878bfcd0d118940a25136c8a84fd0
|
| 3 |
+
size 1874079712
|
Kimi-K2.7-Code-DSpark-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49711b4f8902dcec1c9c15fc1d0a1f1c091a8bc90ca95cbb8652ae788062fec9
|
| 3 |
+
size 2221658080
|
Kimi-K2.7-Code-DSpark-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b3c9d50d2563a47871183f0f0065386fabccf1ebfe3560076c2e727231acd0f1
|
| 3 |
+
size 2590960096
|
Kimi-K2.7-Code-DSpark-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0508805680517b76cee0e75e2efb27ee2fdd7485f610476712df1255261651d
|
| 3 |
+
size 3353720800
|
Kimi-K2.7-Code-DSpark-bf16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef7972da0008150567e57e48bec15c028a88884d88139e8312d2cc42dcd33881
|
| 3 |
+
size 6306342880
|
README.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: novita/kimi-k2.7-code-dspark
|
| 3 |
+
tags:
|
| 4 |
+
- speculators
|
| 5 |
+
- safetensors
|
| 6 |
+
- speculative-decoding
|
| 7 |
+
- dspark
|
| 8 |
+
- text-generation
|
| 9 |
+
- custom_code
|
| 10 |
+
- base_model:moonshotai/Kimi-K2.7-Code
|
| 11 |
+
- base_model:finetune:moonshotai/Kimi-K2.7-Code
|
| 12 |
+
- region:us
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Kimi-K2.7-Code DSpark GGUF
|
| 16 |
+
|
| 17 |
+
GGUF quantizations of [**novita DSpark draft model**](https://huggingface.co/novita/kimi-k2.7-code-dspark) for [**Kimi-K2.7-Code**](https://huggingface.co/moonshotai/Kimi-K2.7-Code).
|
| 18 |
+
|
| 19 |
+
Use with [BeeLlama.cpp](https://github.com/Anbeeld/beellama.cpp), a llama.cpp fork with advanced quantization features.
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Kimi-K2.7-Code DSpark speculator
|
| 24 |
+
|
| 25 |
+
## Overview
|
| 26 |
+
|
| 27 |
+
A DSpark speculator model for the `Kimi-K2.7-Code` base model, enabling faster
|
| 28 |
+
inference through speculative decoding. DSpark extends the DFlash parallel draft
|
| 29 |
+
backbone with two lightweight heads: a **Markov logit-bias head** (low-rank
|
| 30 |
+
intra-block token dependency) and a **per-position confidence head** (accept-rate
|
| 31 |
+
prediction). This checkpoint was trained in the Camelot-Ray online pipeline,
|
| 32 |
+
where the draft consumes hidden states streamed from a live Kimi-K2.7-Code vLLM
|
| 33 |
+
server.
|
| 34 |
+
|
| 35 |
+
This export is from Camelot exp38 checkpoint 3.
|
| 36 |
+
|
| 37 |
+
## Model Specifications
|
| 38 |
+
|
| 39 |
+
- **Base Model**: Kimi-K2.7-Code
|
| 40 |
+
- **Format**: Safetensors (single-file bf16, 6.3 GB, 44 tensors)
|
| 41 |
+
- **Draft**: 3 layers (Qwen3-style GQA), hidden 7168, 56 heads / 8 KV heads,
|
| 42 |
+
head_dim 128, FFN 18432, rope_theta 50000, `block_size=8`
|
| 43 |
+
- **Vocabulary**: pruned draft vocab 32,000 (d2t/t2d remap tables shipped in the
|
| 44 |
+
weights), target vocab 163,840; mappings reused from the Kimi-K2.6/K2.7
|
| 45 |
+
compatible tokenizer setup
|
| 46 |
+
- **DSpark heads**: Markov rank 256 (vanilla), confidence head (with-markov),
|
| 47 |
+
`mask_token_id=163608`
|
| 48 |
+
- **Aux hidden-state layers**: [1, 29, 57]
|
| 49 |
+
- **Trained context**: seq 20000
|
| 50 |
+
|
| 51 |
+
## Evaluation Results
|
| 52 |
+
|
| 53 |
+
Online vLLM nightly spec-decode, greedy decoding, TP=8, Kimi-K2.7-Code verifier,
|
| 54 |
+
`max_model_len=20000`, cudagraphs enabled, and
|
| 55 |
+
`fuse_allreduce_rms=false`.
|
| 56 |
+
|
| 57 |
+
The table also includes Novita's public Eagle3-MLA draft
|
| 58 |
+
`novita/kimi-k2.7-code-eagle3-mla` under the same Kimi-K2.7-Code verifier,
|
| 59 |
+
TP=8, cudagraph, and fusion-off serving setup. Cells show
|
| 60 |
+
`tok/s / speedup / accept_len`. The standard rows use 6 prompts per benchmark;
|
| 61 |
+
code-extra rows use the full LiveCodeBench and SPEED-Bench coding manifests
|
| 62 |
+
with `max_tokens=512`.
|
| 63 |
+
|
| 64 |
+
| benchmark | rows | baseline tok/s | DSpark n=3 | DSpark n=7 | Novita Eagle3 n=3 | Novita Eagle3 n=7 | best |
|
| 65 |
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: | --- |
|
| 66 |
+
| gsm8k | 6 | 132.0 | 282.2 / 2.14x / 2.937 | 309.1 / 2.34x / 3.659 | 281.7 / 2.13x / 2.941 | 277.3 / 2.10x / 3.595 | DSpark n=7 |
|
| 67 |
+
| math500 | 6 | 132.0 | 317.1 / 2.40x / 3.249 | 367.4 / 2.78x / 4.303 | 288.6 / 2.19x / 3.026 | 294.5 / 2.23x / 3.851 | DSpark n=7 |
|
| 68 |
+
| aime | 6 | 131.5 | 276.8 / 2.10x / 2.778 | 318.4 / 2.42x / 3.716 | 263.2 / 2.00x / 2.766 | 275.3 / 2.09x / 3.626 | DSpark n=7 |
|
| 69 |
+
| humaneval | 6 | 132.1 | 285.1 / 2.16x / 2.875 | 336.6 / 2.55x / 3.953 | 285.9 / 2.17x / 3.029 | 291.8 / 2.21x / 3.850 | DSpark n=7 |
|
| 70 |
+
| livecodebench | 121 | 129.8 | 227.5 / 1.75x / 2.306 | 231.0 / 1.78x / 2.696 | 219.5 / 1.69x / 2.342 | 198.5 / 1.52x / 2.593 | DSpark n=7 |
|
| 71 |
+
| speedbench_coding | 80 | 131.2 | 282.0 / 2.15x / 2.837 | 303.7 / 2.31x / 3.530 | 272.1 / 2.06x / 2.886 | 281.6 / 2.13x / 3.693 | DSpark n=7 |
|
| 72 |
+
|
| 73 |
+
Use DSpark with `num_speculative_tokens=7` as the default for code, math, and
|
| 74 |
+
most reasoning traffic.
|
| 75 |
+
|
| 76 |
+
## Serving with vLLM
|
| 77 |
+
|
| 78 |
+
Requires a vLLM nightly with DSpark support:
|
| 79 |
+
|
| 80 |
+
```bash
|
| 81 |
+
uv pip install vllm --extra-index-url https://wheels.vllm.ai/nightly
|
| 82 |
+
|
| 83 |
+
vllm serve moonshotai/Kimi-K2.7-Code \
|
| 84 |
+
--tensor-parallel-size 8 \
|
| 85 |
+
--max-model-len 20000 \
|
| 86 |
+
--trust-remote-code \
|
| 87 |
+
--compilation-config='{"pass_config": {"fuse_allreduce_rms": false}}' \
|
| 88 |
+
--speculative-config '{
|
| 89 |
+
"model": "novita/kimi-k2.7-code-dspark",
|
| 90 |
+
"num_speculative_tokens": 7,
|
| 91 |
+
"method": "dspark"
|
| 92 |
+
}'
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
Known vLLM-nightly caveats, with workarounds:
|
| 96 |
+
|
| 97 |
+
1. Draft-side FA3 AOT scheduling can crash with `scheduler_metadata must have
|
| 98 |
+
shape (metadata_size)` because the GPU-worker spec-decode path misses
|
| 99 |
+
`fast_build=True` when building draft attention metadata. Patch
|
| 100 |
+
`vllm/v1/worker/gpu/spec_decode/speculator.py` and
|
| 101 |
+
`vllm/v1/worker/gpu/attn_utils.py` to pass `fast_build=True`.
|
| 102 |
+
2. CUDA-graph capture can fail with a flashinfer allreduce workspace-size error
|
| 103 |
+
under spec-decode token expansion; disable the fusion:
|
| 104 |
+
`--compilation-config='{"pass_config": {"fuse_allreduce_rms": false}}'`.
|
| 105 |
+
|
| 106 |
+
## Training Details
|
| 107 |
+
|
| 108 |
+
- **Initialization**: continued from the Kimi-K2.7-Code DSpark exp37 checkpoint
|
| 109 |
+
- **Data**: Kimi-K2.7-Code training mix with public Kimi-MTP data and hidden
|
| 110 |
+
states streamed from the live Kimi-K2.7-Code verifier; seq 20000
|
| 111 |
+
- **Steps**: 20000 optimizer steps
|
| 112 |
+
- **Schedule**: lr 3e-4 cosine, warmup 300, global batch 8, accumulation 2
|
| 113 |
+
- **Loss**: 0.1 CE + 0.9 TV over block-diffusion anchors, decay_gamma 4.0,
|
| 114 |
+
max_anchors 3072
|
| 115 |
+
- **Semantics**: `apply_verifier_norm=False`, hidden_states = concat of aux
|
| 116 |
+
layers [1, 29, 57]
|