/ Модель

Характеристики

Лицензия
Apache 2.0
Базовая модель
Spark-X2.6-1.7B-FP8
Библиотека
gguf
Опубликована
27 ноя 2026

Spark-X2.6-1.7B-FP8-GGUF

Генерация текстаТекст → текст14 профессий
278скачиваний за 30 дней0лайковвеса обновлены27 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Конверсия Spark-X2.6-1.7B в GGUF с сохранением FP8-весов для локальной генерации текста и диалогов через llama.cpp.

Spark-X2.6-1.7B-FP8-GGUF — неофициальная конверсия модели Spark-X2.6-1.7B-FP8 от XHToken в формат GGUF для запуска через llama.cpp. Модель общего назначения с архитектурой Spark2_5 и примерно 1,7 млрд параметров; в этой версии веса сохранены в формате FP8 E4M3 с исходными поканальными масштабами, без деквантизации и повторного квантования. Репозиторий распространяется по лицензии Apache-2.0.

Модель предназначена для генерации текста и диалогов на устройстве, включая программирование, многошаговое планирование, работу с инструментами, рассуждения и задачи на длинном контексте. Карточка базовой модели заявляет поддержку английского и китайского языков, а также три режима бюджета рассуждений: none, low и high. В конфигурации развертывания упоминается контекст до 1 048 576 токенов, но его использование требует достаточной памяти устройства.

Для загрузки требуется сборка llama.cpp b12818 или новее. Поддерживаются CPU, CUDA/HIP и Metal; Vulkan пока не поддерживается корректно и может привести к переходу вычислений на CPU. Это конверсия весов, а не новая версия обучения модели; заявленные возможности унаследованы от исходного чекпойнта.

Сценарии применения

  • локальные диалоги с компактной языковой моделью
  • генерация и объяснение кода
  • многошаговое планирование и рассуждения
  • вызов инструментов в агентных сценариях
  • ответы на запросы с длинным контекстом

Ограничения

Требуется llama.cpp b12818 или новее; Vulkan пока не поддерживается для масштабируемых FP8-вычислений и может вызвать медленный переход на CPU. Контекст до 1 048 576 токенов требует достаточной памяти устройства.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

Для каких профессий подходит14

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Spark-X2.6-1.7B-FP8-GGUF with preserved FP8 weights

[!IMPORTANT] Requires llama.cpp build b12818 or newer. That is commit a38695013, "ggml: support quant scales for fp8 and nvfp4" (#28898, merged 2026-11-27). The last release without it is b12816, so prebuilt binaries up to that fail. Check with llama-cli --version, which prints the build number and commit.

[!TIP] Click on Files to download the GGUF. HF doesn't recognise FP8 as a valid quant.

The released FP8 checkpoint XHToken/Spark-X2.6-1.7B-FP8 repackaged as GGUF without dequantising it. Weights stay F8_E4M3 and keep their original per-output-channel scales; llama.cpp applies them at inference via ggml_mul_mat_ext. No requantisation, no imatrix, no extra loss.

Independent, unofficial conversion, not affiliated with or endorsed by XHToken. The original model card is reproduced below.

File

filesizeweightsscales
Spark-X2.6-1.7B-FP8.gguf1.85 GiB140 × F8_E4M3140 × F32, one per output channel

366 tensors: 140 F8_E4M3 (matmul projections), 140 F32 .scale companions, F32 norms, and BF16 for the token embedding / small per-head tensors. Roughly 9.3 bpw: a lossless-at-the-weight-format copy of the released FP8 model, not an 8-bit quantisation of the BF16 one.

Requirements

With an older build the loader either does not know the tensor type, or expects a scalar scale, and aborts with:

check_tensor_dims: tensor 'blk.0.attn_output.scale' has wrong shape; expected 1, got 2048, 1, 1, 1

Backends: CPU, CUDA/HIP (ROCm) and Metal apply the scale.

[!WARNING] Vulkan is not supported yet. The Vulkan backend rejects any matmul that carries a weight scale (ggml_get_src_scale() → supports_op() false), so these tensors silently fall back to CPU and inference crawls. Track the open PR: vulkan: add fp8 and scaled matmul support (#29791).

Run

git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release   # add -DGGML_HIP=ON or -DGGML_CUDA=ON as needed
cmake --build build -j"$(nproc)" --target llama-cli llama-perplexity

./build/bin/llama-cli -m Spark-X2.6-1.7B-FP8.gguf -ngl 99 -c 8192

Note that llama-quantize cannot re-quantise this file: F8_E4M3 is a storage type with external scales, so use it as an ~8 bpw reference, not as an input to a quantisation ladder. For K-quant / i-quant versions of this model, see maternion/Spark-X2.6-1.7B-i-GGUF.

How it was converted

Source: XHToken/Spark-X2.6-1.7B-FP8 (quant_method: compressed-tensors, weight_scale shaped [n_out, 1]). That is per-output-channel scaling, not 128×128 blocks, so nothing had to be dequantised: the layout is exactly what ggml_mul_mat_ext consumes.

convert_hf_to_gguf.py defaults to --outtype auto, which preserves supported FP8. Spark2_5Model still needed two small additions to conversion/spark2_5.py, because the FP8 pass refuses to guess for any converter that overrides modify_tensors:

  1. _map_fp8_weight_names(): the fused attention projection is stored as self_attn.q_k_v_proj.weight and is absent from gguf-py's tensor map (the converter renames it by hand in modify_tensors). Without this the FP8 pass cannot find the target tensor at all.
  2. _transform_fp8_scale(): Spark's transform only re-purposes names (q_k_v_proj → attn_qkv, g_proj → attn_gate); it never permutes or splits rows, so the per-row scale passes through unchanged.
def _map_fp8_weight_names(self, name: str) -> tuple[str, ...]:
    if name.endswith(".self_attn.q_k_v_proj.weight"):
        bid = next(int(p) for p in name.split(".") if p.isdecimal())
        return (self.format_tensor_name(gguf.MODEL_TENSOR.ATTN_QKV, bid),)
    return super()._map_fp8_weight_names(name)

def _transform_fp8_scale(self, name: str, scale: Tensor) -> tuple[Tensor, ...] | None:
    # rename-only transform: the scale order is preserved
    if len(self._map_fp8_weight_names(name)) == 1:
        return (scale,)
    return None

Then:

yes y | python convert_hf_to_gguf.py Spark-X2.6-1.7B-FP8 --outfile Spark-X2.6-1.7B-FP8.gguf

Worth stressing: without those two methods the converter does not error. It silently drops the channel scales and writes a BF16 file instead. That is why the result was verified by reading the tensor types back out of the GGUF rather than trusting the exit code:

from gguf import GGUFReader
import collections
r = GGUFReader("Spark-X2.6-1.7B-FP8.gguf")
print(collections.Counter(str(t.tensor_type) for t in r.tensors))

Spark-X2.6-1.7B

Slack Discord YouTube dev.to Bluesky X Zhihu WeChat

[!Note] This repository contains model weights and configuration files for the post-trained model in the Hugging Face Transformers format.

Introduction

We introduce Spark-X2.6-1.7B, the second model in the Spark-X2.6 series, following the release of Spark-X2.6-4B. Building on Spark-X2.5-1.7B, this release further advances our compact, general-purpose language models for on-device deployment.

Spark-X2.6-1.7B retains exactly the same architecture as Spark-X2.5-1.7B, achieving its capability gains through improved post-training. It delivers substantial improvements in coding, agent, long-context, multilingual, reasoning, etc. These capability gains, combined with strong inference efficiency among models of comparable size, enable more capable and practical on-device AI for developers and users tackling real-world tasks.

Technical Highlights:

  • Stronger Coding, Agentic, and Long-Context Capabilities: The model delivers substantial improvements in complex tool use, multi-step planning, software engineering, and reasoning over extended contexts, achieving state-of-the-art performance among open-source models of comparable size.
  • Efficient On-Device Inference: The model delivers strong on-device inference efficiency, achieving leading decoding throughput among similarly sized open-source models in our evaluations and enabling more responsive AI experiences on local hardware.
  • Controllable Thinking Budget: The model provides three configurable thinking levels—none, low, high—allowing applications to balance reasoning quality, latency, and inference cost dynamically.

Benchmarks

We evaluate our models and compare them with leading on-device models of similar size across a broad range of tasks, including agent, code, math, general and knowledge. Spark-X2.6-1.7B surpasses models of comparable size on most benchmarks, delivering state-of-the-art results.

Edge Inference

Spark-X2.6-1.7B delivers leading decoding throughput at shorter context lengths among the on-device models we evaluated, including Qwen3.5-2B, MiniCPM-2B, and LFM2.5-2.6B. Moreover, our optimized llama.cpp implementation(https://github.com/XHToken/llama.cpp) amplifies this performance advantage across all tested context lengths on the RTX 4090, underscoring its strong efficiency for responsive local AI.

Reasoning Effort Comparison

We compare high and low reasoning effort across agent, code, math, long-context, and general knowledge tasks. When switching from high to low, Spark-X2.6-1.7B average score decreases by 4.0 points, while its average output length drops by 37.3%. For Spark-X2.6-4B, the average score decreases by 1.7 points, while average output length drops by 22.0%. This flexibility allows developers to balance task performance and generation efficiency according to their application needs.

Quickstart

Transformers

Install the required version with pip install transformers==4.57.1.

from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "XHToken/Spark-X2.6-1.7B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype="auto",
    device_map="auto",
)
messages = [{"role": "user", "content": "What is the capital of Anhui Province?"}]
inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    enable_thinking=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)
outputs = model.generate(
    **inputs,
    max_new_tokens=131072,
    do_sample=True,
    temperature=1.0,
    top_p=0.95,
    top_k=0,
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

SGLang

The examples below serve a local Spark-X2.6-1.7B checkpoint. Set MODEL_PATH to its absolute path before starting a container:

export MODEL_PATH=/absolute/path/to/Spark-X2.6-1.7B

Install SGLang

Use the pre-built image that tracks the Spark-X2.6 runtime:

For NVIDIA GPUs:
docker pull lmsysorg/sglang:nightly-dev-cu13-20260827-20621aa1
For Ascend NPUs:
# A3 daily build
export SGLANG_IMAGE=quay.io/ascend/sglang:main-cann9.0.0-a3

# A2 daily build (use this instead on A2 hardware)
export SGLANG_IMAGE=quay.io/ascend/sglang:main-cann9.0.0-910b

docker pull "$SGLANG_IMAGE"

Run Inference

The following commands start an OpenAI-compatible API server configured for a maximum context length of 1,048,576 tokens. This setting requires sufficient device memory; reduce --context-length when necessary.

Server

NVIDIA GPU:
docker run --rm -it \
  --gpus '"device=0"' \
  --ipc=host \
  -p 30000:30000 \
  -v "$MODEL_PATH:/root/Spark-X2.6-1.7B:ro" \
  lmsysorg/sglang:nightly-dev-cu13-20260827-20621aa1 \
  python -m sglang.launch_server \
    --model-path /root/Spark-X2.6-1.7B \
    --served-model-name spark2.6 \
    --tool-call-parser spark25 \
    --reasoning-parser qwen3 \
    --tp-size 1 \
    --mem-fraction-static 0.8 \
    --context-length 1048576 \
    --chat-template /root/Spark-X2.6-1.7B/chat_template.jinja \
    --host 0.0.0.0 \
    --port 30000
Ascend NPU:
docker run -it --rm -e ASCEND_USE_FIA=1 --network=host --ipc=host --shm-size=16g \
    --device=/dev/davinci0 --device=/dev/davinci1 --device=/dev/davinci2 --device=/dev/davinci3 \
    --device=/dev/davinci4 --device=/dev/davinci5 --device=/dev/davinci6 --device=/dev/davinci7 \
    --device=/dev/davinci8 --device=/dev/davinci9 --device=/dev/davinci10 --device=/dev/davinci11 \
    --device=/dev/davinci12 --device=/dev/davinci13 --device=/dev/davinci14 --device=/dev/davinci15 \
    --device=/dev/davinci_manager \
    --device=/dev/devmm_svm \
    --device=/dev/hisi_hdc \
    --volume /usr/local/sbin:/usr/local/sbin \
    --volume /usr/local/Ascend/driver:/usr/local/Ascend/driver \
    --volume /usr/local/Ascend/firmware:/usr/local/Ascend/firmware \
    --volume /etc/ascend_install.info:/etc/ascend_install.info \
    --volume /var/queue_schedule:/var/queue_schedule \
    --volume ~/.cache/:/root/.cache/ \
    --volume "$MODEL_PATH:/root/Spark-X2.6-1.7B:ro" \
    --entrypoint=python \
    "$SGLANG_IMAGE" \
    -m sglang.launch_server \
      --model-path /root/Spark-X2.6-1.7B \
      --served-model-name spark2.6 \
      --tool-call-parser spark25 \
      --reasoning-parser qwen3 \
      --tp-size 1 \
      --mem-fraction-static 0.8 \
      --context-length 1048576 \
      --chat-template /root/Spark-X2.6-1.7B/chat_template.jinja \
      --host 0.0.0.0 \
      --port 30000

Client

Thinking is enabled by default by both the chat template and the Qwen3 reasoning parser, default reasoning_effort set to "high". You can configure thinking behavior for each request through chat_template_kwargs: set reasoning_effort to "low" or "high", such as "chat_template_kwargs": {"reasoning_effort": "low"}, or set "chat_template_kwargs": {"enable_thinking": false} to disable thinking.

curl -s http://localhost:30000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "spark2.6",
    "messages": [
      {
        "role": "user",
        "content": "安徽的省会在哪里?"
      }
    ],
    "chat_template_kwargs": {"reasoning_effort": "low"},
    "max_tokens": 131072,
    "temperature": 1,
    "top_k": -1,
    "top_p": 0.95,
    "repetition_penalty": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0
  }'

vLLM

Deploy vLLM

vLLM provides an official Docker image for NVIDIA GPU deployment:

docker run --rm --gpus all \
  --ipc=host \
  -p 30000:30000 \
  -v "$MODEL_PATH:/models/Spark-X2.6-1.7B:ro" \
  vllm/vllm-openai:latest \
  --model /models/Spark-X2.6-1.7B \
  --port 30000 \
  --trust-remote-code \
  --served-model-name spark25 \
  --tensor-parallel-size 1 \
  --gpu-memory-utilization 0.7 \
  --enable-prefix-caching \
  --chat-template /models/Spark-X2.6-1.7B/chat_template.jinja

For Ascend NPUs, choose an official image for the fastest setup.

Ascend A2:
export IMAGE=quay.io/ascend/vllm-ascend:nightly-main
docker pull "$IMAGE"

export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"

mkdir -p "$MODEL_CACHE"

docker run --rm \
    --name vllm-ascend \
    --shm-size=1g \
    --device "$DEVICE" \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -v "$MODEL_CACHE:/root/.cache" \
    -p 8000:8000 \
    -it "$IMAGE" bash
Ascend A3:
export IMAGE=quay.io/ascend/vllm-ascend:nightly-main-a3
docker pull "$IMAGE"

export DEVICE0=/dev/davinci0
export DEVICE1=/dev/davinci1
export MODEL_CACHE="${HOME}/.cache"

mkdir -p "$MODEL_CACHE"

docker run --rm \
    --name vllm-ascend \
    --shm-size=1g \
    --device "$DEVICE0" \
    --device "$DEVICE1" \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -v "$MODEL_CACHE:/root/.cache" \
    -p 8000:8000 \
    -it "$IMAGE" bash
Ascend 950DT:
export IMAGE=quay.io/ascend/vllm-ascend:nightly-main-a5
docker pull "$IMAGE"

export MODEL_CACHE="${HOME}/.cache"

mkdir -p "$MODEL_CACHE"

docker run --rm \
    --name vllm-ascend \
    --net=host \
    --shm-size=1g \
    --device /dev/davinci0 \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -v "$MODEL_CACHE:/root/.cache" \
    -it "$IMAGE" bash

Install the Spark plugin inside the container:

pip install uv
uv venv ~/spark2_6
source ~/spark2_6/bin/activate
git clone https://github.com/XHToken/Spark-plugin.git
cd ./Spark-plugin
uv pip install .

Server

vllm serve "/models/Spark-X2.6-1.7B" \
 --port "30000" \
 --trust-remote-code \
 --served-model-name spark25 \
 --tensor-parallel-size 1 \
 --gpu-memory-utilization 0.7 \
 --enable-prefix-caching \
 --chat-template /models/Spark-X2.6-1.7B/chat_template.jinja

Client

curl -s http://127.0.0.1:30000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "spark25",
    "messages": [{"role": "user", "content": "What is the capital of Anhui Province?"}],
    "temperature": 1.0, 
    "top_k": -1,
    "top_p": 0.95
  }'

MLX

Spark-MLX-LLM runs the original Spark-X2.6 Hugging Face checkpoints locally. It supports Apple silicon GPU, Linux CPU, and NVIDIA CUDA on Linux. No GGUF conversion is required.

Installation

git clone https://github.com/XHToken/Spark-MLX-LLM.git
cd Spark-MLX-LLM

python3 -m venv .venv
source .venv/bin/activate

# Apple silicon
python -m pip install -e .
# Linux CPU
python -m pip install -e '.[cpu]'
# Linux with CUDA 12
python -m pip install -e '.[cuda12]' 
# Linux with CUDA 13
python -m pip install -e '.[cuda13]'

Run Inference

spark-mlx-generate \
  --device gpu \
  --dtype bfloat16 \
  --model XHToken/Spark-X2.6-1.7B \
  --prompt "What is the capital of Anhui Province?" \
  --max-tokens 512 \
  --temp 0

llama.cpp

[!NOTE] Native spark2_5 support requires llama.cpp b10828 or later.

Run the model in the CLI:

llama cli -m /path/to/Spark-X2.6-1.7B-GGUF

Launch the OpenAI-compatible API server:

llama serve -m /path/to/Spark-X2.6-1.7B-GGUF

Ollama

  1. Download and install Ollama from ollama.com (v0.34.1 or later).

  2. Run the model:

ollama run SparkLLM/Spark-X2.6-1.7B

LM Studio

  1. Download and install LM Studio from lmstudio.ai (0.4.0 or later).

  2. Search for "Spark-X2.6" in LM Studio and download the model.

  3. Load the model and start chatting.

Run with the lms cli

# List available models
lms ls

# Run chat with Spark-X2.6
lms chat spark-x2.6

Unsloth

Download Unsloth Studio

[!NOTE] The latest Unsloth Studio supports native Spark-X2.6 GGUF inference.

Fine-Tuning

We recommend using Llama-Factory to fine-tune the model.

License

The Spark-X2.6 model series is licensed under the Apache 2.0 License.

Citation

If you find our work helpful, feel free to give us a cite.

@misc{sparkx2.6,
    title  = {Spark-X2.6-4B&1.7B: Advancing the Frontier of On-Device Agents for Real-World Tasks},
    author = {SparkLLM Team},
    year   = {2026}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

llama.cpp

Нельзя запустить

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
75b70bb

0 моделей