Instructions to use sizzlebop/Spark-X2.5-4B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sizzlebop/Spark-X2.5-4B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sizzlebop/Spark-X2.5-4B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sizzlebop/Spark-X2.5-4B-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use sizzlebop/Spark-X2.5-4B-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 sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf sizzlebop/Spark-X2.5-4B-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 sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf sizzlebop/Spark-X2.5-4B-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 sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf sizzlebop/Spark-X2.5-4B-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 sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use sizzlebop/Spark-X2.5-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sizzlebop/Spark-X2.5-4B-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": "sizzlebop/Spark-X2.5-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M
- SGLang
How to use sizzlebop/Spark-X2.5-4B-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "sizzlebop/Spark-X2.5-4B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sizzlebop/Spark-X2.5-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "sizzlebop/Spark-X2.5-4B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sizzlebop/Spark-X2.5-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use sizzlebop/Spark-X2.5-4B-GGUF with Ollama:
ollama run hf.co/sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use sizzlebop/Spark-X2.5-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sizzlebop/Spark-X2.5-4B-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": "sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use sizzlebop/Spark-X2.5-4B-GGUF with Docker Model Runner:
docker model run hf.co/sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M
- Lemonade
How to use sizzlebop/Spark-X2.5-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Spark-X2.5-4B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use sizzlebop/Spark-X2.5-4B-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 sizzlebop/Spark-X2.5-4B-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 sizzlebop/Spark-X2.5-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use sizzlebop/Spark-X2.5-4B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sizzlebop/Spark-X2.5-4B-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 "sizzlebop/Spark-X2.5-4B-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"
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf sizzlebop/Spark-X2.5-4B-GGUF:# Run inference directly in the terminal:
llama cli -hf sizzlebop/Spark-X2.5-4B-GGUF: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 sizzlebop/Spark-X2.5-4B-GGUF:# Run inference directly in the terminal:
./llama-cli -hf sizzlebop/Spark-X2.5-4B-GGUF: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 sizzlebop/Spark-X2.5-4B-GGUF:# Run inference directly in the terminal:
./build/bin/llama-cli -hf sizzlebop/Spark-X2.5-4B-GGUF:Use Docker
docker model run hf.co/sizzlebop/Spark-X2.5-4B-GGUF:Spark-X2.5-4B GGUF
This repository contains GGUF format quants for XHToken/Spark-X2.5-4B.
Spark-X2.5-4B is a compact, high-efficiency language model featuring a hybrid attention architecture (combining sliding-window attention with full attention layers) and native context lengths up to 1M tokens.
These GGUF files were converted from the original safetensors weights using a custom Spark 2.5 build of llama.cpp at BF16 precision, then quantized into standard k-quants.
Available Files and Quantizations
| File | Quant Type | Size | Description / Recommendation |
|---|---|---|---|
Spark-X2.5-4B-BF16.gguf |
BF16 | 7.66 GB | Full precision base conversion. Highest fidelity, largest size. |
Spark-X2.5-4B-Q8_0.gguf |
Q8_0 | 4.07 GB | Near-lossless 8-bit quantization. Recommended if you have 6GB+ VRAM. |
Spark-X2.5-4B-Q6_K.gguf |
Q6_K | 3.15 GB | Excellent quality retention with minimal loss. Very balanced choice. |
Spark-X2.5-4B-Q5_K_M.gguf |
Q5_K_M | 2.77 GB | Good balance between memory footprint and output quality. |
Spark-X2.5-4B-Q4_K_M.gguf |
Q4_K_M | 2.42 GB | Fast, lightweight 4-bit quant. Great default for laptops and mobile devices. |
Spark-X2.5-4B-Q3_K_M.gguf |
Q3_K_M | 2.02 GB | Lower memory footprint when RAM or VRAM is tight. |
Spark-X2.5-4B-Q2_K.gguf |
Q2_K | 1.66 GB | Maximum compression. Noticeable quality degradation, best for ultra-constrained environments. |
Requirements
Spark-X2.5 uses the Spark2_5ForCausalLM (spark2_5) architecture. To run these files, ensure your local llama.cpp installation or downstream GUI client includes Spark 2.5 runtime support.
How to Use
1. With llama.cpp
Run the model directly from the command line using llama-cli:
llama-cli -m ./Spark-X2.5-4B-Q4_K_M.gguf \
-p "You are a helpful and concise assistant.\nUser: Hello! What can you do?\nAssistant:" \
-n 512 \
-c 4096 \
--temp 0.7
To run as a local server:
llama-server -m ./Spark-X2.5-4B-Q4_K_M.gguf \
--host 127.0.0.1 \
--port 8080 \
-c 4096
2. With Ollama
Create a Modelfile in the same directory:
FROM ./Spark-X2.5-4B-Q4_K_M.gguf
TEMPLATE """<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
PARAMETER temperature 0.7
Then build and run the model:
ollama create spark-x2.5-4b -f Modelfile
ollama run spark-x2.5-4b
3. With LM Studio
- Download or copy any
.gguffile to your LM Studio models folder. - Search for
Spark-X2.5-4Bin your local models tab. - Load the model with default GPU offloading settings and chat.
Original Model Details
- Original weights: XHToken/Spark-X2.5-4B
- Base Architecture: Spark 2.5 (
Spark2_5ForCausalLM) - Context Length: Up to 1,048,576 tokens (1M)
- Vocabulary Size: 131,072 tokens
- License: Apache 2.0
Attribution & Credits
Original model weights and architecture developed by XHToken.
GGUF conversions produced by Pink Pixel.
Made with 💖 by Pink Pixel
- Downloads last month
- 1,286
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf sizzlebop/Spark-X2.5-4B-GGUF:# Run inference directly in the terminal: llama cli -hf sizzlebop/Spark-X2.5-4B-GGUF: