Instructions to use wesjos/Spark-x2.6-4B-HTML-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 wesjos/Spark-x2.6-4B-HTML-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 wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf wesjos/Spark-x2.6-4B-HTML-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 wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M
Use Docker
docker model run hf.co/wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use wesjos/Spark-x2.6-4B-HTML-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wesjos/Spark-x2.6-4B-HTML-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": "wesjos/Spark-x2.6-4B-HTML-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M
- Ollama
How to use wesjos/Spark-x2.6-4B-HTML-GGUF with Ollama:
ollama run hf.co/wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use wesjos/Spark-x2.6-4B-HTML-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf wesjos/Spark-x2.6-4B-HTML-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": "wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use wesjos/Spark-x2.6-4B-HTML-GGUF with Docker Model Runner:
docker model run hf.co/wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M
- Lemonade
How to use wesjos/Spark-x2.6-4B-HTML-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Spark-x2.6-4B-HTML-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use wesjos/Spark-x2.6-4B-HTML-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 wesjos/Spark-x2.6-4B-HTML-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 wesjos/Spark-x2.6-4B-HTML-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use wesjos/Spark-x2.6-4B-HTML-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf wesjos/Spark-x2.6-4B-HTML-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 "wesjos/Spark-x2.6-4B-HTML-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"
Spark-X2.6-4B · HTML (GGUF)
The HTML-answering Spark-X2.6-4B, quantized for llama.cpp — Q4_K_M at 2.42 GiB, chat template included.
Q4_K_M 2.42 GiB · Q8_0 4.07 GiB · 1 M context in metadata · text only · Apache-2.0
🔧 Need the full bf16 checkpoint? → Spark-x2.6-4B-HTML
Same fine-tune, unquantized (7.66 GiB) — and it carries the WebUI that renders this model's HTML output.
🖼 Demo
Both shots are the WebUI shipped with the bf16 repo
(webui/, theme_preset: notion) with the CoT toggle on — the Chain of Thought panel above each
answer is the raw <think> stream, and the page below it is the unmodified render. Same images, same
model, quantized output.
can u show me what ReLU looks like?
A definition card, a two-column grid with a plotted ReLU curve next to a domain/output/slope table, and a "Why It Matters in ML" bullet card. 30.09 s · 129 tok/s · 3882 tokens.
ReLU · a definition card, a ReLU curve beside a domain/output/slope table, and a “Why It Matters in ML” card
how to learn C++
A study-plan page: a "Why Start Here?" callout, four feature-list bullets, then a "Key Libraries" card with inline code chips.
C++ · a “Why Start Here?” callout, four feature-list bullets, and a “Key Libraries” card of inline code chips
📦 Files
| File | Size | What it is |
|---|---|---|
Spark-x2.6-4B-HTML.Q4_K_M.gguf |
2.42 GiB | 4-bit mixed — smallest text-only option |
Spark-x2.6-4B-HTML.Q8_0.gguf |
4.07 GiB | 8-bit, near-lossless — the quant the WebUI is tuned for |
demo/demo-html-1.png |
78 KB | ReLU demo screenshot |
demo/demo-html-2.png |
67 KB | C++ demo screenshot |
Both were quantized with Unsloth (general.quantized_by), and both carry
general.size_label = 4.1B and general.file_type 15 / 7 respectively.
📐 Specs
Read from the GGUF's own KV block — not from the file name:
| Architecture | spark2_5 · 36 blocks — 9 full-attention + 27 sliding-attention (window 512) · embedding length 2560 |
| Attention | 16 heads / 4 KV heads · key/value length 256 · partial RoPE 64 (full) / 256 (sliding) |
| Context | 1,048,576 (spark2_5.context_length) |
| Vocab | 131,072 · gpt2 BPE, spark2_5 pre-tokenizer |
| Parameters | 4,112,079,360 (bf16 source) · 290 tensors |
| Chat template | embedded — byte-identical to the bf16 repo's chat_template.jinja |
| Sampling (metadata) | temp 0.7 · top_p 0.8 · top_k 40 · penalty_repeat 1.05 |
🚀 Quickstart
The chat template IS baked into these GGUFs (
tokenizer.chat_template, 5,647 bytes) — no--chat-template-fileneeded. Nativespark2_5support requires llama.cppb10828or later;v0.9.0has it.
llama-server \
-m Spark-x2.6-4B-HTML.Q4_K_M.gguf \
-c 32768 -ngl 99 -fa on --jinja \
--host 0.0.0.0 --port 18080
Then talk to it like any OpenAI endpoint:
curl -s http://127.0.0.1:18080/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "Spark-x2.6-4B-HTML",
"messages": [{"role": "user", "content": "can u show me what ReLU looks like?"}],
"temperature": 0.7, "top_p": 0.8, "top_k": 40,
"max_tokens": 8192, "repetition_penalty": 1.05,
"chat_template_kwargs": {"enable_thinking": true, "reasoning_effort": "low"}
}'
llama-cli, one shot:
llama-cli -m Spark-x2.6-4B-HTML.Q4_K_M.gguf \
-p "can u show me what ReLU looks like?" -n 8192 --temp 0.7 --top-p 0.8
💡 Notes
- The output is HTML, not Markdown — the model answers with cards, tables, metric tiles and callouts.
The class vocabulary is documented on the bf16 repo's card,
verified against that repo's
webui/static/theme.css. - The default system prompt is baked into the embedded template:
You are Mario-html. You are a helpful assistant who generates nice visual content. - Thinking is on by default. Pass
enable_thinking: falsefor a plain answer, and note the template only understandsreasoning_effortlowandhigh—medium/xhighare rejected by the template itself (the WebUI maps them down before sending). - 1 M context is in the metadata but not free. Full-attention KV costs 36.0 KiB/token, so 1 M tokens of
context is ~36 GiB of KV cache. The
-c 32768above is a realistic setting, not a limit of the file.
⚠️ Limitations
- No WebUI in this repo. The
webui/folder lives on the bf16 repo; this repo holds the two quants plus the demo screenshots. The demos are the bf16 model's shots — the quantized weights produce the same output. - No
chat_template.jinjafile here — the template is inside the GGUF, so a reader who converts the model to another format needs to copy it from the bf16 repo. - No training metadata ships with this repo — no data size, no steps, no rank.
📄 License
Apache-2.0, inherited from the Spark-X2.6 model series.
- Downloads last month
- 1
4-bit
8-bit
Model tree for wesjos/Spark-x2.6-4B-HTML-GGUF
Base model
XHToken/Spark-X2.6-4B-Base